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

Lidar and Sonar do not update the costmap

asked 2019-01-29 07:40:12 -0500

stevemartin gravatar image

Hi,

I have Lidar and Sonar readings and they clearly work as they see the obstacles: image description

But as you can see, local costmap does not show the obstacle and robot just hits the object infront of it.

Here is my common_costmap_params:

obstacle_range : 2.5
raytrace_range : 3.0

robot_radius: 0.07
#footprint: [[0.3, 0.15], [0.3,-0.15], [-0.3, -0.15], [-0.3, 0.15]]
#footprint_padding: 0.1


static_layer:
  enabled: true
  map_topic: map
  subscribe_to_updates: true

inflation_layer:
  enabled: true
  inflation_radius: 1.75 # 1.45
  cost_scaling_factor: 2.58

obstacle_layer:
    enabled: true
    obstacle_range: 2.5
    raytrace_range: 3.0
    inflation_radius: 0.2
    track_unknown_space: true
    observation_sources: laser
    laser: {data_type: LaserScan, sensor_frame: laser_link, clearing: true, marking: true, topic: /scan}

range_sensor_layer:
  clear_threshold:    0.46
  mark_threshold:     0.98
  no_readings_timeout: 2.0
  topics: ["/sonar"] # ["sonar1","sonar2"] for multiple

And my local_costmap_params:

local_costmap:
  global_frame: map
  robot_base_frame: base_footprint
  update_frequency: 5.0
  publish_frequency: 2.0
  transform_tolerance: 5 # 0.25 seconds of latency, if greater than this, planner will stop
  static_map: true
  rolling_window: true # Follow robot while navigating
  width: 4.0
  height: 4.0
  origin_x: 0 #-1.5
  origin_y: 0 #-1.5
  resolution: 0.03

plugins:
  - {name: static_layer, type: "costmap_2d::StaticLayer"}
  - {name: range_sensor_layer, type: "range_sensor_layer::RangeSensorLayer"}
  - {name: inflation_layer, type: "costmap_2d::InflationLayer"}
  - {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"}
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-07-05 02:32:10 -0500

Syrine gravatar image

Hi,

Your local map shouldn't be static, I'd remove the static layer plugin from the local_costmap_params and see what happens

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-01-29 07:40:12 -0500

Seen: 348 times

Last updated: Jul 05 '19