I will divide my questions by topic for better readability
Scan with RTAB-Map on Phab2Pro
A few weeks ago in this post https://goo.gl/waVGSD you told me to use Mesh Rendering set "Mesh" (without texture) and decimation to "Medium". Isn't better to use the simple "point cloud" to save RAM?
Also, during capture, should i enable "Drift correction" to get better results?
Importing .db to RTAB-Map
I have big problems of alignment with a scan I did recently. I noticed a bad alignment already when I was scanning. I tried to go a few times on the same point hoping for a loop closure but this did not work.
I know... this scan is a bit messy and hard to understand. It is the entrance of a natural cave with some trees around.
Why when I open the DB with "Global Map optizied" i get this bad result
...and when I open it with "Global Map not optimized" I get this much better result?
Thx for sharing the database, don't worry we can recover your scan with RTAB-Map Desktop as you will see below.
Scan with RTAB-Map on Phab2Pro
Yes, if you are ok with a point cloud, go for it it will take less RAM. A mesh hides stuff behind, so maybe easier to visualize. Note that regardless how much the pointcloud/mesh is decimated for rendering, the point cloud at highest resolution is always saved in the database (to be reconstructed at any resolution afterward).
Disable Drift Correction, that option will disappear in next release. You will see below that I disabled that when reprocessing the database.
Importing .db to RTAB-Map
In that case, the drift correction added slightly more errors to map, so it is why not optimized was better. I've found that RTAB-Map didn't find loop closures too. I reprocessed the database with 400 features per image instead of 200 and without drift correction. Because there are more features per image, 10 loop closures could be detected, correcting the map at three places (the red links in yellow circles).
Steps to re-process the database with new parameters 1- Open the database and answer Yes to update the parameters, then close the database.
2- My Source panel (disabled "database stamps as input rate" to reprocess faster the database, here 5Hz):
3- Set detection rate and image buffer to 0 to process all images (they may be already at 0 if you answered Yes to last question when selecting the database):
4- Disabled neighbor refining (called "Drift Correction" on RTAB-Map Tango) and set back Motion estimation to visual only (was set to Vis+ICP because of drift correction):
5- Close Preferences and click Play. Hopefully RTAB-Map will detect the same loop closures as mine above.
About GTSAM: GTSAM would be already selected for graph optimization as RTAB-Map Tango uses it. The parameter is here:
EXPORTING Point Cloud from RTAB-Map
I just changed the default reconstruction flavor to Dense since mesh reconstruction is now a lot better with Poisson. When assembling the point clouds, there are no differences between both, unless you want to save point clouds separately and keep the point clouds organized. However, for meshing, the approaches are very different between Organized and Dense.
The bug where the textures are missing from the OBJ should be fixed in the 0.11.14 binaries that I re-uploaded wednesday. If you downloaded the initial 0.11.14 binaries (Monday), please re-download them.
Export examples with the resulting map above
Results below are point cloud or mesh directly exported from RTAB-Map 0.11.14. Doing Post-Processing to detect more loop closures did not correct much more the map than with only the loop closures detected online (results shown without Post-Processing).
A) (~0m20s export time, 10K faces, OBJ 1.6MB+0.7MB jpg) Default Parameters, with Dense + Meshing(Poisson depth=8) + 80 % Mesh decimation + texturing (with output texture 1024x1024):
B) (~0m30s export time, 68K faces, OBJ 10MB+10MB jpg) Default Parameters, with Dense + Meshing(Poisson depth=8) + texturing (with output texture 4096x4096):
C) (~0m50s sec export time, 46K faces, OBJ 7MB+11MB jpg) Default Parameters, with Dense + Meshing(Poisson depth=9) + 80% Mesh decimation + texturing (with output texture 4096x4096):
D) (~1m40s sec export time, 1.2M faces, PLY 23MB) Default Parameters, with Dense + Meshing(Poisson depth=10) + no texturing (max transfer color radius=0.2m):
EDIT Oups I clicked "Post Message" instead of "Preview Message". I was about to write that I uploaded the model E to Sketchfab here: https://skfb.ly/ZZVP .
Note that we could also regenerate the point clouds at 1 decimation to get a lot more points to mesh. I tried but it was too long (I waited 10 min and the meshing was not done yet). I didn't try with higher Poisson depth than 10 on that dataset, but probably it could add even more precision to geometry. However, I think very high Poisson depth would not smooth the geometry noise.
Oh wow, thanks for the comprehensive answers...
The result that you uploaded to Sketchfab is great!
I hope to get the same results with the other 4 databases of the session.
I suppose that these guidelines also apply to "automatic merging" of which you have already told me in the post on G+... (that part is still a bit confusing to me...)
I will follow your instructions carefully and let you know.
we are scanning a landslide and we use a box with coded targets for better loop closures. However, in this particular case I was not able to solve all loopclosures (I have tried various post-processing settings). Is there any way to manually add loop-closure? Or which settings could help to solve this problem?
The database is here https://drive.google.com/file/d/0B37fSf__UxiBRjVqemE4LTFiUGs/view?usp=sharing
Thx for sharing the database, it is easier to show an example. To add manually a loop closure, this can be done with Database Viewer. Here is an example. Select two images, here 6 and 712. I also changed Feature Type used (SIFT instead of BRIEF) and minimum required (25->15), then pressed "Add" in Constraints View:
I received this error:
To resolve this, instead of increasing the "RGBD/OptimizeMaxError", I rejected the loop closure 413->415. I tried again and another link caused problem, so I rejected it too. The third try worked (we can see on the right the two point clouds correctly superposed):
Another approach As shown by the error messages above, some loop closures are weak, because of the default GFTT/BRIEF features used that may be not suitable for this kind of environment. I reprocessed the database as source in RTAB-Map like in the above posts, but with changing Vocabulary type to SURF, then mapped again. After the run, I clicked Tools->Post-processing... and added more loop closures. The loop closure above is automatically found, so no need to manually modify the database. Here is a comparison between Tango odometry and with loop closures of the three traversals over the same box:
As shown in the last screenshot, there are errors at the other side of the map, where there is no loop closure possible. As shown below, maybe having another "anchor" at the bottom of the slope (bottom left of the screenshot below) to find loop closures between traversals could help to reduce these errors.
Thank you very much. As you probably noticed, we are using ground control points to georeference the model and stitch various parts together. Is there any theoretical chance that GCPs would be sometimes usable for trajectory corrections?
There is no plans to add this kind of information. However, there were ideas to be able to inject landmarks (e.g., GPS, D-GPS, manually set landmark or even GCPs) with known global position in the graph so that during optimization, these hard constraints force the graph to optimize toward them. Well, some future works!
Thanks! Matlabbe. I have tried rtabmap in my turtlebot. And the results is better than gamapping , but there are still some error happen. And I think I can get a better result after a offline loop closure