Posted by
g.bartoli on
URL: http://official-rtab-map-forum.206.s1.nabble.com/A-bunch-of-general-questions-tp856.html
Hi Mathieu,
In the past weeks I spent a lot of time doing experiments with RTAB-Map in my setup, I had both successes and failures, so I came up with a list (with no particular order) of specific questions to ask you in order to fully understand the system and obtain the best performances.
I also thought it would have been a good idea to collect all of them in a single post for easier future searches and also to support other people here that may have similar doubts. Maybe one day this will help you to build a General FAQ or enrich the official documentation, who knows? ;)
1) How is the option PoseScanMatching actually working? Is it performing ICP between the laserscan (real or fake) and the global map (grid_map) to further correct the odometry? Do the "LccIcp..." parameters also affect PoseScanMatching behavior or is it independent? When the robot is still and no loop closure is not foud, often I see this message appearing... is this correlated to ScanMatching?
[pcl::IterativeClosestPoint::computeTransformation] Not enough correspondences found. Relax your threshold parameters.
2) What is the recommended way to teleoperate a robot to map an unknown environment? First back and forth on the whole path, then making some rotations in some places to fill empty spaces or just go in one direction while performing one rotation every n meters?
3) From what I understood, once the graph has at least one constraint (i.e. a loop closure), the algorithm (TORO, in my case) continuously searches for a local minimum in the function that computes visual error from poses and 3D features, right? I also think that once a local minimum has been found (respecting iterations and epsilon), that minimum should be used as a starting point for the next optimization leading to an even more stable configuration, and so on.
On the contrary, it seems that the optimization always starts from an initial graph configuration (the last loop closure?) ignoring the previous optimized step, so sometimes it continuously cycles among the same two or three sub-optimal configurations (local minima). Since only one of them is the best, when the next loop closure is found, you often risk to carry over a badly optimized graph that cannot be recovered anymore.
I'm aware that our odometry is a bit erroneous, but since the loop closures works very well in correcting the drift, I would like to know how to avoid that the next optimizations can make it worse. I have recorded two mapping sessions, the videos can be dowloaded from here (sorry for the .mkv format, but I'm unable to access YouTube from office):
-
https://www.dropbox.com/s/9gywwyqi8onqn8v/mapping1.mkv?dl=0-
https://www.dropbox.com/s/44p4cgx81u501rn/mapping2.mkv?dl=0This effect can be seen especially in the final part of the second one and this is happening also in the localization phase (if you want, I can make a video of it, too).
What are your suggestions about this? Is it all caused by low odometry accuracy or can it be enhanced by adjusting "RGBD/OptimizeIterations", "RGBD/OptimizeEpsilon" and "RGBD/OptimizeMaxError"?
4) Thinking about your suggested "robot_pose_ekf" approach to improve accuracy fusing visual and wheel odometry, do you know how can I handle the "lost odometry" message coming from "rgb_odometry"? Using the RGB-D sensor handheld, I used to recover tracking by going backwards to the last tracked frame, but on the robot the easiest way seems to call "reset_odom" service, but that resets odometry to identity transformation relying on a subsequent relocalization. Will "robot_pose_ekf" properly handle this situation?
5) Is there any advantages of using "odom_frame_id" in rtabmap instead of subscribing to "odom" topic?
6) In localization mode, when I set the navigation goal, sometimes I receive this message even if the point is very close to the graph:
[ERROR] (2015-11-18 12:29:31.209) Rtabmap.cpp:3750::updateGoalIndex() The nearest pose on the path not found! Aborting the plan...
[ WARN] [1447846171.262195673]: Planning: Plan failed!
To avoid this, do I need to increase "RGBD/DetectionRate" to create more nodes in the graph or is it better to adjust "RGBD/LocalRadius"?
7) I followed your AZ3 example launch file and I enabled the LccIcp 2D on loop closures. Whenever one has been found, does the ICP occur only on the matching nodes or on every graph node? For 2D navigation (x,y,angle), can Icp 3D achieve better results or it is not necessary?
8) We are using ASUS Xtion Pro Live which exhibits a noticeable distortion in the depth cloud with points at distances greater than about 5 meters. I enabled the depth registration with openni2_launch and I also provided your calibration files (rgb_PS1080_PrimeSense.yaml and depth_PS1080_PrimeSense.yaml) to it, but the distortion seems to remain unchanged (you can see that looking at the fake scan in the previous videos, too). Apart from doing a proper IR calibration (I still have some problems in doing that...), do you think that "Kp/MaxDepth" shoud be set to about 5 meter to exclude distant points from the visual vocabulary that may decrease optimization accuracy?
9) Other than building a 3D map of the environment and splitting depth cloud into obstacles and ground, does the cloud map have other uses for navigation purposes?
10) Is there an easy way to inspect optimization (TORO/g2o/GTSAM) and loop closures (RANSAC and ICP) progress without resorting to set the logger level to DEBUG? It would be nice to easily analyze objective function values, iterations, convergence and stop criterion to better tune the corresponding parameters.
11) Is it possible to change the rtabmap logger levels (i.e. to DEBUG) using ROS parameters without rtabmapviz menu?
As always, many thanks!
Guido
~Guido