Skip to content

Commit

Permalink
delete some test log
Browse files Browse the repository at this point in the history
  • Loading branch information
jingpang committed May 28, 2017
1 parent daba37b commit b871d0e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
14 changes: 0 additions & 14 deletions src/LocalMapping.cc
Original file line number Diff line number Diff line change
Expand Up @@ -757,15 +757,6 @@ bool LocalMapping::TryInitVIO(void)
KeyFrame* pKF = lpKFtoCheck.front();
const set<KeyFrame*> sChilds = pKF->GetChilds();
cv::Mat Twc = pKF->GetPoseInverse();
const NavState& NS = pKF->GetNavState();
//Debug log
if(pKF->mnBAGlobalForKF==nGBAKF)
{
cv::Mat tTwb1 = Twc*ConfigParam::GetMatT_cb();
if((Converter::toVector3d(tTwb1.rowRange(0,3).col(3))-NS.Get_P()).norm()>1e-6)
cout<<"Twc*Tcb != NavState for GBA KFs, id "<<pKF->mnId<<": "<<tTwb1.rowRange(0,3).col(3).t()<<"/"<<NS.Get_P().transpose()<<endl;
}
else cout<<"pKF->mnBAGlobalForKF != nGBAKF???"<<endl;
for(set<KeyFrame*>::const_iterator sit=sChilds.begin();sit!=sChilds.end();sit++)
{
KeyFrame* pChild = *sit;
Expand Down Expand Up @@ -799,11 +790,6 @@ bool LocalMapping::TryInitVIO(void)

lpKFtoCheck.pop_front();

//Test log
cv::Mat tTwb = pKF->GetPoseInverse()*ConfigParam::GetMatT_cb();
Vector3d tPwb = Converter::toVector3d(tTwb.rowRange(0,3).col(3));
if( (tPwb-pKF->GetNavState().Get_P()).norm()>1e-6 )
cerr<<"pKF PoseInverse Pwb != NavState.P ?"<<tPwb.transpose()<<"/"<<pKF->GetNavState().Get_P().transpose()<<endl;
}

// Correct MapPoints
Expand Down
2 changes: 1 addition & 1 deletion src/Optimizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ void Optimizer::LocalBAPRVIDP(KeyFrame *pCurKF, const std::list<KeyFrame*> &lLoc
Vector3d Pref;
Pref << refXY[0], refXY[1], 1.0;
double rho = vPoint->estimate();
if(rho<1e-4) {cerr<<"rho="<<rho<<". ";rho = 1e-4;}
//if(rho<1e-4) {cerr<<"rho="<<rho<<". ";rho = 1e-4;}

Pref *= 1.0/rho; // point coordinate in reference frame

Expand Down
4 changes: 2 additions & 2 deletions src/Tracking.cc
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ bool Tracking::TrackLocalMapWithIMU(bool bMapUpdated)
IMUPreintegrator imupreint = GetIMUPreIntSinceLastKF(&mCurrentFrame, mpLastKeyFrame, mvIMUSinceLastKF);

// Test log
if(mpLocalMapper->GetFirstVINSInited() && !bMapUpdated) cerr<<"1-FirstVinsInit, but not bMapUpdated. shouldn't"<<endl;
//if(mpLocalMapper->GetFirstVINSInited() && !bMapUpdated) cerr<<"1-FirstVinsInit, but not bMapUpdated. shouldn't"<<endl;
if(mCurrentFrame.GetNavState().Get_dBias_Acc().norm() > 1e-6) cerr<<"TrackLocalMapWithIMU current Frame dBias acc not zero"<<endl;
if(mCurrentFrame.GetNavState().Get_dBias_Gyr().norm() > 1e-6) cerr<<"TrackLocalMapWithIMU current Frame dBias gyr not zero"<<endl;

Expand Down Expand Up @@ -294,7 +294,7 @@ void Tracking::PredictNavStateByIMU(bool bMapUpdated)
// Map updated, optimize with last KeyFrame
if(mpLocalMapper->GetFirstVINSInited() || bMapUpdated)
{
if(mpLocalMapper->GetFirstVINSInited() && !bMapUpdated) cerr<<"2-FirstVinsInit, but not bMapUpdated. shouldn't"<<endl;
//if(mpLocalMapper->GetFirstVINSInited() && !bMapUpdated) cerr<<"2-FirstVinsInit, but not bMapUpdated. shouldn't"<<endl;

// Compute IMU Pre-integration
mIMUPreIntInTrack = GetIMUPreIntSinceLastKF(&mCurrentFrame, mpLastKeyFrame, mvIMUSinceLastKF);
Expand Down

0 comments on commit b871d0e

Please sign in to comment.