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

costmap2d voxel layer doesn't clear?

asked 2019-11-26 00:01:04 -0500

PG_GrantDare gravatar image

Hi everyone,

I am using a PointCloud2 source for my costmap2D. I have done extra filtering to remove the ground from the estimate. I am seeing the voxel layer "hold on to" points and not clearing them despite it not seeing anything in that area. If my research is correct I see that to clear a voxel it must see a point through that point? Since I have removed the ground can I just have the costmap trust the estimate more? Essentially I just want my Pointcloud squished into a 2D costmap for movebase, I don't want the voxel layer to remember things and think it's smart.

Thanks :)

edit retag flag offensive close merge delete

Comments

Make sure clearing is enabled in observation_sources under the obstacles_layer and that your raytrace_range is greater then the obstacle_range. Ground removal should not affect the clearing of obstacles in the costmap

pavel92 gravatar image pavel92  ( 2019-11-26 03:20:02 -0500 )edit

@pavel92 clearing is enabled, raytrace is set to 80 whilst obstacle is 20 (max dist of 100m). I believe the problem comes from that the voxel layer must see another point beyond the voxel in the same beam (projecting xyz with angle). I would like it to just clear if it can't see a point in that area?

PG_GrantDare gravatar image PG_GrantDare  ( 2019-11-26 17:34:45 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-11-27 02:42:33 -0500

pavel92 gravatar image

Ok, I see. The problem is that some obstacles are not cleared even though they are removed. There is a obstacle height threshold and if the obstacle was detected within this threshold and then was removed, the beams probably hit something (a wall in the background) and therefore are not considered for clearing.

There are few workarounds. First you can try reducing your raytrace range to something close but still greater then the obstacle range (for example if obstacle range is 20, set raytrace to 25-30).
Also, you can try adding the sensor in observation sources twice but this time disable marking and keep clearing enabled. In this case you will have 2 observation sources where one does marking and clearing and the other one does just clearing and you can tinker with the parameters.

There was also an issue on this problem and a commit that fixes the obstacle height calculation.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-11-26 00:01:04 -0500

Seen: 779 times

Last updated: Nov 27 '19