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

Make test_tif_loader publish quicker by taking advantage of transient local QOS #58

Open
Ryanf55 opened this issue Jan 20, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Jan 20, 2024

Purpose

The test_tif_loader has a 5 second timer to publish the grid map. The way timers work in ROS is that they aren't executed when constructed; they must go through the first period of time.

The effect is that there is always a 5 second wait before the map shows up in RVIZ.

Goal for this ticket

Make the map publish earlier, as soon as it's ready to be published. Regardless of when RVIZ is started, RVIZ should show the map as soon as it subscribes to the map topic.

Hints

What if you call timer_callback(); at the end of the MapPublisher constructor - seems like it publishes before RVIZ is up and ready to receive the message.
What if you change the quality of service of the publisher to reliable, history length 1, transient local durability to support the following behavior:

To achieve a “latched” topic that is visible to late subscribers, both the publisher and subscriber must agree to use ‘Transient Local’.

Finally, if the QoS is changed on the publisher, rviz should be updated to do the same.

Longer term

grid_map_geo should only publish the map when it changes, rather than on a timer, and take advantage of ROS QoS. Is there a reason we aren't using transient local QoS for the map?

Reference

@Ryanf55 Ryanf55 added enhancement New feature or request good first issue Good for newcomers labels Jan 20, 2024
@Jaeyoung-Lim
Copy link
Member

@Ryanf55 In terrain-navigation, we use a latched topic, so it is only publsihed when subscribed.

For the map publisher node, I think since we are not updating the map in the node, it is actually irrelevant

@Ryanf55
Copy link
Collaborator Author

Ryanf55 commented Jan 20, 2024

@Ryanf55 In terrain-navigation, we use a latched topic, so it is only publsihed when subscribed.

For the map publisher node, I think since we are not updating the map in the node, it is actually irrelevant

Right. What about the map publisher being latched and just removing the timer on publish for consistency in behavior? This will have behavior because as soon as RVIZ boots, it gets the map without the delay it has now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants