ROS 2 Install and Tutorials - Utagoe-robotics/Wiki GitHub Wiki
https://index.ros.org/doc/ros2/Installation/Dashing/
Make sure source the setup file /opt/ros/dashing/setup.bash
.
You might want to add the script to ~/.bashrc
.
source /opt/ros/dashing/setup.bash
Package | Package Name |
---|---|
Turtlesim | ros-<distro>-turtlesim |
rqt | ros-<distro>-rqt-* |
https://index.ros.org/doc/ros2/Tutorials/
$ ros2 run <Package Name> <Node Name>
$ ros2
https://index.ros.org/doc/ros2/Tutorials/Understanding-ROS2-Actions/#ros2actions
Action is new to ROS 2. It sets a goal and send a message until it completes the goal.
https://index.ros.org/doc/ros2/Tutorials/Launch-Files/Creating-Launch-Files/#ros2launch
Launch file format of ROS 2 is Python.
https://index.ros.org/doc/ros2/Tutorials/Workspace/Creating-A-Workspace/#ros2workspace
- Create a new directory.
$ mkdir -p ros2_ws/src
- Build the workspace.
$ colcon build
- Source the overlay.
$ source ~/ros2_ws/install/local_setup.bash
- You should add this to
~/.bashrc
- You should add this to
https://index.ros.org/doc/ros2/Tutorials/Creating-Your-First-ROS2-Package/#createpkg
Move to ros2_ws/src
directory.
CMake
$ ros2 pkg create --build-type ament_cmake <package_name>
Python
$ ros2 pkg create --build-type ament_python <package_name>
- Move to workspace root directory:
$ cd ~/ros2_ws
- Build the package.
$ colcon build
- You can select specific package to build:
colcon build --packages-select <package_name>