tum-vision / LDSO

DSO with SIM(3) pose graph optimization and loop closure
GNU General Public License v3.0
670 stars 236 forks source link

How to save estimated poses for each frame... #44

Open amiltonwong opened 4 years ago

amiltonwong commented 4 years ago

Hi, authors,

I know that the estimated poses for each keyframe are saved as result.txt. However, how could I save the estimated poses for each frame? Is that portion of code written inside LDSO? If not, could you give some hints on how to modify the original code for getting the estimated poses for each frame?

THX!

nonlinear1 commented 4 years ago

Have you found the way in which you save estimated poses for each frame?

NikolausDemmel commented 4 years ago

I would have a look how the viewer does it, see PangolinDSOViewer::publishCamPose() which seems to get called for every frame. You can contrast it to PangolinDSOViewer::publishKeyframes().

Beware that for regular frames there is only 1 pose when it gets tracked and it isn't updated later, whereas for keyframes you have the initial tracked pose, then multiple updates, each time it is optimized in the sliding window, and then maybe even more updates later when it is refined with pose-graph-optimization. In particular if you have significant drift, the initial and the final pose for a keyframe can be very different. So overall, you need to be very careful what you actually evaluate when you want to look at all frames. For example AFAIK, the LDSO paper evaluates the final poses for keyframes when computing ATE.