fix(joint_state_broadcaster): suppress confusing warning for standard interfaces#2276
Conversation
|
@christophfroehlich, I opened a PR for this issue. Would you be able to review when you have a chance? I am a beginner so any feedback will be appreciated. |
We're here for the community! Either beginner or expert. Welcome aboard to the project, @greencookie-afk! |
|
@thedevmystic thanks buddy i updated it.!! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2276 +/- ##
==========================================
- Coverage 85.01% 84.94% -0.08%
==========================================
Files 145 145
Lines 15234 15359 +125
Branches 1336 1336
==========================================
+ Hits 12951 13046 +95
- Misses 1791 1822 +31
+ Partials 492 491 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
christophfroehlich
left a comment
There was a problem hiding this comment.
Thank you. The changes LGTM, but I ask you to
- clarify the wrong configuration (i.e., when the warning is printed) in the parameter description of
interfacesand joint_state_broadcaster_parameter_context.yml - Add a test for this case to have coverage. You could copy TestCustomInterfaceMapping but run it with a velocity interface parameter.
|
@greencookie-afk ☝️ we still miss the follow up action on this |
i am working on it. |
444d294 to
e0149f8
Compare
|
This pull request is in conflict. Could you fix it @greencookie-afk? |
… interfaces When using standard interfaces like 'velocity' with the default mapping, the warning 'Mapping from velocity to interface velocity will not be done' is confusing because no mapping is actually needed. This change only shows the warning when there's a custom mapping being ignored (i.e., when interface name differs from the JointState field name). Fixes ros-controls#2261
Co-authored-by: Surya! <thedevmystic@gmail.com>
- Add TestStandardVelocityInterfaceNoWarning test that verifies no warning is printed when using standard interface (velocity) without custom mapping - Add TestCustomInterfaceMappingIgnoredWhenVelocityInterfaceIsRequested test that verifies warning IS printed when custom mapping is ignored - Update interfaces parameter description to clarify when warning is printed - Update parameter_context.yml with same clarification Addresses review feedback from christophfroehlich
e0149f8 to
c5653ad
Compare
|
christophfroehlich
left a comment
There was a problem hiding this comment.
The newly added tests do not even build, please have a look
I'm sorry I'll have a look at it again in a cleaner and better way. Kind of new here so it takes time to adjust. |
We are happy to help, but please check as a minimum if your changes build and tests succeed. See https://control.ros.org/rolling/doc/contributing/contributing.html |
f6ebc8b
into
ros-controls:master
Thank you so much everyone |
Description
This PR fixes the confusing warning message from
JointStateBroadcasterwhen using standard interfaces likevelocitywith the default mapping.Problem
When configuring the broadcaster with standard interfaces:
The following confusing warning was displayed:
This warning is confusing because:
velocityfieldSolution
The warning is now only displayed when there's an actual custom mapping being ignored (i.e., when the interface name differs from the JointState field name).
For example, if someone had:
Then the warning would still be shown because the custom mapping
custom_velocity_interface->velocitywould be ignored.But for the standard case where
interfaces: [velocity]and the default mappingvelocity->velocity, no warning is shown because no mapping is needed.Changes
joint_state_broadcaster.cppto only print the warning wheninterface != interface_to_mapRelated Issue
Fixes #2261