Hi,
With the standalone libraries, look at the 
RGB-D Mapping example. In particular, if you handle Statistics events, you can get the latest pose added to map with 
stats.poses():
virtual bool handleEvent(UEvent * event)
{
	if(event->getClassName().compare("RtabmapEvent") == 0)
	{
		RtabmapEvent * rtabmapEvent = (RtabmapEvent *)event;
		const Statistics & stats = rtabmapEvent->getStats();
		Transform lastPose = stats.poses().rbegin()->second;
		printf("Latest pose= %s\n", lastPose.prettyPrint().c_str());
		...
cheers,
Mathieu