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-extensionsCreate a workspace with
mkdir -p ~/ros2_starter_ws/srcClone the current repo into src folder:
cd ~/ros2_starter_ws/src
git clone https://github.com/shineyruan/ros2_playground.gitBuild 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_nodeIn another terminal:
source install/setup.bash
ros2 run cpp_talker_listener cpp_listener_node