Posted by
matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Gaining-understanding-in-the-many-different-filter-parameters-and-options-tp9140p9203.html
Hi,
Q1: If you explicitly set both "scan_voxel_size" and "Icp/VoxelSize", the scans will be voxelized twice. Set one or the other (set only scan_voxel_size to avoid any warnings).
Q2: Yes, it is there for convenience, if you set only "Icp/VoxelSize", it will be transferred to scan_voxel_size, then set to zero to be ignored down the line (to avoid a second voxel filtering in RegistrationIcp).
Q3: The second warning is about occupancy grid, not icp
Q4: The documentation could be better, though it is an open source project, so it is possible to figure it out. For ICP related stuff, check
RegistrationIcp.cpp. The default filtering function is
util3d::commonFiltering(). For odometry local scan map (Odom related parameters), see
OdometryF2M.cpp. For the Grid stuff, it is not related to ICP odometry, but for rtabmap's occupancy grid mapping. You should see that icp_odometry and rtabmap nodes are two different things and don't share data between them (unless explicitly configured to do so).
Q5: the warnings you see in icp_odometry are there to notice that a double filtering is avoided (unless both parameters for same filter approach are set explicitly). For rtabmap and icp_odometry, they do filter stuff independently form the input point cloud message you connected. If you are ok to use the highly downsampled point clouds from icp_odometry, you can make rtabmap subscribe to output point cloud from icp_odometry (called /rtabmap/odom_filtered_input_scan), then don't set voxel filetring parameters to rtabmap node.
Q6: If you aggregate two scans in base_link frame, the ray tracing will be done from base_link frame, not each lidar's frame. In comparison, as rtabmap supports multiple camera inputs, we do ray tracing from each camera frame, but for lidar this is indeed and issue. We would have to implement a multi-scan/cloud inputs for rtabmap node, so that ray tracing can be done from the sensor frames, and not base_link. This would require some large refactoring effort in both rtabmap and rtabmap_ros projects.
Q7: On icp_odometry side, I would generarly set Icp/VoxelSize and OdomF2M/ScanSubtractRadius to same value. For rtabmap node, Icp/VoxelSize and Grid/CellSize could be often different (do icp registration at 30 cm voxel, but we would want occupancy grid at 5 or 10 cm cell size, depending on your navigation approach).
cheers,
Mathieu