Ask Your Question
1

static layer on local costmap

asked 2015-01-07 21:11:42 -0500

aswin gravatar image

updated 2015-01-07 22:27:37 -0500

Hi, I would like to use a static layer (in /map i.e. global frame) in the local costmap. So when the robot moves, I want the lethal obstacles in this static layer that are also in the local costmap, to be inflated. How do I do this?

I know static layers are usually added in the global costmap, but for a special case I want the local planner to access this information.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-01-08 01:46:57 -0500

fergs gravatar image

There are currently issues with the static_layer and rolling costmaps. A (unmerged) pull request that may fix this can be found here: https://github.com/ros-planning/navig... .

edit flag offensive delete link more

Comments

Doesnt seem to work, or maybe its trying to solve something else. For now, I havegot this to work in two ways:

1) Create a custom layer and mark all intersection points between a static layer and master layer

2) Publish the static map as a sensor(pointcloud) in /map frame for use by ObstacleLayer

aswin gravatar image aswin  ( 2015-01-08 23:21:17 -0500 )edit
0

answered 2020-04-23 05:09:24 -0500

Rufus gravatar image

updated 2020-04-23 20:16:41 -0500

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:

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2015-01-07 21:11:42 -0500

Seen: 1,685 times

Last updated: Apr 23 '20