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

VoxelGridPlugin clearing voxels

asked 2014-09-02 02:27:31 -0500

Enrique gravatar image

I'm trying to use an RGBD camera (I'm using gazebo_plugins gazebo_ros_openni_kinect plugin in simulation with gazebo 1.9.1) with the VoxelLayer.

The problem I'm facing is basically that the voxel_grid (I visualize it on rviz) is not cleared when the readings are further than the max range; there's no point to raytrace and clear them. I'm thinking of publishing some sort of a max_range point cloud only for clearing.

However, I'm curious about how people manage to solve this problem.

FYI, I'm using branch/tag 1.11.8 and I've seen a few changes you've introduced up to 1.11.11. Are they bug fixes? Or can I live without them?

This videos tries to show the issue: http://youtu.be/Pz0osmz-G24?t=26s If it's not clear enough, please tell me and I'll create another one. This is the video description (copy&paste): In this video I show two "experiments". First, I move the table close to the wall, and the voxel grid (in red) is cleared after removing the table. Second, I move the table again closer to the robot (far from the wall), and now there are voxels not cleared after removing the table. I think this could be because there is no point to clear the elements on the costmap.

Note that the gazebo_ros_openni_kinect plugin uses the depth image to generate the point cloud. And the depth image is generated using raytracing in gazebo (AFAIK). This means that when the ray doesn't hit anything the pixel is black (0); the same as if the distance were 0 (close). Therefore, for these points there's no clearing.

Trying to look for a workaround I've modified the plugin here: https://github.com/pal-robotics/gazeb... I'm using a simulation similar to REEM's for testing.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-09-03 19:30:52 -0500

David Lu gravatar image

To me, this seems like a gazebo problem. Based on your visualization, it doesn't look like the rays that don't hit anything generate points. Without passing that information along to the voxelmap somehow, its impossible for it to clear the voxels.

(If they're being generated and they're just really close to the kinect, maybe that can be handled)

edit flag offensive delete link more

Comments

Are you using the laser_scan generated by depthimage_to_laserscan or directly the pointcloud? In the first case, beams not hitting are nan, and in the second, points are 0, 0, 0, I think. So yes, cannot clear with that. Maybe depthimage_to_laserscan should return +inf when the depth image contains 0

jorge gravatar image jorge  ( 2014-09-04 03:08:38 -0500 )edit
0

answered 2014-11-03 07:00:24 -0500

Enrique gravatar image

I agree it's a problem of the gazebo plugin. I added some sort of fix in https://github.com/pal-robotics-forks... Sorry for not mentioning before.

@jorge I want to use the whole point cloud, not just a laser slice of it. Anyway, I think with depthimage_to_laserscan I might have a the +Inf (or at least, IMHO, it should provide them).

I'm finally integrating everything in https://github.com/ros-planning/navig... (still to be merged).

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2014-09-02 02:27:31 -0500

Seen: 638 times

Last updated: Nov 03 '14