ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Your code looks reasonable. The waitForTransform might not be needed if the static transform information has already been recieved. However you should keep it to be robust to things like network delays in cases like node startup where the static transforms have not been recieved by the node yet.

You should also never make the assumption that your code will always only be traversing a static part of the tree. It's quite possible that you or someone else will try to use this code at another time in the future with a different laser position and if that is in a different link your assumptions about the tf tree may be invalid.

If you have a static transform segment only waitForTransform will return immediately for any time query so it will only cost you the check that everything is connected which is relatively light weight.