rubengooj / stvo-pl

Stereo Visual Odometry by combining point and line segment features
GNU General Public License v3.0
222 stars 96 forks source link

Something confused about the code of useMotionModel #12

Open dshwtc opened 6 years ago

dshwtc commented 6 years ago

Hi, I found something confused about the code. Accoroding the below line in function StereoFrameHandler::optimizePose(),

curr_frame->DT = expmap_se3(logmap_se3( inverse_se3( DT ) ));

Since DT is the transform from the current frame to the previous frame, curr_frame->DT should be the transform from the previous frame to the current frame, but the code below seems to be a mistake when useMotionModel,

if( Config::useMotionModel() ) { DT = prev_frame->DT; DT_cov = prev_frame->DT_cov; e_prev = prev_frame->err_norm; if( !isGoodSolution(DT,DT_cov,e_prev) ) DT = Matrix4d::Identity(); }

Is this right? Thanks!

stdmkmehp commented 5 years ago

Feel confused about that too. And could you please tell me that why DT update by post-multiplying inverse_se3(expmap_se3(DT_inc)) in StereoFrameHandler::gaussNewtonOptimization(). @rubengooj @dshwtc

StereoFrameHandler::gaussNewtonOptimization() *DT << DT inverse_se3( expmap_se3(DT_inc) );**