Created
Jul 1, 2023 9:04 AM
Tags
ROS Essential
Creating a Workspace
mkdir catkin_ws && cd catkin_ws
mkdir src && cd src
catkin_make
source devel/setup.bash
echo $ROS_PACKAGE_PATH : to check correct path
or
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
make sure to add to ~/.bashrc
Creating a package
catkin_create_pkg pkg_name std_msgs rospy roscpp
Always create the package inside the src folder.
ROS core cmds
- roscd pkg_name
- rospack find pkg_name
- rostopic list , info , -help
- rosnode list , info , -help
- rosrun rqt_graph rqt_grpgh
ROS essential commands
-rostopic info /[name of list]
-rostopic type /[module type]
-rosnode list #to list all node running
-rostopic eco #to read the message which is publishing from the ode
-rosmsg show [] #node name
run the main exe to list the all available topic
Raspberry Pi Essential
To create a virtual environment in python!
mkdir project-name && cd project-name
python3 -m venv oled
source oled/bin/activate
or
. oled/bin/activate
To remove existing SSH key
ssh-keygen -R [ip address]
ip address : 192.168.1.1.1
How to kill a processor
sudo kill -kill [process number]
for instance 3040 is the process number.
To list all devices
ls /dev/tty*
To Measure Temperature
vcgencmd measure_temp
‣
To run a script on startup
nano ~/.bashrc
or
crontab -e
@reboot [script directory]
This is helpful in order to create a custom script like OLED status.
To watch a temperature of device
watch -n1 vcgencmd measure_temp
This is applicable for the processor too, just replace the temp with clock.
Managing files
- cd : change Directory
- mkdir : make a directory
- ls : list all items in a directory
- touch : make a txt file
- nano : cmd line text editor
- sudo : admin privelige
- rm -rf : to delete a directory
- rm : to delete a file
- cntrl + shift + c / v : copy n paste in cmd
- ~ : used to navigate to home directory
- chmod +x : to make a file executable
common for Linux devices.