Repository navigation
fix(rmw-zenoh-rs): stop double-declaring parameter services - #358
Merged
Merged
Conversation
rclcpp::Node's constructor already sets up its own generic parameter- service machinery via rmw_create_service (the standard six services: describe_parameters, get_parameters, get_parameter_types, list_parameters, set_parameters, set_parameters_atomically), unless the application opts out with NodeOptions::start_parameter_services(false). NodeImpl::new() never called .without_parameters() on hiroz's ZContextBuilder, so every rmw-zenoh-rs node also got hiroz's own built-in ParameterService on top: two Queryables answering the same six service names, backed by two independent implementations. Beyond the extra router load, this is a correctness concern -- two declarers of the same service key are both eligible to answer a real `ros2 param get/set` call, which is undefined/racy. Add .without_parameters() to NodeImpl::new()'s builder chain. rclcpp's own generic parameter services still work; they never depended on hiroz's internal ParameterService, which is only useful when hiroz is driven through its own native API rather than as an RMW backend under rclcpp.
NodeImpl::new is plain Rust and needs no live rclcpp process to build: open an in-process router, build a node through it, and read the service names in the discovery graph after a settle window. Asserts none of them belong to this node -- the absence the fix establishes.
YuanYuYuan
force-pushed
the
fix/rmw-zenoh-rs-double-param-services
branch
from
September 23, 2026 07:45
c7237c1 to
8ab163a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every
rmw-zenoh-rsnode declares its own six ROS 2 parameter services on top of the onesrclcppalready provides for it. Two Queryables answer the same service names with two independent implementations. This is a correctness concern, not only extra load: a realros2 param get/setcall can be answered by either one.Root cause
rclcpp::Node's constructor already sets up its own generic parameter-service machinery (describe_parameters,get_parameters,get_parameter_types,list_parameters,set_parameters,set_parameters_atomically, plus/parameter_events) overrmw_create_service, unless the application opts out withNodeOptions::start_parameter_services(false).NodeImpl::new()inrmw-zenoh-rsnever told hiroz'sZContextBuilderto skip its own internalParameterService, which is enabled by default. So every node ended up with both sets declared under identical names.Fix
Add
.without_parameters()to the builder chain inNodeImpl::new().rclcpp's own parameter services are unaffected — they never depended on hiroz's internal one, which only matters when hiroz is driven through its native API rather than as an RMW backend underrclcpp.What fails without this
NodeImpl::newbuilds a nodeno_parameter_services.rs(added here)FAILED: lists all 6 duplicated service namesokThe new test builds a
NodeImpldirectly against an in-process router (norclcppprocess needed —NodeImpl::newis plain Rust) and reads the discovery graph after a settle window. Reverting only the.without_parameters()line reproduces the failure with the exact service names; restoring it passes.Breaking Changes
None.
rmw-zenoh-rsnodes stop declaring redundant services;rclcpp's own parameter services are unaffected.Checklist
crates/rmw-zenoh-rs/tests/no_parameter_services.rs. Verified both directions (fails without the fix, passes with it) in theros-jazzydevshell —rmw-zenoh-rscannot build under a plain Rust devshell (itsbuild.rsneeds ROS headers)../scripts/check-local.shsuccessfully. Not run as one command:rmw-zenoh-rsis outside the pure-Rust workspace subset that script covers on this environment.cargo test -p rmw-zenoh-rs --test no_parameter_serviceswas run directly, both directions, above.