x y z position in localization mode

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

x y z position in localization mode

brunoeducsantos
Hi,

From exporting the poses we get the transformations of the different set of camera positions during the mapping.

How can I get the camera positions during localization ?

Best,

Bruno
Reply | Threaded
Open this post in threaded view
|

Re: x y z position in localization mode

matlabbe
Administrator
Hi,

Are you using ROS? if so, the camera pose is /map -> "frame_id" (e.g., /base_link or /camera_link). RTAB-Map follows ROS REP105, see /map section.

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

Re: x y z position in localization mode

brunoeducsantos
Hey,
I am not using ROS. How does it work for Rtabmap GUI?

Best,

Bruno
Reply | Threaded
Open this post in threaded view
|

Re: x y z position in localization mode

matlabbe
Administrator
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
Reply | Threaded
Open this post in threaded view
|

Re: x y z position in localization mode

brunoeducsantos
Hi Mathieu,

Thanks for the feedback.
It worked amazingly.

Cheers,

Bruno