Demonstrate overriding QoS settings via parameters#16
Open
mxgrey wants to merge 2 commits intoros2-rust:mainfrom
Open
Demonstrate overriding QoS settings via parameters#16mxgrey wants to merge 2 commits intoros2-rust:mainfrom
mxgrey wants to merge 2 commits intoros2-rust:mainfrom
Conversation
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Contributor
luca-della-vedova
left a comment
There was a problem hiding this comment.
While the example itself is useful I was investigating other libraries and I noticed that nodes by default offer a parameter interface to override the QoS.
For example, in my jazzy machine:
$ ros2 run examples_rclcpp_minimal_publisher publisher_lambda
# Another terminal
$ ros2 param list
/minimal_publisher:
qos_overrides./parameter_events.publisher.depth
qos_overrides./parameter_events.publisher.durability
qos_overrides./parameter_events.publisher.history
qos_overrides./parameter_events.publisher.reliability
start_type_description_service
use_sim_timeSo I feel the best way forward would actually be to move this logic in rclrs, what do you think?
| let _subscription = | ||
| node.create_subscription("greet", move |msg: example_interfaces::msg::String| { | ||
| let reliability_override = node | ||
| .declare_parameter::<Arc<str>>("qos_override/reliability") |
Contributor
There was a problem hiding this comment.
Note for self / others, parameters use . as a separator, not /
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.
This PR is in response to ros2-rust/ros2_rust#554 where a user reported an issue with overriding QoS settings based on node parameter values.
I've updated the
parameter_demoto demonstrate that use case. I found no issue with changing the subscription reliability based on parameter values.