Skip to content
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

Open
wants to merge 4 commits into
base: humble
Choose a base branch
from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jan 9, 2025

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

TF_NAN_INPUT: Ignoring transform for child_frame_id "tool0_controller" from authority "Authority undetectable" because of a nan value in the transform (nan nan nan) (nan nan nan nan)

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.

…a tf for it (#1479)

(cherry picked from commit 67096bd)

# Conflicts:
#	pose_broadcaster/test/test_pose_broadcaster.hpp
@mergify mergify bot added the conflicts label Jan 9, 2025
Copy link
Contributor Author

mergify bot commented Jan 9, 2025

Cherry-pick of 67096bd has failed:

On branch mergify/bp/humble/pr-1479
Your branch is up to date with 'origin/humble'.

You are currently cherry-picking commit 67096bd.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   pose_broadcaster/src/pose_broadcaster.cpp
	modified:   pose_broadcaster/test/test_pose_broadcaster.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   pose_broadcaster/test/test_pose_broadcaster.hpp

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

bmagyar
bmagyar previously approved these changes Jan 10, 2025
Copy link
Member

@saikishor saikishor left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants