0
$\begingroup$

Rosanswers logo

Dear all,

I am working on implementing the navigation stack on a robot, and was wondering about the update behaviour of costmap_2d.

My global costmap is receiving a 2D SLAM map from Cartographer over the /map topic. Does this map update, and if yes how frequently?

So far this was the only documentation I managed to find, which was written way back in Hydro, so was wondering if the interface has remained the same. I have gone through the official wiki tutorials as well as the tuning guide by Kaiyu Zheng, would much appreciate more of such guides :)

Thanks!


Originally posted by JunTuck on ROS Answers with karma: 87 on 2020-07-06

Post score: 1


Original comments

Comment by Dragonslayer on 2020-07-06:
To me it seems (never checked) that the map parameter "static" uses a service instead of a constantly published topic to get the map only once. When using regular published topics the same behaviour seems to be possible with map_topic and first_map_only parameters set. I seem to remember that the parameter subscribe_to_updates means that changes in the map (slam) are transported in the sub-topic updates and added to the map (not a full new map is received). What works for you is dependent on your setup. The usual navigation stack (gmapping, amcl) uses the map_server thus service, thus static map.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The static map will update at any rate as new maps come in (its a callback, not polling) as long as you have subscribe_to_updates parameter set to true.

For ROS2, we have a number of parameter guides https://navigation.ros.org/configuration/index.html


Originally posted by stevemacenski with karma: 8272 on 2020-07-06

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.