Hi,
Not sure what you are trying to do, but you may re-open the generated database from rtabmap_ros in standalone RTAB-Map and do the same thing you were doing. If you want to record online the pose + images, I suggest to use the output
/rtabmap/mapData. The last image/depth added to graph is in the topic (last node). You can also have all the graph at the same time (which could change after loop closures).
Note that rtabmap_ros uses Rtabmap class (see CoreWrapper.cpp), so if rtabmap_ros is built against your modified rtabmap libraries, it will do the same thing.
cheers,
Mathieu