Ask Your Question
0

Proper way of subsribing to a costmap_2d OccupancyGrid

asked 2016-04-12 12:16:21 -0600

doisyg gravatar image

Hi, I am using the costmap_2d_node to build a local costmap from a Lidar. I can view the local costmap properly in Rviz. What I don't understand is that the topic /costmap of type OccupancyGrid is only published once, no matter how high I set the value of the publish_frequency parameter. I see that there is a /costmap_updates topic of type OccupancyGridUpdate and I guess there is a proper way of subcribing to the local costmap through it but i did not find any information about it. For instance, what mechanism Rviz uses to display the live costmap?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-04-14 06:18:36 -0600

doisyg gravatar image

Solved by subscribing to costmap_updates topic, example here: https://github.com/DLu/navigation/blo...

edit flag offensive delete link more

Comments

But I would still be interested to have more information abou the underlying mechanism.

doisyg gravatar imagedoisyg ( 2016-05-26 07:46:11 -0600 )edit

What do you mean by the underlying mechanism?

David Lu gravatar imageDavid Lu ( 2016-05-26 08:56:10 -0600 )edit

How does Rviz get the full costmap in the first place? And also what is the influence of the publish_frequency parameter since it doesn't seem to have any impact on the /costmap topic.

doisyg gravatar imagedoisyg ( 2016-05-26 09:24:57 -0600 )edit

Rviz subscribes to both topics (costmap and costmap_updates). publish_frequency changes how frequently it publishes the update topic. There is an (undocumented) parameter called always_send_full_costmap.

David Lu gravatar imageDavid Lu ( 2016-05-26 10:03:44 -0600 )edit

Thanks, i didn't know about the always_send_full_costmap param, it can be very useful. But then what is the difference between publish_frequency and update_frequency? I thought it was update_frequency which was controlling the costmap_updates topic rate.

doisyg gravatar imagedoisyg ( 2016-05-26 10:33:14 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-04-12 12:15:41 -0600

Seen: 209 times

Last updated: Apr 14 '16