Able to log the position of the camera sensor during mapping mode using a button trigger

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

Able to log the position of the camera sensor during mapping mode using a button trigger

dinossht
Goal: Able to log the pose of the camera sensor during mapping mode using a button trigger (in a ROS framework).
Why: This is so that I can optimize the map (from the .db file) and also optimize the camera pose at the given timestamps during the mapping session.

Is this possible with RTAB-Map out of the box, or any suggestions on how I can achieve this?
Reply | Threaded
Open this post in threaded view
|

Re: Able to log the position of the camera sensor during mapping mode using a button trigger

matlabbe
Administrator
Under ros, you could subscribe to odometry topic, then get from TF the map->base_link frame to get pose in map frame at the timestamp of the topic. Or you can save directly odometry topic for odometry pose.

I prefer to just open the database afterwards in rtabmap-databaseViewer and do File->Export poses... in format I want. Graph View panel should be opened to export poses (you can move the iteration slider to 0 to export odometry poses).

On command line, you can also use "rtabmap-report --poses rtabmap.db" to get slam (optimized) and odom poses.

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

Re: Able to log the position of the camera sensor during mapping mode using a button trigger

dinossht
That it what I was initially testing, but noticed that odometry pose from the export functionily outputs poses at around 1 Hz. While the optimized poses can varying, from 1Hz to 0.2Hz etc. I'm guessing this is based on which keyframes are kept in the graph for optimization? Is it possible to get higher frequency rate for the optimized poses in this manner?
Reply | Threaded
Open this post in threaded view
|

Re: Able to log the position of the camera sensor during mapping mode using a button trigger

matlabbe
Administrator
You can increase detection rate in Mapping parameters to record more poses in database. I don't recommend doing this in mapping mode, otherwise you will fill up RAM super fast.
Reply | Threaded
Open this post in threaded view
|

Re: Able to log the position of the camera sensor during mapping mode using a button trigger

dinossht
Thank you for your answers.

Do you think it is possible to interpolate the pose between frames using visual odometry (VO)? Although VO poses are not optimized, they tend to have less drift and/or error between consecutive optimized poses. Therefore, another possibility is to use VO for interpolation. What are your thoughts on this?
Reply | Threaded
Open this post in threaded view
|

Re: Able to log the position of the camera sensor during mapping mode using a button trigger

matlabbe
Administrator

To save all odometry poses in the database without affecting the mapping  update rate, we can set Rtabmap/CreateIntermediateNodes to true somewhere here. Note that for performance reason for mobile, we limited rendering update to 10 Hz, so if you want to record all ARKit poses, set this to 0.

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

Re: Able to log the position of the camera sensor during mapping mode using a button trigger

dinossht
Thank you, this helps