Rosanswers logo

Hi all,

my goal is to navigate a robot (locally - in odometry frame) using one laser scanner. Moreover I will have some additional restrictions - areas where the robot should not go. I found here two related questions (please let me know if I missed any):

Generating artificial sensor data seems to be sufficient but bit hacky in my opinion... Is this something which might be solved using layered costmaps? Or is there any other good approach? Thanks in advance.

Originally posted by ZdenekM on ROS Answers with karma: 704 on 2013-06-27

Post score: 0


2 Answers 2


Rosanswers logo

As the author of the first question and layered costmaps, yes, layered costmaps are a good solution for the problem.

Originally posted by David Lu with karma: 10932 on 2013-06-27

This answer was ACCEPTED on the original site

Post score: 0

Original comments

Comment by ZdenekM on 2013-06-27:
Ok, thanks for hint. Is there any documentation or examples how to work with layered costmaps?

Comment by David Lu on 2013-06-27:
This is the best I can point you to at the moment: http://ros.org/wiki/costmap_2d/hydro


Rosanswers logo

Here's an example layering a static map on top of your usual obstacle + inflation local costmap


    - {name: static_map, type: "costmap_2d::StaticLayer"}
    - {name: obstacles, type: "costmap_2d::ObstacleLayer"}
    - {name: inflation, type: "costmap_2d::InflationLayer"}
  global_frame: odom
  robot_base_frame: base_link
  transform_tolerance: 5.0
  update_frequency: 5.0
  publish_frequency: 2.0

      observation_sources: laser_scan_sensor
      laser_scan_sensor: {sensor_frame: base_link, data_type: LaserScan, topic: scan, marking: true, clearing: true}

More details on the types of layers supported can be found here:

Originally posted by Rufus with karma: 1083 on 2020-04-23

This answer was NOT ACCEPTED on the original site

Post score: 1


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.