A playground holding small toy examples for getting started with ROS 2.
Tested with:
- Ubuntu 20.04 LTS
- ROS Foxy
Install ROS 2 Foxy and Colcon with:
sudo apt install ros-foxy-desktop python3-colcon-common-extensions
Create a workspace with
mkdir -p ~/ros2_starter_ws/src
Clone the current repo into src folder:
cd ~/ros2_starter_ws/src
git clone https://github.com/shineyruan/ros2_playground.git
Build the current repo with Colcon
cd ~/ros2_starter_ws
colcon build
- ROS 2 C++ talker and listener (message communication).
source install/setup.bash
ros2 run cpp_talker_listener cpp_talker_node
In another terminal:
source install/setup.bash
ros2 run cpp_talker_listener cpp_listener_node