Commit 28aa41de authored by wangdawei's avatar wangdawei

skipCnt by match result

parent 133a399f
...@@ -42,6 +42,7 @@ AdjustPPK::AdjustPPK(const string &ieBaseDir, const string &mapDir) ...@@ -42,6 +42,7 @@ AdjustPPK::AdjustPPK(const string &ieBaseDir, const string &mapDir)
LOG(INFO) << "calib_: " << calib_.translation().transpose() LOG(INFO) << "calib_: " << calib_.translation().transpose()
<< " rpy: " << rpy.transpose(); << " rpy: " << rpy.transpose();
trd_.reset(new boost::thread(boost::bind(&AdjustPPK::LoadMap, this))); trd_.reset(new boost::thread(boost::bind(&AdjustPPK::LoadMap, this)));
skipCnt_ = 20;
} }
AdjustPPK::~AdjustPPK() AdjustPPK::~AdjustPPK()
...@@ -85,7 +86,7 @@ void AdjustPPK::ReadBag(const string &bagPath) ...@@ -85,7 +86,7 @@ void AdjustPPK::ReadBag(const string &bagPath)
continue; continue;
} }
PPointCloud cloud; PPointCloud cloud;
if(cloudCnt_ % 20 != 0){ if(cloudCnt_ % skipCnt_ != 0){
cloudCnt_++; cloudCnt_++;
continue; continue;
} }
...@@ -534,9 +535,10 @@ bool AdjustPPK::LocateCloud(const CloudInfoForMatch &cloudInfo) ...@@ -534,9 +535,10 @@ bool AdjustPPK::LocateCloud(const CloudInfoForMatch &cloudInfo)
guessPose.precision_type = MATCH_PRECISION_INIT; guessPose.precision_type = MATCH_PRECISION_INIT;
currMatcher_->MatchPointCloud(cloudInfo.frame, guessPose, finalGnssPose, finalPose); currMatcher_->MatchPointCloud(cloudInfo.frame, guessPose, finalGnssPose, finalPose);
mapPose_ = finalPose.cast<double>(); mapPose_ = finalPose.cast<double>();
skipCnt_ = 5;
return true; return true;
} }
skipCnt_ = 20;
guessPose.map_point = finalPose.cast<double>(); guessPose.map_point = finalPose.cast<double>();
guessPose.precision_type = MATCH_PRECISION_HIGH; guessPose.precision_type = MATCH_PRECISION_HIGH;
currMatcher_->MatchPointCloud(cloudInfo.frame, guessPose, finalGnssPose, finalPose); currMatcher_->MatchPointCloud(cloudInfo.frame, guessPose, finalGnssPose, finalPose);
......
...@@ -129,6 +129,8 @@ private: ...@@ -129,6 +129,8 @@ private:
bool requestQuit_ = false; bool requestQuit_ = false;
string baseTaskName_; string baseTaskName_;
uint16_t skipCnt_;
}; };
} // end of namespace } // end of namespace
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment