Add Node API method for setting the parameters_callback.#228
Merged
nuclearsandwich merged 2 commits intomasterfrom Aug 24, 2018
Merged
Add Node API method for setting the parameters_callback.#228nuclearsandwich merged 2 commits intomasterfrom
nuclearsandwich merged 2 commits intomasterfrom
Conversation
wjwwood
approved these changes
Aug 23, 2018
mikaelarguedas
approved these changes
Aug 23, 2018
Member
mikaelarguedas
left a comment
There was a problem hiding this comment.
lgtm with one inline question
Is there CI for this PR ?
| self.node.destroy_node() | ||
|
|
||
| def test_set_callback_accepting_all(self): | ||
| global callback_called |
Member
There was a problem hiding this comment.
is it necessary for this to be global? could it be local to each test case and nonlocal to the callbacks?
Member
Author
There was a problem hiding this comment.
TIL about nonlocal That's precisely what I needed. Thanks.
Member
Author
2 tasks
YuanYuYuan
pushed a commit
to YuanYuYuan/rclpy
that referenced
this pull request
Nov 12, 2025
Async Service Examples and Backend Fixes
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.
In #214 I wired up support for invoking a callback function to accept or reject a set of parameters but did not add the API to set that callback or tests for that functionality.
This pull request adds a
set_parameters_callbackmethod to rclpy.Node and some unit tests verifying that the callbacks are used and that the parameter values are set or not appropriately.Every test case I used has been put into the unit tests below.
Connects to #202