ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Costmap_2d update_frequency parameter

asked 2019-08-20 02:37:52 -0500

schizzz8 gravatar image

Hi all,

My question is rather theoretical, as I'd like to have more insight on how the costmap_2d actually works. In particular, I have a doubt regarding the update frequency of the map.

In the wiki it is the specified that:

The costmap performs map update cycles at the rate specified by the update_frequency parameter. Each cycle, sensor data comes in, marking and clearing operations are perfomed in the underlying occupancy structure of the costmap, and this structure is projected into the costmap where the appropriate cost values are assigned as described above.

Now, assuming that I set an obstacle layer to incorporate information from a 2D laser scanner, what happens when the update_frequency of the costmap doesn't match the sensor rate?

E.g., if a laser scan is published at 10Hz and the update_frequency is 20Hz, I guess that the costmap can only take the last acquired scan (which is somehow "old"). But, if a laser scan is published at 10Hz and the update_frequency is 5Hz does the same happen again or scans are aggregated and processed in sequence?

I hope my question is clear. Thanks in advance for every hint that can help me clarify this aspect.

edit retag flag offensive close merge delete


why you just dont test it?

june2473 gravatar image june2473  ( 2019-08-20 03:48:07 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-08-20 16:06:30 -0500

David Lu gravatar image

If the update frequency is greater than the sensor frequency, there will just be many cycles where there are no changes to the costmap.

If the sensor frequency is greater than the update frequency (which is generally true), the sensor messages are buffered and applied during the update.

edit flag offensive delete link more

Question Tools



Asked: 2019-08-20 02:37:52 -0500

Seen: 522 times

Last updated: Aug 20 '19