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

Using a static costmap for local navigation

asked 2017-06-27 04:07:56 -0600

Zabot gravatar image

I want to use a static map provided by map_server to populate the obstacles used for both global and local navigation by move_base (Assuming a completely static environment, no dynamic obstacles). Using the exact same parameters for both the local and the global map produces different results. The global costmap behaves as expected, being populated with inflated obstacles, while the local costmap remains empty. As such global navigation plans look excellent while execution involves locally optimizing the route through walls.

local_costmap: # And also global_costmap
  robot_radius: 0.2
  inflation_radius: 0.2
  global_frame: /odom_fused
  robot_base_frame: base_link
  update_frequency: 10.0
  static_map: true
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-04-23 05:09:36 -0600

Rufus gravatar image

You'll have to manually mix in the desired plugins to achieve what you need.

Place the following In your local_costmap_params.yaml

local_costmap:
  plugins: 
    - {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

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

The costmap_2d::StaticLayer plugin allows you to specify a static layer in your local_costmap The costmap_2d::ObstacleLayer and costmap_2d::InflationLayer does what the original local costmap does, marking and clearing and inflating obstacles, note the similarity for the parameters.

More details can be found here: https://github.com/ros-planning/navig...

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2017-06-27 04:07:56 -0600

Seen: 806 times

Last updated: Apr 23 '20