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 costmap update not being published on force updates #93

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

siferati
Copy link

@siferati siferati commented Jan 31, 2024

Description

Costmap2DROS::updateMap is a public method that other components can call to force an update to happen outside of the usual Costmap2DROS::mapUpdateLoop.

Since Costmap2DPublisher::updateBounds is only called inside Costmap2DROS::mapUpdateLoop, this means that when forcing a costmap update we are not updating the bounds of the publisher and thus will result in wrong visualization.

To fix this, we have to ensure the bounds of the publisher are also updated on force updates.
This can be achieved by moving the logic for updating the publisher bounds to be inside Costmap2DROS::updateMap.

Notice in the video below how there's wrong information remaining in the costmap after a force update.
This PR fixes that.

route_dev_layer_bug.mp4

@siferati siferati force-pushed the tiago/fix_update_viz branch from 2ba39d2 to ed7dc66 Compare January 31, 2024 02:44
@siferati siferati merged commit 8f79b4f into devel Feb 1, 2024
1 check passed
@siferati siferati deleted the tiago/fix_update_viz branch February 1, 2024 00:15
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