-
Notifications
You must be signed in to change notification settings - Fork 327
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
Fix deprecation warning in paramater declaration #1280
Conversation
Updated the paramater declaration in `publisher_forward_position_controller` to resolve a deprecation warning. Changes Made: - Replaced `self.declare_parameter(name)` with `self.declare_parameter(name, descriptor=ParameterDescriptor(dynamic_typing=True))` Fixes: ros-controls#1239
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1280 +/- ##
==========================================
- Coverage 80.36% 80.33% -0.03%
==========================================
Files 105 105
Lines 9389 9392 +3
Branches 827 831 +4
==========================================
Hits 7545 7545
+ Misses 1571 1570 -1
- Partials 273 277 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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 your contribution.
One question: Why shouldn't we specify the type of being a PARAMETER_STRING
instead of activating dynamic_typing
?
I opted for dynamic_typing because it is implemented in the As you suggested, I tried using the type during the declaration of parameters, and it works as well: |
Let's use this exact approach. As rather to use |
Updated the paramater declaration to include type in `publisher_forward_position_controller` and `publisher_joint_trajectory_controller` Changes Made: - Replaced `self.declare_parameter(name)` with `self.declare_parameter(name, rclpy.Parameter.Type.DOUBLE_ARRAY)`
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!
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
Updated the paramater declaration in
publisher_forward_position_controller
to resolve a deprecation warning when running the demo usingros2 launch ros2_control_demo_example_1 test_forward_position_controller.launch.py
.Changes Made:
self.declare_parameter(name)
withself.declare_parameter(name, descriptor=ParameterDescriptor(dynamic_typing=True))
Fixes: #1239