Multiple costmaps

1,468 views
Skip to first unread message

Rein Appeldoorn

unread,
Nov 14, 2013, 3:25:39 AM11/14/13
to ros-sig-n...@googlegroups.com
Hi all,

I'm currently working with the costmap_2d package and I really like the way it is set-up with use of different layers/plugins. However, all layers are now add up to one single costmap which forms the interface to the planner. 

In my implementation, I would like to provide multiple costmaps to my planners so that the costmaps still hold semantics, for example:

- Risk costmap (Uncertain area layer, PNF layer (based on dynamic obstacles - http://poftwaresatent.net/pdf/philippsen--et-al--ws-icra2008.pdf), inflation layer)
- Obstacle costmap (Static layer, obstacle layer, inflation layer)

I could create multiple layered costmaps with different plugins to realize this; but I don't know if this is the best option.

What are you guys thoughts about this? Have you ever provided multiple costmaps to your planners? 

Kind regards,

Rein

David Lu!!

unread,
Nov 17, 2013, 2:42:01 PM11/17/13
to ros-sig-n...@googlegroups.com
Hey Rein,

So the navigation stack already does have multiple costmaps (global
and local) but that's not really what you're asking about, I think.

If the two costmaps are used for wholly separate planning, then
creating multiple costmaps is fine. However, if you want to integrate
the information from the risk costmap into the obstacle costmap but
using different semantics for the values, I think the better way is to
A) Create one layered costmap
B) Figure out the semantics of translating that costmap's values to the other.
C) Create a layer that interfaces with the first costmap
D) Use that layer in the costmap you use for planning.

Does that answer your question?

-David!!
> --
> You received this message because you are subscribed to the Google Groups
> "ros-sig-navigation" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ros-sig-navigat...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Jorge Santos

unread,
Nov 17, 2013, 7:39:48 PM11/17/13
to ros-sig-n...@googlegroups.com
Sounds interesting; David, your answer reminds me that I don't really know how multilayer costmaps works. I just imagined that the costmap of the different layers get accumulated (add) in a final costmap what is the one the planner uses. So if this is the case, cannot Rein just create a risk layer that penalizes risky areas with low cost values that will make the planner avoid them if possible? (and the controller drive slower).
Btw, is the multilayer costmaps working explained somewhere? Mostly I would like to know how the layers are combined before being used.

Thanks!

Rein Appeldoorn

unread,
Nov 18, 2013, 4:27:07 AM11/18/13
to ros-sig-n...@googlegroups.com
Thanks David,

I was already thinking of implementing such an approach as you suggested. However, the current costmap_2d implementation does not really provide a map with a true semantic meaning. Due to the inflation; applied in the inflation layer: http://wiki.ros.org/costmap_2d?action=AttachFile&do=get&target=costmapspec.png. The buffer zone of the inflation kernel, the exponentional decay, is just an approximation and doesn't really model a specific phenoma but specifies planning behavior: clearance to obstacles.

I would like to use the costmap_2d package to create a costmap which explicitly models the probability of being in a collision. My set-up for this layered costmap would be as follows:

- Static layer (OccupancyGrid from the Octomap_server (2D-projection of the highest occupancy value per column)) -- (Also models the unknown areas with a occupancy of 0.5)
- Obstacle layer (Recent sensor data, occupancy of 1)
- World model layer (People and object trackers (dynamic obstacles - http://poftwaresatent.net/pdf/philippsen--et-al--ws-icra2008.pdf) )
- Inflation layer (Inscribed radius kernel, circumscribed radius kernel, Localization uncertainty kernel (AMCL), Actuation uncertainty kernel (Odometry))
- Footprint layer

What do you think of such an approach?

@Jorge:

- I just imagined that the costmap of the different layers get accumulated (add) in a final costmap what is the one the planner uses : This is not entirely true since at the updateCost step, it passes a pointer to the master_grid. The inflation layer for example reads the master_grid and inflates it witch a specific kernel. It does not keep track of a separate costmap.

- So if this is the case, cannot Rein just create a risk layer that penalizes risky areas with low cost values that will make the planner avoid them if possible? I think this is indeed the way to go (see suggested approach)

- Btw, is the multilayer costmaps working explained somewhere? If you take a look at the updateMap function of the Layered costmap class, you can see how the separate layers are combined. Basically it consists of two steps:
1) updateBounds, 2) UpdateCosts. These functions are being called for every loaded plugin/layer. There are also two tutorials on how to create and work with the layered costmap structure: http://wiki.ros.org/costmap_2d/Tutorials

Thanks,

Rein






-Rein

David Lu!!

unread,
Nov 19, 2013, 3:16:34 PM11/19/13
to ros-sig-n...@googlegroups.com
First, if anyone is interested, I have a paper in review that
thoroughly explains the layered costmap algorithm. Contact me if you
want a version.

@Rein
Your points to Jorge were spot on. I think you have the right idea for
the inflation layer, but just to specify further: the semantic meaning
of points in the costmap that have the value INFLATED_OBSTACLE_COST is
points where if the robot's center is at this point, some part of the
robot WILL be in collision. Values greater than the circumscribed cost
are places where the robot might be in collision at some orientation.
You're completely correct though that exponential decay is arbitrary.
It does less than the diagram you linked to would make it seem.

Adding a layer to your setup like you described should work fine. The
only reason I suggested making a layer of layers is if you wanted to
combine multiple layers using strictly probabilistic models. However,
since the static/obstacle layers fit into the probabilistic model, it
should be fine to just use one simple layer.

I'm happy to see others really digging into this code, so please let
me know if you have other questions.

-DL!!
Reply all
Reply to author
Forward
0 new messages