Ask Your Question
0

how to clear local cost map?

asked 2017-12-28 01:53:01 -0500

wings0728 gravatar image

I use sonar-layer in my local cost map, but I cant clear the layer.

local_costmap:
  global_frame: /odom
  robot_base_frame: /base_footprint
  update_frequency: 10.0
  publish_frequency: 0.5
  static_map: false
  rolling_window: true
  width: 3.5
  height: 3.5
  resolution: 0.05
  transform_tolerance: 1.0

  plugins:
    - {name: static_map,      type: "costmap_2d::StaticLayer"}
#- {name: obstacles,       type: "costmap_2d::ObstacleLayer"}
    - {name: sonar,           type: "range_sensor_layer::RangeSensorLayer"}
    - {name: inflation_layer, type: "costmap_2d::InflationLayer"}
  sonar:
    topics: ['/sonar_0', '/sonar_1','/sonar_2', '/sonar_3', '/sonar_4', '/sonar_6', '/sonar_7', '/sonar_8', '/sonar_9', '/sonar_10', '/sonar_11']  
    no_readings_timeout: 0.0
    clear_threshold: 0.0
  inflation_layer:
    inflation_radius: 0.10

when obstacle , sonar-layer cant clear the obstacle. My robot cant move.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-03-08 00:18:36 -0500

did you try

rosservice call /move_base/clear_costmaps "{}" ?

edit flag offensive delete link more

Comments

Hi, does this clear both costmaps? Or only the local costmap? I think even if it clears both, the global costmap upon reinflation would be identical to previous one, so effectively only the local costmap would be reset. Do you think this is true?

parzival gravatar image parzival  ( 2021-04-06 03:22:25 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-12-28 01:53:01 -0500

Seen: 1,583 times

Last updated: Mar 08 '18