-
Notifications
You must be signed in to change notification settings - Fork 277
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
view_frames.py - missing else clause? #507
Comments
@FSund The scripts is based on the assumption that there is always minimal one root frame, which has no parent. As the data contains all the childs. If the parent of a child exists in the data, then that parent, can't be the root. As that parent has a parent too. So there is something incorrect with the incomming data in your run. |
Indeed it looks like a small bug in that it's assuming that there's a root frame. If you're hitting this it does suggest that the tree is malformed and cyclic. Likely the simplest thing to do is to catch it and print the error. It's possible that the rendering could be extended to detect cycles and highlight it with coloring in the graph. Either of these solutions would be appreciated. Though since this only occurs in invalid states it's a relatively low priority. We'd rather improve the logic in the ROS 2 version: https://github.com/ros2/geometry2/blob/ros2/tf2_tools/tf2_tools/view_frames.py |
Should there be an else here?
https://github.com/ros/geometry2/blob/noetic-devel/tf2_tools/scripts/view_frames.py#L71-L72
I ran into an issue with this on a buggy config I had running just now. There are problems with this config, but having no else seems error-prone as well.
The text was updated successfully, but these errors were encountered: