Relationship between /scan and /map
I'm running a hector mapping program that opens rviz and maps as you manually move around the map. I subscribe to both /scan and /map to get the laser scan data and the occupancy grid of the map continuously. I was wondering how exactly the relationship between the scan and the occupancy grid works. Does the occupancy grid update 1:1 with our scan? Or does the scan go past our occupancy grid (or vice versa)?
Asked by namayna on 2020-05-19 10:30:46 UTC
Answers
This depends on what settings you use. http://wiki.ros.org/hector_mapping
The description of the map: "Get the map data from this topic, which is latched, and updated periodically " And we having settings such as: "laser_max_dist" and "laser_min_dist".
Does the occupancy grid update 1:1 with our scan? Or does the scan go past our occupancy grid (or vice versa)
No, especially when the scan can likely be 50hz and higher, the map will be updated periodically (this does not mean the algorithm can't process all the scans). In fact, the publish rate of the map is based on the parameter "map_pub_period" which will at default publish the map at 0.5Hz. See here.
If you use laser_max_dist and laser_min_dist with a narrow interval the scan will go far beyond the occupancy grid.
Asked by bob-ROS on 2020-05-19 11:11:42 UTC
Comments
Ah, so in that github code's case, the map will be able to see up to 30 meters away? Also, is there a way to see at what distance map values can be updated (e.g. map can only "see" 20 meters away)?
Asked by namayna on 2020-05-19 13:23:45 UTC
Comments