Browse Source

Create README.md

tags/v0.3.3-rc1
Bob Ding GitHub 1 year ago
parent
commit
1ea08c3b41
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 28 additions and 0 deletions
  1. +28
    -0
      examples/c++-ros2-dataflow/README.md

+ 28
- 0
examples/c++-ros2-dataflow/README.md View File

@@ -0,0 +1,28 @@
# `cxx-ros2-dataflow` Example

This c++ example shows how to publish/subscribe to both ROS2 and Dora. The dataflow consists of a single node that sends random movement commands to the [ROS2 `turtlesim_node`](https://docs.ros.org/en/iron/Tutorials/Beginner-CLI-Tools/Introducing-Turtlesim/Introducing-Turtlesim.html).

## Setup

This examples requires a sourced ROS2 installation.

- To set up ROS2, follow the [ROS2 installation](https://docs.ros.org/en/iron/Installation.html) guide.
- Don't forget to [source the ROS2 setup files](https://docs.ros.org/en/iron/Tutorials/Beginner-CLI-Tools/Configuring-ROS2-Environment.html#source-the-setup-files)
- Follow tasks 1 and 2 of the [ROS2 turtlesim tutorial](https://docs.ros.org/en/iron/Tutorials/Beginner-CLI-Tools/Introducing-Turtlesim/Introducing-Turtlesim.html#id3)
- Install the turtlesim package
- Start the turtlesim node through `ros2 run turtlesim turtlesim_node`

## Running


From terminal 1 , sourcing the ROS2 installation and start ROS2 turtlesim window
```
source /opt/ros/galactic/setup.bash
ros2 run turtlesim turtlesim_node
```

From terminal 2 from dora folder
```
cargo run --example cxx-ros2-dataflow --features ros2-examples
```
And you will see the turtle move a few steps.

Loading…
Cancel
Save