https://github.com/shineyruan/ros2_playground
A playground holding small toy examples for getting started with ROS 2.
https://github.com/shineyruan/ros2_playground
ros-foxy ros2
Last synced: 3 months ago
JSON representation
A playground holding small toy examples for getting started with ROS 2.
- Host: GitHub
- URL: https://github.com/shineyruan/ros2_playground
- Owner: shineyruan
- License: mit
- Created: 2022-01-27T06:38:36.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-30T05:35:01.000Z (over 3 years ago)
- Last Synced: 2025-01-04T07:51:03.608Z (5 months ago)
- Topics: ros-foxy, ros2
- Language: CMake
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ros2_playground
A playground holding small toy examples for getting started with ROS 2.Tested with:
- Ubuntu 20.04 LTS
- ROS Foxy## Software Requirement
Install ROS 2 Foxy and Colcon with:
```bash
sudo apt install ros-foxy-desktop python3-colcon-common-extensions
```## Building
Create a workspace with
```bash
mkdir -p ~/ros2_starter_ws/src
```Clone the current repo into src folder:
```bash
cd ~/ros2_starter_ws/src
git clone https://github.com/shineyruan/ros2_playground.git
```Build the current repo with [Colcon](https://colcon.readthedocs.io/en/released/index.html)
```bash
cd ~/ros2_starter_ws
colcon build
```## Usage
1. **ROS 2 C++ talker and listener** (message communication).
```bash
source install/setup.bash
ros2 run cpp_talker_listener cpp_talker_node
```
In another terminal:
```bash
source install/setup.bash
ros2 run cpp_talker_listener cpp_listener_node
```## References
* [Colcon](https://colcon.readthedocs.io/en/released/index.html)
* [ROS 2 Documentation: Foxy](https://docs.ros.org/en/foxy/index.html)