Commit bb858edf authored by wangdawei's avatar wangdawei

parse test

parent b4b256d7
...@@ -61,8 +61,9 @@ int main(int argc, char *argv[]) ...@@ -61,8 +61,9 @@ int main(int argc, char *argv[])
boost::filesystem::create_directory(FLAGS_log_dir); boost::filesystem::create_directory(FLAGS_log_dir);
} }
AdjustPPK adjustPPK(FLAGS_ie_base_dir, FLAGS_map_dir); AdjustPPK adjustPPK(FLAGS_ie_base_dir, FLAGS_map_dir);
adjustPPK.ConfigConvert(FLAGS_ie_base_dir + "/Pandar128_Firetimes.csv", adjustPPK.ConfigConvert(FLAGS_ie_base_dir + "/P12838CC539738CE52.csv",
FLAGS_ie_base_dir + "/Pandar128_Correction.csv"); FLAGS_ie_base_dir + "/Pandar128_Correction.csv");
adjustPPK.ReadBag("/home/wdw/Documents/test/test.bag");
directory_iterator bag_iter(FLAGS_ie_base_dir); directory_iterator bag_iter(FLAGS_ie_base_dir);
directory_iterator bag_end_iter; directory_iterator bag_end_iter;
for(; bag_iter != bag_end_iter; bag_iter++) { for(; bag_iter != bag_end_iter; bag_iter++) {
......
...@@ -81,10 +81,10 @@ void AdjustPPK::ReadBag(const string &bagPath) ...@@ -81,10 +81,10 @@ void AdjustPPK::ReadBag(const string &bagPath)
continue; continue;
} }
PPointCloud cloud; PPointCloud cloud;
if(cloudCnt_ % 20 != 0){ // if(cloudCnt_ % 20 != 0){
cloudCnt_++; // cloudCnt_++;
continue; // continue;
} // }
if(convert_->processScan(m.instantiate<pandar_msgs::PandarScan>(), cloud)){ if(convert_->processScan(m.instantiate<pandar_msgs::PandarScan>(), cloud)){
OnReceivedCloud(cloud); OnReceivedCloud(cloud);
} }
...@@ -110,7 +110,7 @@ Vector3d AdjustPPK::ReadCenter(const string& taskName) ...@@ -110,7 +110,7 @@ Vector3d AdjustPPK::ReadCenter(const string& taskName)
boost::split(line_vec, line, boost::is_any_of(":"), boost::token_compress_on); boost::split(line_vec, line, boost::is_any_of(":"), boost::token_compress_on);
center.z() = stof(line_vec.at(1)); center.z() = stof(line_vec.at(1));
} }
LOG(INFO) << "center_: " << center.transpose(); // LOG(INFO) << "center_: " << center.transpose();
return center; return center;
} }
...@@ -141,6 +141,8 @@ void AdjustPPK::OnReceivedCloud(const PPointCloud &cloud) ...@@ -141,6 +141,8 @@ void AdjustPPK::OnReceivedCloud(const PPointCloud &cloud)
// << " frontPTime: " << cloud.front().timestamp // << " frontPTime: " << cloud.front().timestamp
// << " backPTime: " << cloud.back().timestamp; // << " backPTime: " << cloud.back().timestamp;
pcl::io::savePCDFileBinary(ieBaseDir_ + "/baseCloud/" + to_string(cloudPacket.timestamp) + "_ori.pcd", cloud);
exit(0);
for(size_t i = 0; i < cloud.size(); i++){ for(size_t i = 0; i < cloud.size(); i++){
if(i % 5 != 0){ if(i % 5 != 0){
continue; continue;
...@@ -412,7 +414,7 @@ bool AdjustPPK::Undisort( ...@@ -412,7 +414,7 @@ bool AdjustPPK::Undisort(
Quaterniond q(increasePose.linear()); Quaterniond q(increasePose.linear());
Vector3d rpy= RotationQuaternionToEulerVector(q); Vector3d rpy= RotationQuaternionToEulerVector(q);
LOG_EVERY_N(INFO, 100) << 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()
<< " rpy: " << rpy.transpose(); << " rpy: " << rpy.transpose();
......
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