Skip to content

Latest commit

 

History

History
76 lines (70 loc) · 3.8 KB

README.md

File metadata and controls

76 lines (70 loc) · 3.8 KB

About this repo

  • Stores my notes on RoboMaster ROS tutorials and development.

Dev Notes

Learning Notes

Structure of ROS

  • Folder (stack)
    • Subfolder (package)
      • Node (programs)
        • Service (functions)

Preparation

Creating a catkin workspace

  • Under the desired directory:

    • mkdir -p ~/catkin_ws/src
    • cd ~/catkin_ws/
    • catkin init / catkin_make
      • Complete the stack stucture
      • Note: if encounter: catkin: command not found
        • sudo apt-get install python-catkin-tools
  • Under ~/.bashrc:

    • source ~/catkin_ws/devel/setup.bash

    ~/.bashrc:

    • source /opt/ros/melodic/setup.bash
      • Find where ROS is installed on your computer
      • Enable us to use ROS functionalities (e.g.: roscore, rosrun)
    • source ~/catkin_ws/devel/setup.bash
      • Activate the catkin workspace
    • Note:
      • only one catkin_ws can run at one time, running source on a second catkin_ws will automatically deactivate the first one and activate the second.
      • To switch between workspaces, either source the corresponding setup.bash file (targetWS$ source devel/setup.bash) , or modify the ~/.bashrc file.
      • Run source ~/.bashrc after modification on it.
  • In VSCode:

    • Generate task.json under .vscode
      • Terminal > Configure Default Build Task > catkin_make: build
    • Teminal > Run build task
      • Difference between catkin_make: errors will show under the "problems" tab in VSCode