hiroz-protocol 0.1.0

ROS 2 over Zenoh protocol: entity types and key expression formats
Documentation
  • Coverage
  • 44.74%
    51 out of 114 items documented1 out of 48 items with examples
  • Size
  • Source code size: 206.55 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.28 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 1m 12s Average build duration of successful builds.
  • all releases: 1m 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • ZettaScaleLabs/hiroz
    212 21 7
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • YuanYuYuan

Key expression format handling for hiroz.

This crate provides key expression generation for mapping ROS 2 entities (nodes, topics, services, actions) to Zenoh key expressions.

Formats

hiroz supports multiple key expression formats:

  • RmwZenoh (default): Compatible with rmw_zenoh_cpp, the official ROS 2 RMW implementation using Zenoh. Uses strip_slashes() for topic key expressions and mangling for liveliness tokens.

  • Ros2Dds: Compatible with zenoh-plugin-ros2dds, useful for bridging between Zenoh and DDS networks.

no_std Support

This crate is no_std compatible with alloc:

[dependencies]
hiroz-protocol = { version = "0.1", default-features = false }

Example

use hiroz_protocol::{KeyExprFormat, entity::*};

let format = KeyExprFormat::default(); // RmwZenoh
let zid: zenoh::session::ZenohId = "1234567890abcdef1234567890abcdef".parse().unwrap();
let node = NodeEntity::new(0, zid, 0, "my_node".to_string(), "/".to_string(), String::new());

let entity = EndpointEntity {
    id: 1,
    node: Some(node),
    kind: EndpointKind::Publisher,
    topic: "/chatter".to_string(),
    type_info: None,
    qos: Default::default(),
};

// Generate topic key expression
let topic_ke = format.topic_key_expr(&entity).unwrap();