Commit aef6af1d authored by wangdawei's avatar wangdawei

test

parent baaf0e62
...@@ -329,11 +329,11 @@ bool AdjustPPK::Undisort( ...@@ -329,11 +329,11 @@ bool AdjustPPK::Undisort(
PointCloudJ::Ptr undisortedFrame(new PointCloudJ); PointCloudJ::Ptr undisortedFrame(new PointCloudJ);
PointCloudJ mappedFrame; PointCloudJ mappedFrame;
CloudPreprocess::Instance()->Undisort( CloudPreprocess::Instance()->Undisort(
frame, undisortedFrame, &mappedFrame, rawFrame.cloud.back().time, &periodPose, framePose, increasePose); frame, undisortedFrame, &mappedFrame, periodPose.back().timestamp, &periodPose, framePose, increasePose);
pcl::io::savePCDFileBinary(ieBaseDir_ + "/baseCloud/" + to_string(rawFrame.timestamp) + "_mapped.pcd", mappedFrame); pcl::io::savePCDFileBinary(ieBaseDir_ + "/baseCloud/" + to_string(rawFrame.timestamp) + "_mapped.pcd", mappedFrame);
cloudInfo.frame = undisortedFrame; cloudInfo.frame = undisortedFrame;
cloudInfo.filterPoseInfo.increasePose = increasePose; cloudInfo.filterPoseInfo.increasePose = increasePose;
cloudInfo.timestamp = rawFrame.timestamp; cloudInfo.timestamp = periodPose.back().timestamp;
cloudInfo.filterPoseInfo.filterPose = framePose; cloudInfo.filterPoseInfo.filterPose = framePose;
Quaterniond q(increasePose.linear()); Quaterniond q(increasePose.linear());
Vector3d rpy= RotationQuaternionToEulerVector(q); Vector3d rpy= RotationQuaternionToEulerVector(q);
...@@ -411,7 +411,7 @@ bool AdjustPPK::LocateCloud(const CloudInfoForMatch &cloudInfo) ...@@ -411,7 +411,7 @@ bool AdjustPPK::LocateCloud(const CloudInfoForMatch &cloudInfo)
} }
double avgGridCnt = currMatcher_->AreaAvgGridCnt(guess.translation()); double avgGridCnt = currMatcher_->AreaAvgGridCnt(guess.translation());
LOG(INFO) << "avgGridCnt: " << avgGridCnt; LOG(INFO) << "avgGridCnt: " << avgGridCnt;
if(avgGridCnt < 30000){ if(avgGridCnt < 20000){
return false; return false;
} }
ofs << setprecision(16) << cloudInfo.timestamp << ", " << guess.translation().x() ofs << setprecision(16) << cloudInfo.timestamp << ", " << guess.translation().x()
...@@ -422,14 +422,14 @@ bool AdjustPPK::LocateCloud(const CloudInfoForMatch &cloudInfo) ...@@ -422,14 +422,14 @@ bool AdjustPPK::LocateCloud(const CloudInfoForMatch &cloudInfo)
if(score < 0){ if(score < 0){
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_ = mapPose_ * (guess.inverse() * finalPose.cast<double>()); mapPose_ = finalPose.cast<double>();
return true; return true;
} }
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);
mapPose_ = mapPose_ * (guess.inverse() * finalPose.cast<double>()); mapPose_ = finalPose.cast<double>();
return true; return true;
} }
......
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