Layered Costmaps for Context-Sensitive Navigation
David V. Lu, Dave Hershberger, and William D. Smart
Abstract— Many navigation systems, including the ubiquitous
ROS navigation stack, perform path-planning on a single
costmap, in which the majority of information is stored in
a single grid. This approach is quite successful at generating
collision-free paths of minimal length, but it can struggle in
dynamic, people-filled environments when the values in the
costmap expand beyond occupied or free space.
We have created and implemented a new method called
layered costmaps, which work by separating the processing of
costmap data into semantically-separated layers. Each layer
tracks one type of obstacle or constraint, and then modifies a
master costmap which is used for the path planning. We show
how the algorithm can be integrated with the open-source ROS
navigation stack, and how our approach is easier to fine-tune
to specific environmental contexts than the existing monolithic
one. Our design also results in faster path planning in practical
use, and exhibits a cleaner separation of concerns that the
original architecture. The new algorithm also makes it possible
to represent complex cost values in order to create navigation
behavior for a wide range of contexts.
I. INTRODUCTION
Navigation algorithms have become increasingly sophisti-
cated over the decades. They can process large amounts of
sensor data to keep track of the locations of obstacles and
free space with great accuracy. Combined with the right path
planners, they can navigate robots around their environments
with great skill. However, many of these navigation algo-
rithms suffer from the same problem: the algorithms optimize
based on the single constraint of finding efficient collision-
free paths.
Such an algorithm is fine for many use cases, or for
navigation in the abstract, if all that matters is getting from
point A to point B. It is not sufficient for other use cases.
For robots moving in dynamic environments populated with
people, more complex constraints need to be integrated into
the optimization. Moving from one point to another is just
one part of a larger context. It is not enough that a robot
moves around an obstacle just to avoid a collision; the robot
must treat that obstacle differently because of what it is
semantically. For example, driving a few centimeters away
from a table is perfectly fine in most cases. However, driving
that closely to a person is socially undesirable. Yet, if the
navigation algorithm treats all sensed obstacles equally, there
is no way for the path planner to be able to choose one path
over the other.
Lu is a PhD candidate in the Dept. of Computer Science at Washington
University, St. Louis, Missouri, 63130. davidlu@wustl.edu
Hershberger contributed to this work while he was a research scientist at
Willow Garage, Inc. Menlo Park, CA hersh@gmail.com
Smart is faculty in the Department of Mechanical Engineering, Oregon
State University. bill.smart@oregonstate.edu
Fig. 1. A stack of costmap layers, showcasing the different contextual
behaviors achievable with the layered costmap approach.
There are many additional scenarios, beyond respect-
ing people’s personal space, where choosing the shortest
collision-free path may not be optimal. Given information
about where people often are, a longer path that avoids
probable obstacles may be preferable. The robot must also
consider the utility of entering potentially hazardous areas,
such as kitchens, which are valid paths, but they come with
a cost. Even simple factors like driving on the right side of
a hallway will need to be considered. Which path the robot
takes will depend on having additional information about the
larger contexts.
The information about the environment that the path
planners use is stored in a costmap. In a traditional costmap,
all of the data is stored in the singular grid of values, in what
we term a monolithic costmap. The monolithic costmap has
been the prevailing technique because of its simplicity, in
that there is only one place to read values from and write
values to. One result of this is that a great deal of semantic
information about the values in the costmap is lost, which
makes proper maintenance of the costmap from cycle to
cycle more difficult.
In this paper, we introduce our solution for incorporating
the additional semantic information into costmaps, with
a new approach called layered costmaps. Using the ROS
Navigation framework as a starting point, we show that the
layered costmaps replicate the functionality of the previous
navigation algorithm, while adding the flexibility to handle