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

How to prevent costmap to clear obstacles that are too close for the kinect to detect?

asked 2015-10-20 12:06:56 -0500

nyquist09 gravatar image

updated 2015-10-21 19:55:49 -0500

Hi!

I am using the ROS Navigation stack to navigate through known space. The robot is equipped with a 2D Laserscanner and a Kinect.

I want to use the kinect for obstacles that are too low or too high for the laser to detect. So for the costmap I created a voxel_grid with 3 voxels. The bottom and the top layer for the kinect and the middle layer for the Laserscan. I am converting the kinects pointcloud into two laserscans before using them with costmap.

Everything works fine except for one problem: when I approach an obstacle that only the kinect can detect (e.g. a small box on the floor) it works fine until I'm too close for the kinect to detect it (I'm in the deadzone of the kinect). What happens is that the obstacle gets raytraced out and the obstacle is erased from the costmap.

I tried different approaches, such as setting the kinects "clearing" parameter to false, but then dynamic obstacles (e.g. people) are stuck in the costmap.

Is there a straightforward way to prevent costmap to raytrace out obstacles that are too close?

The robot/kinect setup looks like this:

image description

Thanks for your help!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2015-10-21 20:02:07 -0500

nyquist09 gravatar image

updated 2015-10-21 20:05:42 -0500

I could fix the issue.

I am using the pointcloud_to_laserscan node and tell the node to transform the pointcloud to a frame where the pointcloud actually begins (at the border of the deadzone). The next step is to tell the costmap that my newly created sensor sits at the border of the deadzone. What happens is that the raytracing starts from the origin of this newly created laser. That way obstacles in the deadzone don't get raytraced away, because the fake laser is in front of the deadzone.

image description

edit flag offensive delete link more
0

answered 2015-10-20 13:53:16 -0500

David Lu gravatar image

Be careful what values you put in your laser scan when you don't have a valid reading from the kinect. If you put in a valid distance, it can unintentionally clear.

edit flag offensive delete link more

Comments

The thing is that the kinect is elevated and tilted, so if it gets close to low obstacle on the floor it just "looks" over the object. The scan reading is still valid then, because it just looks beyond the obstacle. Ideally, I find a way to prevent costmap from clearing obstacles in the dead zone.

nyquist09 gravatar image nyquist09  ( 2015-10-20 15:08:45 -0500 )edit

@David Lu would you know what was the easiest way to tell the costmap that a certain corridor of a voxel layer is restricted for clearing obstacles? (The area right in front of the robot, where he is blind)

nyquist09 gravatar image nyquist09  ( 2015-10-21 15:02:42 -0500 )edit

I don't completely understand your scenario. However, it doesn't sound like natively supported behavior, and I would recommend writing a custom layer.

David Lu gravatar image David Lu  ( 2015-10-21 15:42:17 -0500 )edit

Thanks! I'd like to have a specific area around the robot which is not touched by the costmap. So that obstacles that have been observed in this area when the robot was somewhere else would not get raytraced out. I agree, it is a custom problem

nyquist09 gravatar image nyquist09  ( 2015-10-21 15:46:40 -0500 )edit

A diagram would help.

David Lu gravatar image David Lu  ( 2015-10-21 15:49:01 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2015-10-20 12:06:56 -0500

Seen: 1,898 times

Last updated: Oct 21 '15