Re: Raytracing using stereo camera for better SLAM and obstacle avoidance.

Posted by matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Raytracing-using-stereo-camera-for-better-SLAM-and-obstacle-avoidance-tp5632p5642.html

Hi,

I'm glad that you find the paper interesting, there were a lot of stuff discussed in it. For your questions:

1. Ray tracing is not used to detect obstacles, but to detect empty space between the camera and the obstacle. If the camera doesn't see the ground and ray tracing is off, you will only see obstacles in the map, no empty space. As ray tracing detect empty space, it can be used to clear dynamic obstacles from the map. For example, there is someone on front of the camera a 1 meter, and obstacle is added 1 meter in front of the robot. If the person move away, without ray tracing the obstacle is still there even if the camera can see the wall 2 meters away in same direction where the person was. With ray tracing, the "obstacle" not there anymore can be cleared.

2. When Grid/RayTracing=true, ray tracing is done in 2d if Grid/3D=false and in 3d if Grid/3D=true. For 3d ray tracing, rtabmap should be built with OctoMap dependency to work. I don't really recommend 3D ray tracing if you have a robot moving only in 2D (very expensive in computation time as shown in Table 10 of the paper), for which is better to use Grid/3D=false with Grid/RayTracing=true.

Note that if your stereo camera cannot see the ground anyway, because it is textureless, no need to put it as close to ground.

Just for some more info, 2D ray tracing in rtabmap is simply tracing a line in a 2d grid (like drawing pixels in paint). 3D ray tracing is done by OctoMap library, they use an OcTree to subdivide the space (similar to a 3D grid) for efficient ray tracing in 3D (similar to when you shoot with a gun in a video game, ray tracing  is done to detect obstacles hit by the bullet).

cheers,
Mathieu