diff --git a/.github/workflows/ros2.yml b/.github/workflows/ros2.yml index 2ce1de81..09ff843c 100644 --- a/.github/workflows/ros2.yml +++ b/.github/workflows/ros2.yml @@ -35,11 +35,11 @@ jobs: zenoh: false - distro: kilted container: carter12s/roslibrust-ci-kilted:rust_1_94 - features: ros2_zenoh_test,rosbridge_ros2_test,ros2_test + features: hiroz_test,rosbridge_ros2_test,ros2_test zenoh: true - distro: rolling container: carter12s/roslibrust-ci-rolling:rust_1_94 - features: ros2_zenoh_test,rosbridge_ros2_test,ros2_test + features: rosbridge_ros2_test,ros2_test zenoh: true name: ${{ matrix.distro }} diff --git a/Cargo.lock b/Cargo.lock index 63decad9..8057a3b2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1542,6 +1542,85 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hiroz" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fde4f6c23e467423403daaf19025fc8ecd5349d97940284ce05b2f257678399" +dependencies = [ + "byteorder", + "clap", + "csv", + "dashmap", + "event-listener", + "flume", + "hiroz-cdr", + "hiroz-derive", + "hiroz-protocol", + "hiroz-schema", + "json5", + "parking_lot", + "paste", + "serde", + "serde_json", + "serde_yaml", + "sha2", + "slab", + "strum", + "tokio", + "tokio-util", + "tracing", + "uuid", + "zenoh", + "zenoh-buffers", + "zenoh-ext", +] + +[[package]] +name = "hiroz-cdr" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc63acccbb1978c3a4eab7ff6843e0490529c44e9d3b6846b482a5a3e59c990b" +dependencies = [ + "bytemuck", + "byteorder", + "serde", + "thiserror 1.0.69", + "zenoh-buffers", +] + +[[package]] +name = "hiroz-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f0b01b0f498b4d550b282aa4120550452ff44ffc02d3bf7be76144995521a3b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "hiroz-protocol" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6ac9f1ff0b1ffeb8ae8150b0395c9d3cf2f3225dc8764132a0bb7ecab1f384" +dependencies = [ + "zenoh", +] + +[[package]] +name = "hiroz-schema" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1caf5110f3ad485b0b320fbfc2610c5c51f54d6ee27a563fdff31ea556d7c18" +dependencies = [ + "hex", + "serde", + "serde_json", + "sha2", +] + [[package]] name = "hmac" version = "0.12.1" @@ -3366,80 +3445,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "ros-z" -version = "0.1.0" -source = "git+https://github.com/ZettaScaleLabs/ros-z.git?rev=9bb6305#9bb63050e74ff0a27559534255f0508a19491d08" -dependencies = [ - "byteorder", - "clap", - "csv", - "dashmap", - "event-listener", - "flume", - "json5", - "parking_lot", - "paste", - "ros-z-cdr", - "ros-z-derive", - "ros-z-protocol", - "ros-z-schema", - "serde", - "serde_json", - "serde_yaml", - "sha2", - "slab", - "strum", - "tokio", - "tokio-util", - "tracing", - "uuid", - "zenoh", - "zenoh-buffers", - "zenoh-ext", -] - -[[package]] -name = "ros-z-cdr" -version = "0.1.0" -source = "git+https://github.com/ZettaScaleLabs/ros-z.git?rev=9bb6305#9bb63050e74ff0a27559534255f0508a19491d08" -dependencies = [ - "bytemuck", - "byteorder", - "serde", - "thiserror 1.0.69", - "zenoh-buffers", -] - -[[package]] -name = "ros-z-derive" -version = "0.1.0" -source = "git+https://github.com/ZettaScaleLabs/ros-z.git?rev=9bb6305#9bb63050e74ff0a27559534255f0508a19491d08" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "ros-z-protocol" -version = "0.1.0" -source = "git+https://github.com/ZettaScaleLabs/ros-z.git?rev=9bb6305#9bb63050e74ff0a27559534255f0508a19491d08" -dependencies = [ - "zenoh", -] - -[[package]] -name = "ros-z-schema" -version = "0.1.0" -source = "git+https://github.com/ZettaScaleLabs/ros-z.git?rev=9bb6305#9bb63050e74ff0a27559534255f0508a19491d08" -dependencies = [ - "hex", - "serde", - "serde_json", - "sha2", -] - [[package]] name = "roslibrust" version = "0.21.0" @@ -3451,6 +3456,7 @@ dependencies = [ "roslibrust_codegen", "roslibrust_codegen_macro", "roslibrust_common", + "roslibrust_hiroz", "roslibrust_mock", "roslibrust_ros1", "roslibrust_rosbridge", @@ -3531,6 +3537,24 @@ dependencies = [ "serde_json", ] +[[package]] +name = "roslibrust_hiroz" +version = "0.1.0" +dependencies = [ + "anyhow", + "cdr", + "env_logger 0.11.8", + "hiroz", + "log", + "roslibrust_common", + "roslibrust_test", + "serde", + "tokio", + "tokio-util", + "zenoh", + "zenoh-buffers", +] + [[package]] name = "roslibrust_mcap" version = "0.1.0" @@ -3588,24 +3612,6 @@ dependencies = [ "ureq", ] -[[package]] -name = "roslibrust_ros2" -version = "0.1.0" -dependencies = [ - "anyhow", - "cdr", - "env_logger 0.11.8", - "log", - "ros-z", - "roslibrust_common", - "roslibrust_test", - "serde", - "tokio", - "tokio-util", - "zenoh", - "zenoh-buffers", -] - [[package]] name = "roslibrust_rosapi" version = "0.1.0" @@ -3656,12 +3662,12 @@ dependencies = [ "diffy", "env_logger 0.10.2", "hex", + "hiroz", "lazy_static", "log", "pprof", - "ros-z", "roslibrust", - "roslibrust_ros2", + "roslibrust_hiroz", "roslibrust_rosbridge", "roslibrust_zenoh", "test-log", @@ -5455,7 +5461,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.61.2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 82b68e8a..adc9cab6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ members = [ "roslibrust_zenoh", "roslibrust", "roslibrust_rosapi", - "roslibrust_ros2", + "roslibrust_hiroz", ] [workspace.dependencies] diff --git a/README.md b/README.md index 2e354561..8ec4d396 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ async fn relay(ros: T) -> roslibrust::Result<()> { #[tokio::main] async fn main() -> roslibrust::Result<()> { - // Experimental support in roslibrust_ros2, not yet released on crates.io + // Experimental support in roslibrust_hiroz, not yet released on crates.io // Relay messages over a native ROS2 connection using Zenoh // #[cfg(feature = "ros2")] // { diff --git a/book/src/introduction.md b/book/src/introduction.md index 60982fe8..c6909636 100644 --- a/book/src/introduction.md +++ b/book/src/introduction.md @@ -91,7 +91,7 @@ RosLibRust provides several implementations of the `Ros` trait: - [roslibrust_ros1](https://docs.rs/roslibrust_ros1/latest/roslibrust_ros1/) - Implements the TCPROS protocol that was the backbone of ROS1 - [roslibrust_zenoh](https://docs.rs/roslibrust_zenoh/latest/roslibrust_zenoh/) - Implements a variant of ROS1 communication used by [zenoh-ros1-bridge](https://github.com/eclipse-zenoh/zenoh-plugin-ros1) - [roslibrust_rosbridge](https://docs.rs/roslibrust_rosbridge/latest/roslibrust_rosbridge/) - Implements the [rosbridge_suite](https://github.com/RobotWebTools/rosbridge_suite) websocket protocol -- COMING SOON [roslibrust_ros2](https://docs.rs/roslibrust_ros2/latest/roslibrust_ros2/) - Implements the Zenoh communication used by [rmw_zenoh](https://github.com/ros2/rmw_zenoh) in ROS2 from Kilted onwards +- COMING SOON `roslibrust_hiroz` - Implements the Zenoh communication used by [rmw_zenoh](https://github.com/ros2/rmw_zenoh) in ROS2 from Kilted onwards - [roslibrust_mock](https://docs.rs/roslibrust_mock/latest/roslibrust_mock/) - Implements a mock ROS perfect for testing Typically we don't depend on these crates directly, but instead use them by enabling their corresponding features on `roslibrust`. @@ -107,7 +107,7 @@ The full list of features is: - `zenoh` - Enables the [roslibrust_zenoh](https://docs.rs/roslibrust_zenoh/latest/roslibrust_zenoh/) backend - `rosbridge` - Enables the [roslibrust_rosbridge](https://docs.rs/roslibrust_rosbridge/latest/roslibrust_rosbridge/) backend - `mock` - Enables the [roslibrust_mock](https://docs.rs/roslibrust_mock/latest/roslibrust_mock/) backend -- `ros2` - COMING SOON Enables the [roslibrust_ros2](https://docs.rs/roslibrust_ros2/latest/roslibrust_ros2/) backend +- `hiroz` - COMING SOON Enables the `roslibrust_hiroz` backend - `codegen` - Provides access to the [roslibrust_codegen](https://docs.rs/roslibrust_codegen/latest/roslibrust_codegen/) crate for generating ROS message types in build.rs. - `macro` - Provides access to the [roslibrust_codegen_macro](https://docs.rs/roslibrust_codegen_macro/latest/roslibrust_codegen_macro/) crate for generating ROS message types using a proc-macro. - `all` - Enables all of the above features. @@ -141,4 +141,3 @@ The second approach is brittle, slow, and often a bottle neck for test times. RosLibRust provides a mock implementation of ROS for testing that allows deterministic "time traveling" tests. See [extended getting started guide](extended_getting_started.md#writing-tests-for-our-node) for an example. - diff --git a/docker/kilted_compose.yaml b/docker/kilted_compose.yaml index 84db1e8a..99557f9f 100644 --- a/docker/kilted_compose.yaml +++ b/docker/kilted_compose.yaml @@ -10,5 +10,5 @@ services: volumes: # Mounting in the repo for internal development, and devcontainer access - ../:/roslibrust - # Mount in sibling ros-z repo so we can also test it within the docker image - - ../../ros-z:/ros-z + # Mount a sibling hiroz repo so it can also be tested within the docker image + - ../../hiroz:/hiroz diff --git a/docker/rolling_compose.yaml b/docker/rolling_compose.yaml index 34f9389e..76ab3d27 100644 --- a/docker/rolling_compose.yaml +++ b/docker/rolling_compose.yaml @@ -10,6 +10,5 @@ services: volumes: # Mounting in the repo for internal development, and devcontainer access - ../:/roslibrust - # Mount in sibling ros-z repo so we can also test it within the docker image - - ../../ros-z:/ros-z - + # Mount a sibling hiroz repo so it can also be tested within the docker image + - ../../hiroz:/hiroz diff --git a/roslibrust/Cargo.toml b/roslibrust/Cargo.toml index b4abe614..4f862e65 100644 --- a/roslibrust/Cargo.toml +++ b/roslibrust/Cargo.toml @@ -16,6 +16,7 @@ roslibrust_ros1 = { path = "../roslibrust_ros1", version = "0.21", optional = tr roslibrust_rosbridge = { path = "../roslibrust_rosbridge", version = "0.21", optional = true } roslibrust_zenoh = { path = "../roslibrust_zenoh", version = "0.21", optional = true } roslibrust_mock = { path = "../roslibrust_mock", version = "0.21", optional = true } +roslibrust_hiroz = { path = "../roslibrust_hiroz", optional = true } roslibrust_codegen = { path = "../roslibrust_codegen", version = "0.21", optional = true } roslibrust_codegen_macro = { path = "../roslibrust_codegen_macro", version = "0.21", optional = true } @@ -42,7 +43,7 @@ ntest = "0.9" # default feature is pure traits only with no implementations default = [] # `all` enables all "useful" features to end users, other features are for testing purposes -all = ["codegen", "macro", "ros1", "rosbridge", "zenoh", "mock"] +all = ["codegen", "macro", "ros1", "rosbridge", "zenoh", "mock", "hiroz"] # Provides a ros1 xmlrpc / TCPROS client ros1 = ["roslibrust_ros1"] # Provides a backend using the rosbridge websocket protocol @@ -51,6 +52,8 @@ rosbridge = ["roslibrust_rosbridge"] zenoh = ["roslibrust_zenoh"] # Provides a mock backend useful for writing tests around nodes mock = ["roslibrust_mock"] +# Provides a native ROS 2 backend built on hiroz and rmw_zenoh. +hiroz = ["roslibrust_hiroz"] # Provides a macro for generating types from ROS messages codegen = ["roslibrust_codegen"] # Provides macros for generating types from ROS messages diff --git a/roslibrust/src/lib.rs b/roslibrust/src/lib.rs index 9986f32f..d745bf0f 100644 --- a/roslibrust/src/lib.rs +++ b/roslibrust/src/lib.rs @@ -20,6 +20,10 @@ pub use roslibrust_zenoh as zenoh; #[cfg(feature = "mock")] pub use roslibrust_mock as mock; +// If the hiroz feature is enabled, export the native ROS 2 backend under hiroz. +#[cfg(feature = "hiroz")] +pub use roslibrust_hiroz as hiroz; + // If the codegen feature is enabled, export the roslibrust_codegen crate under codegen #[cfg(feature = "codegen")] pub use roslibrust_codegen as codegen; diff --git a/roslibrust_ros2/Cargo.toml b/roslibrust_hiroz/Cargo.toml similarity index 70% rename from roslibrust_ros2/Cargo.toml rename to roslibrust_hiroz/Cargo.toml index 74b5a887..e0945444 100644 --- a/roslibrust_ros2/Cargo.toml +++ b/roslibrust_hiroz/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "roslibrust_ros2" +name = "roslibrust_hiroz" version = "0.1.0" edition = "2021" publish = false @@ -12,12 +12,11 @@ env_logger = "0.11" cdr = "0.2" roslibrust_common = { path = "../roslibrust_common", version = "0.21" } anyhow = "1.0" -# Main as of May 16th 2026 -ros-z = { git = "https://github.com/ZettaScaleLabs/ros-z.git", rev = "9bb6305" } +hiroz = { version = "0.1.0", default-features = false, features = ["kilted", "rmw-zenoh"] } log = "0.4" # Used for cancellation token tokio-util = "0.7" -# Needed for now because of ros-z type incompatibility +# Needed for the serde wrapper around roslibrust message types. serde = { workspace = true } [dev-dependencies] @@ -25,4 +24,4 @@ roslibrust_test = { path = "../roslibrust_test" } [features] # Used to enable tests that rely on a locally running ros2 rmw_zenohd -ros2_zenoh_test = [] +hiroz_test = [] diff --git a/roslibrust_ros2/README.md b/roslibrust_hiroz/README.md similarity index 73% rename from roslibrust_ros2/README.md rename to roslibrust_hiroz/README.md index 539136ec..54c2f033 100644 --- a/roslibrust_ros2/README.md +++ b/roslibrust_hiroz/README.md @@ -1,3 +1,3 @@ -# roslibrust_ros2 +# roslibrust_hiroz Experimental ROS2 backend for roslibrust via zenoh. diff --git a/roslibrust_ros2/examples/dump_zenoh_bytes.rs b/roslibrust_hiroz/examples/dump_zenoh_bytes.rs similarity index 100% rename from roslibrust_ros2/examples/dump_zenoh_bytes.rs rename to roslibrust_hiroz/examples/dump_zenoh_bytes.rs diff --git a/roslibrust_ros2/examples/service_server.rs b/roslibrust_hiroz/examples/service_server.rs similarity index 89% rename from roslibrust_ros2/examples/service_server.rs rename to roslibrust_hiroz/examples/service_server.rs index 13fb2868..cf5aa985 100644 --- a/roslibrust_ros2/examples/service_server.rs +++ b/roslibrust_hiroz/examples/service_server.rs @@ -1,19 +1,19 @@ use log::*; use roslibrust_common::traits::*; // Required to get .build() method on ZContextBuilder -use ros_z::Builder; +use hiroz::Builder; #[tokio::main] async fn main() { env_logger::init(); - let ctx = ros_z::context::ZContextBuilder::default() + let ctx = hiroz::context::ZContextBuilder::default() .with_domain_id(0) .with_connect_endpoints(["tcp/[::]:7447"]) .build() .unwrap(); - let client = roslibrust_ros2::ZenohClient::new(&ctx, "test_service_server_callable_node") + let client = roslibrust_hiroz::ZenohClient::new(&ctx, "test_service_server_callable_node") .await .unwrap(); diff --git a/roslibrust_ros2/src/lib.rs b/roslibrust_hiroz/src/lib.rs similarity index 98% rename from roslibrust_ros2/src/lib.rs rename to roslibrust_hiroz/src/lib.rs index 5c8b99c0..f298ca2a 100644 --- a/roslibrust_ros2/src/lib.rs +++ b/roslibrust_hiroz/src/lib.rs @@ -2,7 +2,7 @@ use log::*; use roslibrust_common::*; use std::result::Result as StdResult; -use ros_z::{ +use hiroz::{ context::ZContext, entity::{TypeHash, TypeInfo}, msg::{SerdeCdrSerdes, ZMessage, ZService}, @@ -11,12 +11,12 @@ use ros_z::{ Builder, }; -/// re-export ros_z for consumers -pub use ros_z; +/// Re-export hiroz for consumers. +pub use hiroz; /// A "newtype" wrapper around ZNode so we can implement roslibrust's traits for it. pub struct ZenohClient { - node: ros_z::node::ZNode, + node: hiroz::node::ZNode, } type RosZSerdes = SerdeCdrSerdes>; @@ -187,11 +187,11 @@ impl Drop for ZenohServiceServer { } pub struct ZenohServiceClient { - client: ros_z::service::ZClient>, + client: hiroz::service::ZClient>, _marker: std::marker::PhantomData, } -// Orphan-rule shim: ZService (ros_z) cannot be impl'd for T: RosServiceType (roslibrust_common) +// Orphan-rule shim: ZService (hiroz) cannot be impl'd for T: RosServiceType (roslibrust_common) // in a downstream crate. This unit struct bridges the two. struct Fake(std::marker::PhantomData); diff --git a/roslibrust_ros2/tests/common/mod.rs b/roslibrust_hiroz/tests/common/mod.rs similarity index 68% rename from roslibrust_ros2/tests/common/mod.rs rename to roslibrust_hiroz/tests/common/mod.rs index 5254be75..ed31fdab 100644 --- a/roslibrust_ros2/tests/common/mod.rs +++ b/roslibrust_hiroz/tests/common/mod.rs @@ -1,6 +1,6 @@ -use ros_z::context::ZContext; -use ros_z::context::ZContextBuilder; -use ros_z::Builder; +use hiroz::context::ZContext; +use hiroz::context::ZContextBuilder; +use hiroz::Builder; pub fn make_test_context() -> ZContext { ZContextBuilder::default() diff --git a/roslibrust_ros2/tests/test_pubsub_basic.rs b/roslibrust_hiroz/tests/test_pubsub_basic.rs similarity index 92% rename from roslibrust_ros2/tests/test_pubsub_basic.rs rename to roslibrust_hiroz/tests/test_pubsub_basic.rs index 609c3192..20ffbd79 100644 --- a/roslibrust_ros2/tests/test_pubsub_basic.rs +++ b/roslibrust_hiroz/tests/test_pubsub_basic.rs @@ -1,9 +1,9 @@ -#![cfg(feature = "ros2_zenoh_test")] +#![cfg(feature = "hiroz_test")] mod common; use roslibrust_common::traits::*; -use roslibrust_ros2::ZenohClient; +use roslibrust_hiroz::ZenohClient; #[tokio::test(flavor = "multi_thread")] async fn test_pubsub_basic() { diff --git a/roslibrust_ros2/tests/test_service_server_callable.rs b/roslibrust_hiroz/tests/test_service_server_callable.rs similarity index 95% rename from roslibrust_ros2/tests/test_service_server_callable.rs rename to roslibrust_hiroz/tests/test_service_server_callable.rs index c02bc2bd..dd384e34 100644 --- a/roslibrust_ros2/tests/test_service_server_callable.rs +++ b/roslibrust_hiroz/tests/test_service_server_callable.rs @@ -1,9 +1,9 @@ -#![cfg(feature = "ros2_zenoh_test")] +#![cfg(feature = "hiroz_test")] mod common; use roslibrust_common::traits::*; -use roslibrust_ros2::ZenohClient; +use roslibrust_hiroz::ZenohClient; #[tokio::test(flavor = "multi_thread")] async fn test_service_server_callable() { diff --git a/roslibrust_ros2/tests/test_service_zenoh_to_zenoh.rs b/roslibrust_hiroz/tests/test_service_zenoh_to_zenoh.rs similarity index 95% rename from roslibrust_ros2/tests/test_service_zenoh_to_zenoh.rs rename to roslibrust_hiroz/tests/test_service_zenoh_to_zenoh.rs index 96b8bcc4..84d52921 100644 --- a/roslibrust_ros2/tests/test_service_zenoh_to_zenoh.rs +++ b/roslibrust_hiroz/tests/test_service_zenoh_to_zenoh.rs @@ -1,9 +1,9 @@ -#![cfg(feature = "ros2_zenoh_test")] +#![cfg(feature = "hiroz_test")] mod common; use roslibrust_common::traits::*; -use roslibrust_ros2::ZenohClient; +use roslibrust_hiroz::ZenohClient; #[tokio::test(flavor = "multi_thread")] async fn test_service_zenoh_to_zenoh() { diff --git a/roslibrust_ros2/tests/test_subscribe_basic.rs b/roslibrust_hiroz/tests/test_subscribe_basic.rs similarity index 93% rename from roslibrust_ros2/tests/test_subscribe_basic.rs rename to roslibrust_hiroz/tests/test_subscribe_basic.rs index 5e5f13e9..b8743745 100644 --- a/roslibrust_ros2/tests/test_subscribe_basic.rs +++ b/roslibrust_hiroz/tests/test_subscribe_basic.rs @@ -1,9 +1,9 @@ -#![cfg(feature = "ros2_zenoh_test")] +#![cfg(feature = "hiroz_test")] mod common; use roslibrust_common::traits::*; -use roslibrust_ros2::ZenohClient; +use roslibrust_hiroz::ZenohClient; #[tokio::test(flavor = "multi_thread")] async fn test_subscribe_basic() { diff --git a/roslibrust_test/Cargo.toml b/roslibrust_test/Cargo.toml index 46bad858..9caea621 100644 --- a/roslibrust_test/Cargo.toml +++ b/roslibrust_test/Cargo.toml @@ -19,9 +19,9 @@ pprof = { version = "0.15", features = ["flamegraph", "criterion"] } test-log = { workspace = true } hex = "0.4" roslibrust_zenoh = { path = "../roslibrust_zenoh" } -roslibrust_ros2 = { path = "../roslibrust_ros2" } +roslibrust_hiroz = { path = "../roslibrust_hiroz" } roslibrust_rosbridge = { path = "../roslibrust_rosbridge" } -ros-z = { git = "https://github.com/ZettaScaleLabs/ros-z.git", rev = "9bb6305" } +hiroz = { version = "0.1.0", default-features = false, features = ["kilted", "rmw-zenoh"] } [[bin]] path = "src/performance_ramp.rs" @@ -33,6 +33,6 @@ harness = false [features] ros1_test = [] -ros2_zenoh_test = [] +hiroz_test = [] rosbridge_ros1_test = [] rosbridge_ros2_test = [] diff --git a/roslibrust_test/tests/graph_provider_tests.rs b/roslibrust_test/tests/graph_provider_tests.rs index a12d7b45..e1373b96 100644 --- a/roslibrust_test/tests/graph_provider_tests.rs +++ b/roslibrust_test/tests/graph_provider_tests.rs @@ -6,7 +6,7 @@ //! Run tests for specific backends: //! - Mock: cargo test --test graph_provider_tests (no feature needed) //! - ROS1: cargo test --test graph_provider_tests --features ros1_test -//! - ROS2 Zenoh: cargo test --test graph_provider_tests --features ros2_zenoh_test +//! - Hiroz: cargo test --test graph_provider_tests --features hiroz_test //! - Rosbridge ROS1: cargo test --test graph_provider_tests --features rosbridge_ros1_test //! - Rosbridge ROS2: cargo test --test graph_provider_tests --features rosbridge_ros2_test @@ -168,17 +168,17 @@ mod ros1_tests { } // ============================================================================ -// ROS2 Zenoh Backend Tests +// Hiroz Backend Tests // ============================================================================ -#[cfg(feature = "ros2_zenoh_test")] -mod ros2_zenoh_tests { +#[cfg(feature = "hiroz_test")] +mod hiroz_tests { use super::*; - use ros_z::context::ZContextBuilder; - use ros_z::Builder; - use roslibrust_ros2::ZenohClient; + use hiroz::context::ZContextBuilder; + use hiroz::Builder; + use roslibrust_hiroz::ZenohClient; - fn make_test_context() -> ros_z::context::ZContext { + fn make_test_context() -> hiroz::context::ZContext { ZContextBuilder::default() .with_domain_id(0) .with_connect_endpoints(["tcp/[::]:7447"]) @@ -187,7 +187,7 @@ mod ros2_zenoh_tests { } #[test_log::test(tokio::test(flavor = "multi_thread", worker_threads = 1))] - async fn test_ros2_zenoh_graph_provider_topics() { + async fn test_hiroz_graph_provider_topics() { let ctx = make_test_context(); let ros = ZenohClient::new(&ctx, "test_graph_provider_topics") .await @@ -196,7 +196,7 @@ mod ros2_zenoh_tests { } #[test_log::test(tokio::test(flavor = "multi_thread", worker_threads = 1))] - async fn test_ros2_zenoh_graph_provider_services() { + async fn test_hiroz_graph_provider_services() { let ctx = make_test_context(); let ros = ZenohClient::new(&ctx, "test_graph_provider_services") .await