-
Notifications
You must be signed in to change notification settings - Fork 160
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
refactor: make ros2param use rclpy.parameter_client #716
Conversation
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.
The refactor makes sense to me 👍
There are still large swathes of code like this) scattered throughout which look like they should be replaced with |
Running again with increased timeout and more |
CI is passing for this PR, failures unrelated |
Just to be clear, that does not seem to be the case. All of the nightly builds on Linux and Windows are green, and the last CI was not, so it does look like there is breakage here. |
@clalancette Windows error seemed to be a weird flaky test. Yellow because of downstream linting error on one of my related PRs I'm still working on. |
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.
The behavior for ros2 param list
is much better now, thanks!
Signed-off-by: Brian Chen <brian.chen@openrobotics.org>
Signed-off-by: Brian Chen <brian.chen@openrobotics.org>
Signed-off-by: Brian Chen <brian.chen@openrobotics.org>
Signed-off-by: Brian Chen <brian.chen@openrobotics.org>
Signed-off-by: Brian Chen <brian.chen@openrobotics.org>
Signed-off-by: Brian Chen <brian.chen@openrobotics.org>
Signed-off-by: Brian Chen <brian.chen@openrobotics.org>
Signed-off-by: Brian Chen <brian.chen@openrobotics.org>
Signed-off-by: Brian Chen <brian.chen@openrobotics.org>
Signed-off-by: Brian Chen <brian.chen@openrobotics.org>
Signed-off-by: Brian Chen <brian.chen@openrobotics.org>
Signed-off-by: Brian Chen <brian.chen@openrobotics.org>
Signed-off-by: Brian Chen <brian.chen@openrobotics.org>
This reverts commit 20ba9fe. Signed-off-by: Brian Chen <brian.chen@openrobotics.org>
Co-authored-by: Jacob Perron <jacob@openrobotics.org> Signed-off-by: Brian Chen <brian.chen@openrobotics.org>
Co-authored-by: Jacob Perron <jacob@openrobotics.org> Signed-off-by: Brian Chen <brian.chen@openrobotics.org>
476a917
to
8d271ce
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.
LGTM with green CI
I was using load_parameter_dict and was wondering where it went? I noticed commit fc02ffe removes it, but without a note to where it went. I checked rclpy but couldn't find it. Was there a rational why this was removed? |
@Kaju-Bubanja This internal api was deprecated in favor of rclpy's from rclpy.parameter_client import AsyncParameterClient
client = AsyncParameterClient(node, node_name)
future = client.set_parameters(list(param_dict.values()))
rclpy.spin_until_future_complete(node, future)
response = future.result()
# ... and so forth Reference:
|
@ihasdapie Any reason for that? Did something not work with the function or cause problems? Otherwise I don't see why a perfectly fine function should be removed. |
The methods in ros2param duplicated code and had inconsistent implementations which this refactor addressed. Plus, we didn't anticipate external users using the internal ros2param methods. If you think that this method should be put back into ros2param feel free to open a PR and we can discuss there, but in my opinion the current design consolidating the parameter management logic in |
Hmmm, I found the
|
Use
rclpy.parameter_client
from instead of internal implementation (Related PR: ros2/rclpy#945) to avoid duplicate logic. Certain functions (e.g.get_parameter_value
) are moved over torclpy
andros2param
. Behavior ofros2param.api
is left unchanged.I'd like some review on the proposed architecture & implementation before I clean things up and write tests etc.