Repository: introlab/rtabmap

Issue #929: rtabmap-reprocess segmentation fault (core dumped)
Created: 2022-11-18T09:32:36Z
Hi @matlabbe !
I install rtabmap latest version when I use rtabmap-reprocess tool to merge two different map I got segmentation fault in terminal:
Processed 96/2661 nodes [id=96 map=0 opt_graph=96]... 55ms
[pcl::IterativeClosestPoint::computeTransformation] Not enough correspondences found. Relax your threshold parameters.
Processed 97/2661 nodes [id=97 map=0 opt_graph=97]... 52ms
Processed 98/2661 nodes [id=98 map=0 opt_graph=98]... 36ms
Processed 99/2661 nodes [id=99 map=0 opt_graph=99]... 38ms
Processed 100/2661 nodes [id=100 map=0 opt_graph=100]... 38ms
Processed 101/2661 nodes [id=101 map=0 opt_graph=101]... 45ms
Processed 102/2661 nodes [id=102 map=0 opt_graph=102]... 43ms
Processed 103/2661 nodes [id=103 map=0 opt_graph=103]... 36ms
Processed 104/2661 nodes [id=104 map=0 opt_graph=104]... 109ms
Processed 105/2661 nodes [id=105 map=0 opt_graph=105]... 53ms
[ERROR] (2022-11-18 12:16:42.286) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
Processed 106/2661 nodes [id=106 map=0 opt_graph=106]... 61ms
[ERROR] (2022-11-18 12:16:42.358) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
Processed 107/2661 nodes [id=107 map=0 opt_graph=107]... 54ms
[ERROR] (2022-11-18 12:16:42.432) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
Processed 108/2661 nodes [id=108 map=0 opt_graph=108]... 56ms
[ERROR] (2022-11-18 12:16:42.519) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
Processed 109/2661 nodes [id=109 map=0 opt_graph=109]... 56ms
[ERROR] (2022-11-18 12:16:42.592) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
Processed 110/2661 nodes [id=110 map=0 opt_graph=110]... 55ms
[ERROR] (2022-11-18 12:16:42.682) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
Processed 111/2661 nodes [id=111 map=0 opt_graph=111]... 51ms
[ERROR] (2022-11-18 12:16:42.757) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
Processed 112/2661 nodes [id=112 map=0 opt_graph=112]... 56ms
[ERROR] (2022-11-18 12:16:42.849) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
Processed 113/2661 nodes [id=113 map=0 opt_graph=113]... 52ms
[ERROR] (2022-11-18 12:16:42.918) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
[ERROR] (2022-11-18 12:16:42.948) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
Processed 114/2661 nodes [id=114 map=0 opt_graph=114]... 78ms Prox on 104 [0]
[ERROR] (2022-11-18 12:16:43.016) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
[ERROR] (2022-11-18 12:16:43.045) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
Processed 115/2661 nodes [id=115 map=0 opt_graph=115]... 81ms Prox on 104 [0]
[ERROR] (2022-11-18 12:16:43.123) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
[ERROR] (2022-11-18 12:16:43.147) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
Processed 116/2661 nodes [id=116 map=0 opt_graph=116]... 88ms Prox on 106 [0]
[ERROR] (2022-11-18 12:16:43.244) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
[ERROR] (2022-11-18 12:16:43.277) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
Processed 117/2661 nodes [id=117 map=0 opt_graph=117]... 98ms Prox on 107 [0]
[ERROR] (2022-11-18 12:16:43.363) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
[ERROR] (2022-11-18 12:16:43.391) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
Processed 118/2661 nodes [id=118 map=0 opt_graph=118]... 94ms Prox on 108 [0]
[ERROR] (2022-11-18 12:16:43.478) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
Processed 119/2661 nodes [id=119 map=0 opt_graph=119]... 67ms Prox on 109 [0]
[ERROR] (2022-11-18 12:16:43.566) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
Processed 120/2661 nodes [id=120 map=0 opt_graph=120]... 65ms Prox on 110 [0]
[ERROR] (2022-11-18 12:16:43.652) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
Processed 121/2661 nodes [id=121 map=0 opt_graph=121]... 61ms Prox on 111 [0]
High variance detected, triggering a new map...
[ERROR] (2022-11-18 12:16:43.751) Optimizer.cpp:446::optimizeBA() Optimizer 0 doesn't implement optimizeBA() method.
Segmentation fault (core dumped)

and when I open dmesg I got this error:
rtabmap-reproce[5080]: segfault at 20 ip 00007fc4ebe34fa6 sp 00007ffe1dc931b0 error 4 in librtabmap_core.so.0.20.21[7fc4eba3f000+66b000] 
I searched this issue and there was a bug but this error comes from core lib that's why I suppose there can be installation bug or sth?
EDIT:
Also I had another question but I forgot to mention: When I compare 2D occupancy grid map in RVIZ and databaseViewer tool there are differences they are not huge but important , for example in RVIZ corridors looks nice, no tilting observed but in databaseViewer I saw corridors tilted or not merged enough. Which map do we have to consider actually? I'll try to edit 2D map with databaseViewer's tool (drawing restricted areas) but databaseViewer shows  different map compare to RVIZ.

Duplicate issue #931: databaseViewer Graph View and RVIZ map differences and importance order
Created: 2022-11-21T11:38:04Z
Hi @matlabbe !
When I mapped the environment, map looks nice in RVIZ side, there is not any tilt in map but when I reopened database by using databaseViewer tool I saw really bad map in graph view but when I pressed the edit optimized 2D map  option I saw the same map as RVIZ's map. I extracted it and I added restricted areas and imported it again then I tried to reprocess it another map but in the graph view side and also in the  edit optimized 2D map  option map again tilted and cannot be usable.
Actually, If I observe right, when rtabmap-reprocess tool is used, rtabmap algorithm bases the graph view map instead imported map that's why it merges two different db with wrong maps that're coming from graph view. How can I fix that issue, or is there anything else I did wrong? Which importance that I have to be careful for map in graph view or RVIZ?
here the screenshots of the maps:
one of the db's map in graph view:

imported and restrcited area map in the same db:

merged db with rtabmap-reprocess tool in graph view:

merged db in edit optimized 2D map  option

Have a nice day! :)

Closing comment (2022-11-27T03:02:54Z): It seems related to #929 (comment)