- Stores my notes on RoboMaster ROS tutorials and development.
- Package
- Node Introduction
- Node Communication
- ROS Namespace
- Topic
- Message
- Service
- Topic and Service
- Launch file
- Parameter
- Can modify during runtime
- Folder (stack)
- Subfolder (package)
- Node (programs)
- Service (functions)
- Node (programs)
- Subfolder (package)
-
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
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
- Generate task.json under .vscode