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

What represents pose in signature and where are global poses are stored? #1274

Closed
gvasserm opened this issue May 5, 2024 · 4 comments
Closed

Comments

@gvasserm
Copy link

gvasserm commented May 5, 2024

Hi. I'm trying to understand the logic behind pose graph optimization in rtabmap and how the poses are stored. What is the pose that is stored in signature? Is it an odometry pose or optimized graph pose? Where are the global/optimized poses stored in db?

@matlabbe
Copy link
Member

matlabbe commented May 6, 2024

The pose in Signature is the odometry pose. The optimized poses are computed online based on odometry poses and links. The optimized poses are also saved on exit in database's Admin table under opt_poses, and reloaded when re-opening the a map (in slam mode it is useful to give a first guess for optimization, for localization they should never changed).

@gvasserm
Copy link
Author

gvasserm commented May 6, 2024

Thank you for fast reponse) And where can I found the code that updates the pose for each signature from odometry to the optimized poses? I've seen some example in exportPoses(), however poses are generated only for specific signatures or nodes.

@genawass
Copy link

genawass commented May 6, 2024

One more question: do you have some knowledge resource to better understand the code, since the code is not documented well, ie, there are no docstrings and comments in code

@matlabbe
Copy link
Member

Are you referring to that exportPoses?

void Rtabmap::exportPoses(const std::string & path, bool optimized, bool global, int format)

Internally, rtabmap would call optimizeCurrentMap to optimize poses when necessary.

A more convenient way to see/analyze optimized poses is to open Graph View in rtabmap-databaseViewer. You can move the iterations slider to see different steps of the graph optimizer (with 0 the actual odometry poses). The File menu option "Export poses..." will export poses that you can see in the Graph View.

The optimized poses is created only from nodes that are linked in the graph. All nodes not linked to graph are ignored. If the database has multiple unlinked mapping sessions, you can change the root ID to a node in a session you want to export poses.

About API documentation, it could be indeed improved! Most documentation efforts back in the days were put on the actual rtabmap standalone app itself and rtabmap_ros wiki (in particular the tutorials, examples, and demos), which most users were interested about. For a general idea of how the code works, I would refer to that paper.

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

3 participants