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

Fix for tf display not loading frame config #946

Merged
merged 1 commit into from
Dec 10, 2015
Merged

Fix for tf display not loading frame config #946

merged 1 commit into from
Dec 10, 2015

Conversation

bponsler
Copy link
Contributor

@bponsler bponsler commented Dec 3, 2015

This is a fix for issue #834 using the changes from PR #938 by @arntanguy with the following modifications:

  1. Rather than adding a new frame and setting the enabled state of the frame immediately when reading the config, the enabled state for each specified frame is stored in a map.
  2. Whenever a frame is being added to the display it looks up its enabled state in the map, and if it was configured as disabled the frame is set to be disabled.

Because no new frames are created when loading the config this properly handles the case where frames specified in the config file are not published at the time the config is read mentioned in PR #938.

This also handles the case (mentioned by @hersh) where the set of frames specified in the config file are different than the set of frames being actively published. Since no new frames are created based on the config file only the intersection of those two sets will have their enabled state modified, and only the frames being actively published will be added to the display.

…perly read from the config file. Updated the display to read the value, store the values in a map, and use the map to update the enabled/disabled state of the frame once the frame is added. This properly handles frames which are not published at the time the tf display is created.
@arntanguy
Copy link
Contributor

Thanks @bponsler. I've just given this a quick test on some of my complex use cases with a humanoid robot, and real-life situations with intense use of the tf graph. As far as I can see, this seems to work as expected and provide a decent simple solution to this longstanding problem.

@wjwwood
Copy link
Member

wjwwood commented Dec 10, 2015

I tested this out locally and it works great for me too. I think the code changes make sense too. So I'm going to merge this and close #938 in favor of this.

Thanks @bponsler and @arntanguy for your work on this!

wjwwood added a commit that referenced this pull request Dec 10, 2015
Fix for tf display not loading frame config
@wjwwood wjwwood merged commit 39bd4be into ros-visualization:indigo-devel Dec 10, 2015
@bponsler bponsler deleted the tf-load-frames branch January 18, 2016 06:38
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.

3 participants