Commit 65f57bcd authored by wangdawei's avatar wangdawei

radio

parent ceb29187
...@@ -100,7 +100,7 @@ void AdjustPPK::ReadBag(const string &bagPath) ...@@ -100,7 +100,7 @@ void AdjustPPK::ReadBag(const string &bagPath)
Vector3d AdjustPPK::ReadCenter(const string& taskName) Vector3d AdjustPPK::ReadCenter(const string& taskName)
{ {
Vector3d center; Vector3d center;
string centerPath = mapDir_ + taskName + "/" + taskName + "meshes.center.txt"; string centerPath = mapDir_ + "/" + taskName + "/" + taskName + "meshes.center.txt";
std::ifstream ifs(centerPath); std::ifstream ifs(centerPath);
string line; string line;
vector<string> line_vec; vector<string> line_vec;
...@@ -530,7 +530,7 @@ bool AdjustPPK::LocateCloud(const CloudInfoForMatch &cloudInfo) ...@@ -530,7 +530,7 @@ bool AdjustPPK::LocateCloud(const CloudInfoForMatch &cloudInfo)
double avgGridCnt = currMatcher_->AreaAvgGridCnt(guess.translation()); double avgGridCnt = currMatcher_->AreaAvgGridCnt(guess.translation());
if(avgGridCnt < 20000){ if(avgGridCnt < 20000){
LOG(INFO) << "avgGridCnt < 20000! " << "avgGridCnt: " << avgGridCnt; LOG(INFO) << "avgGridCnt < 20000! " << "avgGridCnt: " << avgGridCnt;
CloseToPPK(); CloseToPPK(0.5);
return false; return false;
} }
ofs << setprecision(16) << cloudInfo.timestamp << ", " << guess.translation().x() ofs << setprecision(16) << cloudInfo.timestamp << ", " << guess.translation().x()
...@@ -542,7 +542,7 @@ bool AdjustPPK::LocateCloud(const CloudInfoForMatch &cloudInfo) ...@@ -542,7 +542,7 @@ 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>();
CloseToPPK(); CloseToPPK(0.1);
skipCnt_ = 5; skipCnt_ = 5;
return true; return true;
} }
...@@ -677,10 +677,9 @@ bool AdjustPPK::LoadMesh(const string &streamPath, boost::shared_ptr<VoxelMapMat ...@@ -677,10 +677,9 @@ bool AdjustPPK::LoadMesh(const string &streamPath, boost::shared_ptr<VoxelMapMat
return true; return true;
} }
void AdjustPPK::CloseToPPK() void AdjustPPK::CloseToPPK(double radio)
{ {
if(ppkIndex_ > 0){ if(ppkIndex_ > 0){
double radio = 0.9;
const auto &localPPK = localPoseVec_.at(ppkIndex_ - 1); const auto &localPPK = localPoseVec_.at(ppkIndex_ - 1);
mapPose_.translation() = mapPose_.translation() =
localPPK.pose.translation() * radio + localPPK.pose.translation() * radio +
......
...@@ -90,7 +90,7 @@ private: ...@@ -90,7 +90,7 @@ private:
bool LoadMesh(const string &streamPath, bool LoadMesh(const string &streamPath,
boost::shared_ptr<VoxelMapMatcher> &matcher); boost::shared_ptr<VoxelMapMatcher> &matcher);
void CloseToPPK(); void CloseToPPK(double radio);
private: private:
string ieBaseDir_; string ieBaseDir_;
......
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