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