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

Implementation details about costmap_2d package

asked 2014-12-07 15:55:28 -0500

NiranjanDeshpande gravatar image

Hello everyone,

I am a newbie in programming and ROS, so please pardon me if my queries sound naive.

I am working on using semantic information for robot navigation. I have a conceptual architecture ready and would like to implement it using ROS. For this as a beginning step what I would like to do is as follows:

Inflate each obstacle with different inflation radii, and not one common inflation radius set by user.

I am planning to implement an object of costmap_2d and write a method to fill in costs based on the inflation radius specified for that object.

However, since I am a beginner, I am not able to understand the implementation part. Like once the instance of costmap_2d is created in move_base (i guess) what are the implementation steps involved to fill it with cost values and finally publish it to the planner. Is there any documentation existing for the same? Or if some one could guide me with the same?

Thank you in advance and any help/suggestion would be highly appreciated.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-12-08 23:02:18 -0500

David Lu gravatar image

updated 2014-12-09 22:29:16 -0500

This sounds like a perfect use case for layered costmaps. For details check out my paper on the subject as well as my ROSCON talk.

For implementation details, check out the tutorials here.

Edit: 1) The layers can build off of each other when updating values. 2) Correct.

edit flag offensive delete link more

answered 2014-12-09 09:01:00 -0500

NiranjanDeshpande gravatar image

Great. I am already referring the paper you mentioned. However, regarding implementation I had some queries as am new to programming and ROS. The queries are as follows:

  1. Is it possible to use information of one layer into another? Say for example, I have layer 1 and layer 2 storing different informations. Now, I want to use the information in layer 1 (along with some more semantic information) to build layer 2. And in the layered_costmap, the information in layer 2 will be updated (and not layer 1's information).

  2. As far as I could understand till now after looking into the code, the final layered_costmap instance which is fed to the planner stores cost information in the range of 0-255. Is that the case?

edit flag offensive delete link more


Please don't respond to answers with answers of your own. Either comment on the answer or update your post.

David Lu gravatar image David Lu  ( 2014-12-09 22:27:52 -0500 )edit

Question Tools

1 follower


Asked: 2014-12-07 15:55:28 -0500

Seen: 1,899 times

Last updated: Dec 09 '14