|
Download examples/rust-ros2-dataflow/README.md from TomPei/csg-robomaster: direct link, hf CLI and curl.
- Browser
- Download file 1.41 kB
-
https://huggingface.co/datasets/TomPei/csg-robomaster/resolve/main/examples/rust-ros2-dataflow/README.md
- Command line
-
hf download hf://datasets/TomPei/csg-robomaster/examples/rust-ros2-dataflow/README.md
-
curl -L -o README.md https://huggingface.co/datasets/TomPei/csg-robomaster/resolve/main/examples/rust-ros2-dataflow/README.md
1.41 kB
rust-ros2-dataflow Example
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.
Setup
This examples requires a sourced ROS2 installation.
- To set up ROS2, follow the ROS2 installation guide.
- Don't forget to source the ROS2 setup files
- Follow tasks 1 and 2 of the ROS2 turtlesim tutorial
- Install the turtlesim package
- Start the turtlesim node through
ros2 run turtlesim turtlesim_node
- In a separate terminal, start the
/add_two_intsservice:ros2 run examples_rclcpp_minimal_service service_main
Running
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:
cargo run --example rust-ros2-dataflow --features ros2-examples
You should see a few random requests in the terminal where you started the examples_rclcpp_minimal_service.