diff --git a/svo/src/frame_handler_mono.cpp b/svo/src/frame_handler_mono.cpp index 780d9c7..799cb8c 100644 --- a/svo/src/frame_handler_mono.cpp +++ b/svo/src/frame_handler_mono.cpp @@ -136,10 +136,9 @@ FrameHandlerBase::UpdateResult FrameHandlerMono::processFrame() img_align.run(last_frame_, new_frame_); // map reprojection & feature alignment reprojector_.reprojectMap(new_frame_, overlap_kfs_); - std::cerr<<"Reprojection Map:\t nPoints = "<T_f_w_ = last_frame_->T_f_w_; // reset to avoid crazy pose jumps tracking_quality_ = TRACKING_INSUFFICIENT; return RESULT_FAILURE; @@ -148,15 +147,17 @@ FrameHandlerBase::UpdateResult FrameHandlerMono::processFrame() // pose optimization subject to change for adding IMU size_t sfba_n_edges_final; if(!imu_integPtr_->predict(new_frame_,sfba_n_edges_final,Config::poseOptimThresh())) - return RESULT_FAILURE; + return RESULT_FAILURE; + + std::cerr<<"Reprojected points after opmization: "< 30) + usleep(2000); + if(img_align_n_tracked > Config::qualityMinFts()) { SE3 T_f_w_last = last_frame_->T_f_w_; last_frame_ = ref_keyframe; @@ -237,7 +237,6 @@ FrameHandlerMono::UpdateResult FrameHandlerMono::relocalizeFrame( if(res != RESULT_FAILURE) { stage_ = STAGE_DEFAULT_FRAME; - SVO_INFO_STREAM("Relocalization successful."); } else new_frame_->T_f_w_ = T_f_w_last; // reset to last well localized pose diff --git a/svo/src/imu_integration.cpp b/svo/src/imu_integration.cpp index 2aed670..c2a720f 100644 --- a/svo/src/imu_integration.cpp +++ b/svo/src/imu_integration.cpp @@ -104,7 +104,7 @@ bool Imu_Integration::predict(boost::shared_ptr& new_frame,std::size graphPtr->addPrior(V(0),statePtr->v(),gtsam::noiseModel::Isotropic::Sigma(3, 1e-4)); graphPtr->addPrior(B(0),*imu_biasPtr,gtsam::noiseModel::Isotropic::Sigma(6, 1e-2)); }else{ - if(imu_n<3)return false; + if(imu_n<1)return false; auto preint_imu_combined =dynamic_cast(*preintegratedPtr); valuesPtr->insert(P(imu_factor_id), gtsam::Pose3(new_frame->T_f_w_.matrix())); valuesPtr->insert(V(imu_factor_id), statePtr->v());