RonaldSun / VI-Stereo-DSO

Direct sparse odometry combined with stereo cameras and IMU
387 stars 124 forks source link

Question about imu_track_ready & double folder manipulation on SE3 #27

Open studennis911988 opened 4 years ago

studennis911988 commented 4 years ago

Hi, Ronalds, first of all, really thanks for your open source code, however I have two small questions about the code.

First, why we need to wait until the backend has max keyframes for the first time to start involving IMU factor in the frontend by using imu_track_ready flag? if(nFrames >= setting_maxFrames){ imu_track_ready = true; } I found if we start using IMU factor at the beginning (setting imu_track_ready to true by default), the estimation crash easily.

Second question is about the double folder manipulation on SE3 , like the code showing below. Mat44 M_WB = M_WD*M_DCi*M_WD.inverse()*T_BC.inverse().matrix(); I'm wondering why we need to multiply by M_WD in front of M_DCi and M_WD.inverse() in the rear in order to transform from DSO frame to world frame?

Thanks in advanced!

RonaldSun commented 4 years ago

There's a scale zoom between DSO coordinate and world coordinate. It's better to use optimized scale so I set imu_track_ready. M_WD is used because M_DCi is cam pose in DSO coordinate while T_BC is in world coordinate .