tum-vision / lsd_slam

LSD-SLAM
GNU General Public License v3.0
2.6k stars 1.23k forks source link

Delayed depth initialization / Metrically-accurate maps with scale updates #48

Open spillai opened 9 years ago

spillai commented 9 years ago

I have a question regarding scale consistency/drift. I was wondering if the API permits intermittent scale updates (i.e. providing metrically accurate scale updates) to the pose graph in an on-line fashion. This would imply that providing a scale measurement at time t should technically propagate forward and backward in time over the pose graph, to be consistent with the metric map at any point of time (as long as there is at least one scale measurement available). I haven't spent too much time looking at the API to see if there's an obvious way of doing such an update. This would be particularly useful to obtain metrically accurate maps for future use.

Any help would be greatly appreciated. Thanks

JakobEngel commented 9 years ago

It is not directly supported by LSD-SLAM; However, it can easily be added into the pose-graph optimization back-end:

Doing so will implicitly propagate the absolute scale throughout the whole map.

spillai commented 9 years ago

Great, thanks for the response. Also, great work! :+1:

icoderaven commented 9 years ago

Hi

I've tried adding metric information to the pose graph using an external source of odometry for each keyframe by adding them as binary edges between the very first keyframe and the current keyframe in the findConstraintsForNewKeyFrames() method, and setting the threshold number of untracked keyframes after which to find new constraints to two. Although the pose graph updates the keyframes as I want to, what happens is that in the stereo image generation step, the keyframe poses used for the bunch of reference frames are the pre-graph optimized frames, leading to the point clouds not being registered with each other in the LSD SLAM viewer.

Is what I'm trying to do even possible? Because of the way the generated depth image depends on the tracking, it seems like it's non-trivial to get the latest keyframe pose for the stereo depth estimation.

Any help will be much appreciated! Thanks!

icoderaven commented 9 years ago

@JakobEngel Alternately, how do I add unary SE3 edges to the pose graph, such that the scale is propagated? Do I use a Sim3 datatype, with the information gain for scale set to 0, and that for the position and orientation pumped up? And what about the Jacobian in that case?

ghost commented 8 years ago

Hello @icoderaven. Were you able to find out how to add the unary SE3 edges to the pose graph? Thank you.