costmap not clearing obstacles
Hi All,
I am using a stereo camera to detect obstacles but I am having issues with the costmap. The costmap sometimes doesn't clear the local obstacles on the costmap even after it leaves. Please find below the screenshot and also my costmap parameters yaml file. It would be great if someone can help me resolve this issue.
Costmap_params.yaml:
global_frame: camera_baselink
robot_base_frame: left_camera_frame
footprint: [[-0.325, -0.325], [-0.325, 0.325], [0.325, 0.325], [0.46, 0.0], [0.325, -0.325]] #robot coordinates
footprint_padding: 0.1
update_frequency: 10.0
publish_frequency: 10.0
static_map: false
rolling_window: true
width: 20.0
height: 20.0
resolution: 0.05
track_unknown_space: false
always_send_full_costmap: true
inflater_layer:
inflation_radius: 0.0
cost_scaling_factor: 10.0
obstacle_layer:
observation_sources: obstacles
obstacles: {
data_type: PointCloud2,
topic: /PointCloud_Publisher/pcl4,
clearing: true,
marking: true,
observation_persistence: 0.0,
max_obstacle_height: 0.5,
min_obstacle_height: -0.5,
obstacle_range: 10.0,
raytrace_range: 11.0
}
plugins:
- {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"}
- {name: inflater_layer, type: "costmap_2d::InflationLayer"}
Please attach your screenshot directly to your question. Do not use google drive/docs or something else.
I did not have enough karma so I couldn't upload the screenshot. I updated the post with the screenshot.
Hi, "doesn't clear the local obstacles on the costmap even after it leaves", the robot is stationary and the obstacle leaves or the other way arround? The costmap keeps obstacles that are out of sight of the sensor, when the sensor moved. Depending on your setup this is also true in 3d space. As your scan has sort of a "pyramid" shape. If there is tall obstacle in the wide base of this pyramid and the robot drives closer, part of the object fall out of the sensors pyramid/"cone", the obstacle parts that are now "out of sight" will persist even if the parts that can be seen by the sensor moved away. Ros doesnt know that a Human is a Human and that its head moves with the torse, for Ros its a bunch of unrelated obstacles. So if the bunch of obstacles in sight move ros ...(more)
Also this might help: link text
Hi, in my case the robot is stationary but the obstacles are moving in front of the robot.
if the costmap doesn't clear the obstacle from the map unless it comes in sight again or if there is another object behind it, wouldn't that make the path planning difficult since the planner sees obstacles that are actually not present at that place in the real world?
Iam not sure I understand you, or if I descibed the issue properly. If the camera frame stays the same, this effect isnt relevant as it marks and clears the same space all the time.
The navigation stack is a simple 2d approach, for 360° lidar, and research in mind. With a 360° sensor and neglecting obstacle and robot hight it makes perfect sense, as this kind of setup would "see" everything relevant all the time.
Moved to answer.