Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difference in poses export between GUI and rtabmap-export script. #1387

Open
hkortier opened this issue Nov 23, 2024 · 3 comments
Open

Difference in poses export between GUI and rtabmap-export script. #1387

hkortier opened this issue Nov 23, 2024 · 3 comments

Comments

@hkortier
Copy link

Hi,
I consider a difference in output when I want to export the poses. I use the following options for the GUI (database viewer):

RGBD-SLAM ID format -> Map's graph -> robot (base frame)

And for the script I use rtabmap-export --poses --poses_format 11 $DB

It seems that the script version does some optimization:

[ INFO] (2024-11-23 10:12:38.628) Rtabmap.cpp:5131::optimizeCurrentMap() Optimize map: around location 1611 (lookInDatabase=true)
[ INFO] (2024-11-23 10:12:38.629) Rtabmap.cpp:5140::optimizeCurrentMap() get 1579 ids time 0.000964 s
[ INFO] (2024-11-23 10:12:38.632) Rtabmap.cpp:5183::optimizeGraph() get constraints (ids=1579, 1583 poses, 3253 edges) time 0.002875 s
[ INFO] (2024-11-23 10:12:38.701) Rtabmap.cpp:5255::optimizeGraph() Optimization time 0.068538 s
[ INFO] (2024-11-23 10:12:38.701) Rtabmap.cpp:5143::optimizeCurrentMap() optimize time 0.072313 s
[ INFO] (2024-11-23 10:12:38.702) Rtabmap.cpp:5152::optimizeCurrentMap() Correction (from node 1611) xyz=-0.011847,-0.096141,-0.002846 rpy=0.000646,-0.000955,0.029272
Optimizing the map... done (0.782533s, poses=1583).
Create and assemble the clouds...
Create and assemble the clouds... done (4.187351s, 3020073 points).
Poses exported to

The outputs are different (global rotation) and tiny pose differences. In addition the GUI version export the landmark poses as well. I use the latest osx app (GUI) and latest source code (script).

Can you explain the difference? Is it deliberately?

@matlabbe
Copy link
Member

rtabmap-export and rtabmap-databaseViewer export poses differently. rtabmap-export re-optimizes the graph before exporting them. rtabmap-databaseViewer exports the poses that are currently seen in View->GraphViewer, with selected iteration and type:

2024-11-24_15-45

Support for landmarks have been added in this commit 13cd5e7 for the viewer, but not export cli. I am working on a branch refactoring export tool, I'll add it as todo in it. #1391 In that branch, I added --opt option to export optimized poses of the map, which would be exactly the same than if you select Local Optimized graph in the viewer. Otherwise, when the graph is re-optimized, there could be small variations.

@hkortier
Copy link
Author

Thanks for the clarification. Including a landmark export in the cli tool would be a nice add-on!

Is the re-optimization step before export using the cli tool necessary or could that be made optional?

@matlabbe
Copy link
Member

matlabbe commented Dec 2, 2024

Is the re-optimization step before export using the cli tool necessary or could that be made optional?

If --opt is set, the poses won't be re-optimized, unless there are no optimized poses saved in the database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants