You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.4 kB

123456789101112131415161718192021222324
  1. # `rust-ros2-dataflow` Example
  2. This 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).
  3. ## Setup
  4. This examples requires a sourced ROS2 installation.
  5. - To set up ROS2, follow the [ROS2 installation](https://docs.ros.org/en/iron/Installation.html) guide.
  6. - 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)
  7. - 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)
  8. - Install the turtlesim package
  9. - Start the turtlesim node through `ros2 run turtlesim turtlesim_node`
  10. - In a separate terminal, start the `/add_two_ints` service: `ros2 run examples_rclcpp_minimal_service service_main`
  11. ## Running
  12. After sourcing the ROS2 installation and starting both the `turtlesim` node and the `/add_two_ints` service, you can run this example to move the turtle in random directions:
  13. ```
  14. cargo run --example rust-ros2-dataflow --features ros2-examples
  15. ```
  16. You should see a few random requests in the terminal where you started the `examples_rclcpp_minimal_service`.