cu-zenoh-ros-sink

Crates.iocu-zenoh-ros-sink
lib.rscu-zenoh-ros-sink
version0.9.1
created_at2025-05-26 23:28:29.935062+00
updated_at2025-09-12 20:25:23.627866+00
descriptionCopper sink task for ROS-compatible Zenoh messages.
homepagehttps://github.com/copper-project
repositoryhttps://github.com/copper-project/copper-rs
max_upload_size
id1690398
size148,459
Guillaume Binet (gbin)

documentation

README

cu-zenoh-ros-sink

This is a Copper sink task that publishes messages to ROS 2 via Zenoh middleware. It allows seamless integration between Copper applications and ROS 2 nodes by using the RMW zenoh implementation.

Configuration

The sink requires the following configuration parameters:

  • zenoh_config_json: Zenoh config as json string (optional).
  • domain_id: ROS domain ID (optional, defaults to "0"),
  • namespace: The ROS namespace (optional, defaults to "copper").
  • node: The ROS node name (optional, defaults to "node").
  • topic: The ROS topic name to publish to (optional, defaults to "copper").

Example configuration in a Copper application:

(
    tasks: [
        (
            id: "publisher",
            config: {
                "domain_id": 0,
                "namespace": "copper",
                "node": "sink_node",
                "topic": "output",
            }
        ),
    ],
    // ... rest of the configuration
)

Integration with ROS 2

To receive messages in ROS 2:

  1. Install "rmw_zenoh":
sudo apt install ros-$ROS_DISTRO-rmw-zenoh
  1. Set the RMW implementation to Zenoh:
export RMW_IMPLEMENTATION=rmw_zenoh
  1. Run your ROS 2 nodes as usual - they will automatically receive messages published by this sink.

Limitations

  • Payload has to implement RosMsgAdapter trait (see cu_ros_payloads).
  • QoS is not implemented (default QoS).
  • Only works with Humble distribution (hash type not implemented).
  • No service implemented.

Caveats

  • Add an extra serialization step to CDR format that could impact performance.

See the crate cu29 for more information about the Copper project.

Commit count: 741

cargo fmt