-
Notifications
You must be signed in to change notification settings - Fork 343
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
[pose_broadcaster] Check for valid pose before attempting to publish a tf for it (backport #1479) #1483
Conversation
Cherry-pick of 67096bd has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
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
Thanks for fixing the API calls
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## humble #1483 +/- ##
==========================================
+ Coverage 66.74% 66.76% +0.01%
==========================================
Files 113 113
Lines 13333 13376 +43
Branches 8246 8274 +28
==========================================
+ Hits 8899 8930 +31
Misses 1438 1438
- Partials 2996 3008 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Deactivate the controller otherwise
When using the pose_broadcaster e.g. with mock hardware, the pose state interfaces might not contain any value (NaN), if there are no initial values inside the URDF. However, it might not make sense to set an initial value as this would be plain wrong information. Imagine a robot-calculated forward kinematics that generates that pose. Initializing this to any fixed value will just be wrong. IMHO it would be better to explicitly state that there is no valid information available.
Currently, attempting to publish a tf with no pose information will result in spamming the shell with
In this PR I added a check for a valid pose before attempting to publish a tf and return an error in case of an invalid pose.
This is an automatic backport of pull request #1479 done by Mergify.