Commit c5a2ad68 authored by wangdawei's avatar wangdawei

down sample local ppk

parent 57e4b901
...@@ -73,7 +73,7 @@ int main(int argc, char *argv[]) ...@@ -73,7 +73,7 @@ int main(int argc, char *argv[])
auto end = std::chrono::high_resolution_clock::now(); auto end = std::chrono::high_resolution_clock::now();
auto time_used = std::chrono::duration_cast<std::chrono::duration<double>>(end - start).count(); auto time_used = std::chrono::duration_cast<std::chrono::duration<double>>(end - start).count();
LOG(INFO) << "ReadBag time_used " << time_used; LOG(INFO) << "ReadBag time_used " << time_used;
break; // break;
} }
} }
......
...@@ -272,6 +272,8 @@ void AdjustPPK::CalLocalPose() ...@@ -272,6 +272,8 @@ void AdjustPPK::CalLocalPose()
localPoseVec_.reserve(rawData_.size()); localPoseVec_.reserve(rawData_.size());
proj_.Reset(center_.y(), center_.x(), center_.z()); proj_.Reset(center_.y(), center_.x(), center_.z());
std::ofstream ofs(ieBaseDir_ + "/LocalPPK.txt", ios::out); std::ofstream ofs(ieBaseDir_ + "/LocalPPK.txt", ios::out);
std::ofstream ofs_1(ieBaseDir_ + "/LocalPPK_DownSample.txt", ios::out);
uint64_t cnt = 0;
for(const IERawData& rawPPK : rawData_){ for(const IERawData& rawPPK : rawData_){
IsometryData localPose; IsometryData localPose;
proj_.Forward(rawPPK.latitude, rawPPK.longitude, rawPPK.height, proj_.Forward(rawPPK.latitude, rawPPK.longitude, rawPPK.height,
...@@ -285,8 +287,13 @@ void AdjustPPK::CalLocalPose() ...@@ -285,8 +287,13 @@ void AdjustPPK::CalLocalPose()
ofs << setprecision(16) << localPose.timestamp << ", " << localPose.pose.translation().x() ofs << setprecision(16) << localPose.timestamp << ", " << localPose.pose.translation().x()
<< ", " << localPose.pose.translation().y() << ", " << localPose.pose.translation().z() << endl; << ", " << localPose.pose.translation().y() << ", " << localPose.pose.translation().z() << endl;
if(0 == cnt++ % 10){
ofs_1 << setprecision(16) << localPose.timestamp << ", " << localPose.pose.translation().x()
<< ", " << localPose.pose.translation().y() << ", " << localPose.pose.translation().z() << endl;
}
} }
ofs.close(); ofs.close();
ofs_1.close();
LOG(INFO) << "localPoseVec_.size(): " << localPoseVec_.size(); LOG(INFO) << "localPoseVec_.size(): " << localPoseVec_.size();
} }
...@@ -398,7 +405,7 @@ bool AdjustPPK::Undisort( ...@@ -398,7 +405,7 @@ bool AdjustPPK::Undisort(
cloudInfo.filterPoseInfo.filterPose = framePose; cloudInfo.filterPoseInfo.filterPose = framePose;
Quaterniond q(increasePose.linear()); Quaterniond q(increasePose.linear());
Vector3d rpy= RotationQuaternionToEulerVector(q); Vector3d rpy= RotationQuaternionToEulerVector(q);
LOG_EVERY_N(INFO, 1) << setprecision(15) LOG_EVERY_N(INFO, 100) << setprecision(15)
<< " periodPose.front(): " << periodPose.front().timestamp << " periodPose.front(): " << periodPose.front().timestamp
<< " periodPose.back(): " << periodPose.back().timestamp << " periodPose.back(): " << periodPose.back().timestamp
<< " increasePose: " << increasePose.translation().transpose() << " increasePose: " << increasePose.translation().transpose()
...@@ -453,7 +460,7 @@ bool AdjustPPK::LocateCloud(const CloudInfoForMatch &cloudInfo) ...@@ -453,7 +460,7 @@ bool AdjustPPK::LocateCloud(const CloudInfoForMatch &cloudInfo)
Quaterniond q(guess.linear()); Quaterniond q(guess.linear());
Vector3d rpy= RotationQuaternionToEulerVector(q); Vector3d rpy= RotationQuaternionToEulerVector(q);
LOG(INFO) << setprecision(15) << "cloud time: " << cloudInfo.timestamp LOG_EVERY_N(INFO, 100) << setprecision(15) << "cloud time: " << cloudInfo.timestamp
<< " guessPose: " << guess.translation().transpose() << " guessPose: " << guess.translation().transpose()
<< " rpy: " << rpy.transpose(); << " rpy: " << rpy.transpose();
// pcl::io::savePCDFileBinary(ieBaseDir_ + "/baseCloud/" + to_string(cloudInfo.timestamp) + ".pcd", *cloudInfo.frame); // pcl::io::savePCDFileBinary(ieBaseDir_ + "/baseCloud/" + to_string(cloudInfo.timestamp) + ".pcd", *cloudInfo.frame);
......
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