0
$\begingroup$

Rosanswers logo

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

image description

After

image description

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:

image description

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


Originally posted by Naman on ROS Answers with karma: 1464 on 2015-05-12

Post score: 2


Original comments

Comment by jarvisschultz on 2015-05-12:
It would be helpful to also add your values for the following parameters: inf_is_valid, marking, clearing, obstacle_range, and raytrace_range. These settings will govern how obstacles are cleared. Read more here: http://wiki.ros.org/costmap_2d/hydro/obstacles

Comment by Naman on 2015-05-12:
Thanks.. I have updated the original question

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Try setting obstacle_layer/laser_scan_sensor/inf_is_valid to true.


Originally posted by David Lu with karma: 10932 on 2015-05-12

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Naman on 2015-05-13:
Thanks David! It worked..

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.