Lidar and Sonar do not update the costmap
Hi,
I have Lidar and Sonar readings and they clearly work as they see the obstacles:
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"}