unable to clear obstaces in the costmap
Hi all,
I have a mobile robot and I would like it to navigate around a room. I already have a map of the room. I am using Rotary Encoders for Odometry, robot_pose_ekf to merge data from Rotary encoders and IMU, amcl for localization, move_base for planning with Trajectory Planner as a local planner. I seem to have a problem with clearing obstacles from the costmap in certain cases (not all cases, in some cases, obstacles are cleared without any issue). As seen in the following images, the obstacle on the left of the robot was successfully cleared whereas it is not the case for obstacles in front of the robot. Although the laser scan is coming from a far away obstacle but the obstacles on the way are not cleared (in front of the robot).
Before
After
Also, I have changed all the inf readings from the hokuyo_node to max_range + 1. The only reason which I can think of is the obstacles are cleared only if the laser scan comes from an obstacle behind it which is part of the original static map but I am not able to see the reason behind this. I am not able to figure out how to make sure that all obstacles are successfully cleared. Does anyone have any idea about how to solve such an issue?
Update 1 : I am using this hokuyo sensor and the max_range for this is 5.6 m. So, when I change all the inf readings from the hokuyo_node to 5.59 m (< max_range), all obstacles are cleared successfully but when I make all the inf readings 5.6 m (>= max_range), I again have the same problem mentioned in the original question. I have attached an image for the case when all inf readings are changed to 5.59 m:
Update 2 :
#Configuration for the sensors that the costmap will use to update a map
obstacle_layer:
observation_sources: laser_scan_sensor
laser_scan_sensor: {data_type: LaserScan, sensor_frame: /laser, topic: /scan, expected_update_rate: 0.4,
observation_persistence: 0.0, marking: true, clearing: true, max_obstacle_height: 2.0, min_obstacle_height: 0.0}
# All other parameters have default values
Thanks in advance.
Naman Kumar
It would be helpful to also add your values for the following parameters:
inf_is_valid
,marking
,clearing
,obstacle_range
, andraytrace_range
. These settings will govern how obstacles are cleared. Read more here: http://wiki.ros.org/costmap_2d/hydro/...Thanks.. I have updated the original question