Layered costmaps is a method to create and update maps for robot navigation and path planning proposed by David V. Lu in 2014. During robot navigation, layered costmaps can abstract the realistic environment around the robot into maps that can be comprehended by robot navigation methods. The method consists of more than one layer of costmaps, each of which describes obstacles with different properties. Each layered costmap consists of grids and is represented as a matrix, the values of the matrix elements are related to the risks of grids (the higher the value,the greater the risk and the deeper the colour in the grid). In the layered costmap, the colour of a grid indicates the risk of moving through that grid. There is a high probability of robot collision when the robot moves through a grid with deep colour. When updating a layered costmap, only the area covered by the sensors (such as Lidar) in the map is updated, rather than the entire map.
Standard Layers Layered costmaps is a flexible method, and special categories of layered costmaps can be designed and added to the method depending on the navigation environment of the mobile robot. In Robot Operating System (ROS), some categories of layered costmaps are provided for mobile robot navigation, and they are also the standard layers that are added in most cases.
Static Map Layer The static map layer is at the bottom among all layered costmaps, and it includes the situation of all known static obstacles in the environment before navigation starts. The static map layer can be generated with a SLAM algorithm or can be created from an architectural diagram. If in the static map matrix M s t a {\displaystyle M^{sta}} , the real location ( x w , y w ) {\displaystyle (x^{w},y^{w})} corresponds to the element index ( x , y ) {\displaystyle (x,y)} , then an example of the static map layer defining rules is as follows:
M x , y s t a = { 254 ( x w , y w ) is occupied 0 otherwise {\displaystyle M_{x,y}^{sta}={\begin{cases}254&(x^{w},y^{w}){\text{ is occupied}}\\0&{\text{otherwise}}\end{cases}}\;}
Obstacles Map Layer The obstacles map layer describes the situation of obstacles detected by sensors during robot navigation. Since the observation distance of the sensor is limited, the obstacles map layer can only be updated in the observation area of the sensor. Assume that there is only one sensor in the scene and it is equipped on the robot, its observation area is a square with side length 2 L {\displaystyle 2L} , and the location of the robot is ( x r , y r ) {\displaystyle (x^{r},y^{r})} . If in the obstacles map matrix M o b s {\displaystyle M^{obs}} , the real location ( x w , y w ) {\displaystyle (x^{w},y^{w})} corresponds to the element index ( x , y ) {\displaystyle (x,y)} , then an example of the obstacles map layer defining rules is as follows:
M x , y o b s = { 254 ( x w , y w ) is occupied 0 otherwise {\displaystyle M_{x,y}^{obs}={\begin{cases}254&(x^{w},y^{w}){\text{ is occupied}}\\0&{\text{otherwise}}\end{cases}}\;}
… excerpt ends here. Continue reading the full article.




![Layered costmaps: A schematic of the navigation algorithm.[7]](https://upload.wikimedia.org/wikipedia/commons/c/c2/A_figure_in_Real-Time_Avoidance_of_Ionising_Radiation_Using_Layered_Costmaps_for_Mobile_Robots.png?utm_source=en.wikipedia.org&utm_campaign=parser&utm_content=thumbnail_unscaled)

