Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 2.41 KB

File metadata and controls

40 lines (30 loc) · 2.41 KB

Examples of Zenoh Rust applications communicating with ROS 2 Nodes

Building the examples

In order to build the examples you will need to:

Once this is done, compile by running the following:

cd examples/rust
cargo build

Messages Publication: talker.rs

This code mimics the ROS 2 Topics "talker" demo. It's compatible with the ROS 2 Topics "listener" demo running those commands:

  • ros2 run demo_nodes_cpp listener
  • zenoh-bridge-ros2dds
  • cargo run --bin talker

Messages Subscription: listener.rs

This code mimics the ROS 2 Topics "listener" demo. It's compatible with the ROS 2 Topics "talker" demo running those commands:

  • ros2 run demo_nodes_cpp talker
  • zenoh-bridge-ros2dds
  • cargo run --bin listener

Services Client: add_two_ints_client.rs

This code mimics the ROS 2 Services "add_two_ints_client" demo. It's compatible with the ROS 2 Services "add_two_ints_server" demo running those commands:

  • ros2 run demo_nodes_cpp add_two_ints_server
  • zenoh-bridge-ros2dds
  • cargo run --bin add_two_ints_client

This code mimics the ROS 2 Actions "fibonnacci_action_client" demo. It's compatible with the ROS 2 Actions "fibonnacci_action_server" demo running those commands:

  • ros2 run action_tutorials_cpp fibonacci_action_server
  • zenoh-bridge-ros2dds
  • cargo run --bin fibonnacci_action_client