-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multiple parameters callback #457
Conversation
d85597e
to
78cc5e8
Compare
@suab321321 Please refrain from opening multiple pull requests. Instead, It's best to fix the original pull request instead. |
6c12b68
to
b5b8a1e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add tests to cover the new API.
c82cc61
to
6ce54c9
Compare
60dc705
to
74bc57c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned before (#457 (review)) please add test coverage for the newly introduced API.
rclpy/rclpy/node.py
Outdated
callback: Callable[[List[Parameter]], SetParametersResult] | ||
) -> None: | ||
""" | ||
Add a callback in front to the list of callback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ivanpauno Can you comment why the C++ implementation inserts new callbacks before the already registered ones?
83230e3
to
1f0d44f
Compare
@jacobperron sir? |
@jacobperron sir now is it okay? |
The same test is still failing for me as I commented in #457 (comment) Can you reproduce the test failure? I am running the following commands to build and test this code:
The second command will limit the test to Please fix the test. |
I think this inadvertently caused a large amount of older commits to get signed by @suab321321... here we discovered that the first commit on this branch was waiting on @dirk-thomas's signoff, causing the DCO failure. This branch is in a rather odd place... way too many changes and way too many commits... They should resolve after a squash merge though, right? |
The PR is only being considered for merging once it has a "clean" commit list. That means only list commits related to the change proposed in this PR. |
Yeah, I think that's wise. Maybe My suggestion here would be:
Does this sound like a good approach? Just thinking out loud here. |
@allenh1 sir now my commits are passing DCO checking..is this needed now? |
@jacobperron sir now it is passing :) |
@dirk-thomas has answered this already:
What I was recommending is a potential way to get this branch to the state required for merging. It doesn't feel right to me to use Anybody have any ideas for fixing this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left some more comments reviewing the test code again.
|
||
self.node.remove_on_set_parameters_callback(self.reject_parameter_callback_1) | ||
|
||
# Now the setting its value again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This suggestion is still valid.
It might be easier to start a fresh branch off of master, copy the files with changes there, and do a single commit. After verifying the changes are the same as upstream, you can force push to this branch. I can do this after my latest comments are addressed. |
Yeah, that's probably the cleanest fix. 👍 |
604a186
to
926364e
Compare
@jacobperron sir is it good now? |
Signed-off-by: Jacob Perron <jacob@openrobotics.org> Signed-off-by: AbhinavSingh <singhabhinav9051571833@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@suab321321 The code looks good to me 👍 I've cleaned up the commit history and will trigger CI now:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the addition @suab321321!
Replaced by new API that supports multiple callbacks introduced in #457. Replaced references to the old API with the new API. Left tests for the old API that should be removed or updated when we remove the deprecated API. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
thanks @jacobperron sir for merging and @allenh1 sir thank you so much for the guidance :) |
Replaced by new API that supports multiple callbacks introduced in #457. Replaced references to the old API with the new API. Left tests for the old API that should be removed or updated when we remove the deprecated API. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@allenh1 now #427 is continued here as my previous repos were a lot messy