Extract Odometry Pose from Rtabmap database viewer

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

Extract Odometry Pose from Rtabmap database viewer

Genozen
Hello, I'm slightly confused with the "odometry pose"

I'd like to extract the position of the camera from my .db files.


(I think the blue "graph" path looks like what I had...)

I tried file->export poses-> different formats

But when I compared my exported data with the timestamp to the Odometry pose, they don't seem to match?



Also at start, my exported data says I'm at (4,-4,0) but in databaseViewer it sayd I'm near (0,0,0).

Could you help clarify the differences?


references (?) :
https://answers.ros.org/question/238705/extract-odometry-and-map-from-db-file-on-tango/
https://github.com/introlab/rtabmap_ros/issues/389
Reply | Threaded
Open this post in threaded view
|

Re: Extract Odometry Pose from Rtabmap database viewer

matlabbe
Administrator
The poses in exported are those matching the optimized graph in Graph View. Slide left the iteration slider to show graph without any optimization, then try exporting the poses (they should be the odometry poses).
Reply | Threaded
Open this post in threaded view
|

Re: Extract Odometry Pose from Rtabmap database viewer

Genozen
Hi, it is working properly now. I was wondering if there's an automated way to export multiple .db files with their odom data. (I've ran like about 10 tests for each session). Currently, I'm manually loading into the Rtabmap-DatabaseViwer and export the poses...

I tried to write an SQLite in Python to extract the table in the .db file, but it seems much more complicated with the structure embedded.
Reply | Threaded
Open this post in threaded view
|

Re: Extract Odometry Pose from Rtabmap database viewer

Genozen
I wrote a python file to load the ".db" file

In the query there's a table name "Admin" and I tried to extract "opt_poses" underneath that and decode by unpacking 4-byte segments to get floats... but doesn't look like the optimized poses...
Reply | Threaded
Open this post in threaded view
|

Re: Extract Odometry Pose from Rtabmap database viewer

matlabbe
Administrator
You can use rtabmap-report tool, set a directory and it will export odometry and optimized poses of all databases.
rtabmap-report --poses PATH