Re: About Visual slam with lidar

Posted by matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/About-Visual-slam-with-lidar-tp8798p8830.html

Hi,

Grid/FromDepth=false is Grid/Sensor=0
Grid/FromDepth=true is Grid/Sensor=1

For Grid/Sensor=2, you can change Grid/FromDepth from this demo launch file to Grid/Sensor=2.

Then if we launch like this (with demo_mapping.bag):
roslaunch rtabmap_ros demo_robot_mapping.launch \
   rviz:=true \
   rtabmapviz:=false \
   rtabmap_args:="-d \
      --Grid/MaxObstacleHeight 1.5 \
      --Grid/RayTracing true \
      --Grid/3D false"

rosbag play --clock demo_mapping.bag

We can inspect the database afterwards in rtabmap-databaseViewer to see how the local grids are created. Here we can see the combination of lidar (yellow) and camera depth used to create obstacle cells.

In particular, the table is not seen by the lidar, only the edge by the camera, and a line of obstacles is added. To make sure that lidar doesn't clear obstacles added by the camera, we would have to use Grid/3D (at cost of more computation) and make sure rtabmap is built with OctoMap, then as ray tracing will be done in 3D, normally the 2d lidar won't be able to clear 3d obstacles of the camera not seen by lidar.

With Grid/3D=true, we can see ray tracing from both sensors:


cheers,
Mathieu