Getting transformations between maps after merging maps

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting transformations between maps after merging maps

zettadirac
Hello matlabbe,

I have several point cloud maps that have their odometry initialized at different locations.
The point cloud maps have significant overlap between them.
I want to merge the point cloud maps using rtabmap.
After merging, I want to determine the transformations between the global coordinate system and the initial odometry of each map.

How would I do this in rtabmap?



Cheers
Reply | Threaded
Open this post in threaded view
|

Re: Getting transformations between maps after merging maps

matlabbe
Administrator
Assuming that you can merge them using rtabmap, you could open the database in rtabmap-databaseViewer, show the Graph View, then mouse over the nodes corresponding to initial nodes of each maps. You will then get directly the transformation (assuming that the first node started with Identity transform, if not, transform=odomPose.inverse() X optimizedPose).

Note that rtabmap cannot merge point clouds, only rtabmap's databases. To align raw point clouds, you would have to use a tool like CloudCompare.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Getting transformations between maps after merging maps

zettadirac
This post was updated on .
How would you do this programmatically in C++?

Does the rtabmap libraries provide an API to get initial odometry positions after map mergers?
Reply | Threaded
Open this post in threaded view
|

Re: Getting transformations between maps after merging maps

matlabbe
Administrator
Databases can be merged automatically using rtabmap-reprocess tool for convenience.

To compare optimized poses and odometry poses, this can be done in rtabmap-databaseViewer. In GraphView, there is a slider used to show the graph state for each optimization steps. When set at full left, this is the graph representing directly the odometry poses without optimization. When you do File->Export poses, its the poses your are seeing in Graph view that are exported (at the graph iteration you selected).

Programmatically, check the export example. At this line, if you set instead:
rtabmap.get3DMap(nodes, optimizedPoses, links, false, true);
(fourth parameter set to false), optimizedPoses will contain the odometry poses.

cheers,
Mathieu