How to export marker pose

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

How to export marker pose

greesil
My workflow with rtabmap is possibly a bit weird, but I'm processing a point cloud created in rtabmap in Python. FWIW  I'm using open3d to find some contours from a segmented ground plane. This is being done after any postprocessing in rtabmap. As part of this I've found that markers help a lot with loop closure. But I would now like to have one of the markers be the origin of a coordinate system.

To do this, I would like to export the pose of the markers and then use them to transform the point cloud in Python. Is there a way to export marker poses to a file?

Conversely, it looks like maybe setting the marker prior could also work but I have been unable to find any documentation on how to do that.

I'm not adverse to modifying the source code but I've been using the standalone app in Windows so far.

Thanks for you help!
G
Reply | Threaded
Open this post in threaded view
|

Re: How to export marker pose

matlabbe
Administrator
Hi,

The simplest approach would be to set a Marker/Priors. Well, the only documentation is when we show parameter description:
Param: Marker/Priors = ""  [World prior locations of the markers. 
                            The map will be transformed in marker's 
                            world frame when a tag is detected. Format 
                            is the marker's ID followed by its position 
                            (angles in rad), markers are separated by 
                            vertical line ("id1 x y z roll pitch yaw|id2 x y z roll pitch yaw"). 
                            Example:  "1 0 0 1 0 0 0|2 1 0 1 0 0 1.57" (marker 2 is 
                            1 meter forward than marker 1 with 90 deg yaw rotation).]

You can set a prior only for one marker. For example, if your have marker 7 at x=3, y=2, you may set it like this: "7 3 2 0 0 0 0". You can map first without priors to see how rtabmap estimates the tag's rotation to set correctly the pitch. In graph view, mouse over the marker circle and look at the rotation, then use that for the prior. When exporting the cloud afterwards, the points should be automatically transformed in origin of that marker.

cheers,
Mathieu