Skip to content

Instantly share code, notes, and snippets.

View aarsht7's full-sized avatar
🐵
LLMs don't give you good ideas, they generate lots of code for your bad ideas

Aarsh Thakker aarsht7

🐵
LLMs don't give you good ideas, they generate lots of code for your bad ideas
View GitHub Profile
@aarsht7
aarsht7 / ros ros2 ws management.md
Last active October 28, 2021 12:59
ros and ros2 workspace management tool (Linux)

ros-ros2-ws-management

Modified bashrc file to make your life easy with running ROS and ROS2 in parallel on same machine that allow you to jump between both with just one command. Visit here for code.

Features

  • If you open the terminal into pre-built ros workspace, it will automatically recognize the ros version and source the require setup.bash file.
  • If you want to re-source the workspace, use commands from workspace folder.
    • $ sb1 (for ros1 workspace)
    • $ sb2 (for ros2 workspace)
@aarsht7
aarsht7 / rclpy_param_helper.py
Last active December 12, 2024 23:22
ros2 python paramtere setter and getter functions for current node to other node
from rclpy import Node
from rcl_interfaces.srv import SetParameters, GetParameters
from rcl_interfaces.msg import Parameter, ParameterType, ParameterValue
# node: current node handle
# node_name: name of node for which you need to set params
# param_dict: dict of params that need to be set {'param_name': param_value}
def call_set_parameters(node:Node, node_name:str, param_dict:dict) -> bool:
parameters=[]
for key,value in param_dict.items():
@aarsht7
aarsht7 / setup_tb3.sh
Last active September 4, 2024 15:24
Setup turtlebot3 with ros2 humble on ubuntu 22.04 server on raspberryPi (might take more than 2 hours in total and will need some attention in between). Check out comment for how to run.
#!/bin/bash
set -e
sudo apt update
locale # check for UTF-8
sudo apt update && sudo apt install locales net-tools curl software-properties-common -y
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8