Commit 8d09866d authored by wangdawei's avatar wangdawei

test

parent ce866287
...@@ -56,7 +56,7 @@ void AdjustPPK::ReadBag(const string &bagPath) ...@@ -56,7 +56,7 @@ void AdjustPPK::ReadBag(const string &bagPath)
for(; viewIterator != view->end();) for(; viewIterator != view->end();)
{ {
const rosbag::MessageInstance &m = *viewIterator; const rosbag::MessageInstance &m = *viewIterator;
// LOG_EVERY_N(INFO, 10000)<< setprecision(15) << "<< m.getTime(): " << m.getTime().toSec(); LOG_EVERY_N(INFO, 1)<< setprecision(15) << "<< m.getTime(): " << m.getTime().toSec();
if(!m.isType<pandar_msgs::PandarScan>()){ if(!m.isType<pandar_msgs::PandarScan>()){
viewIterator++; viewIterator++;
continue; continue;
...@@ -94,6 +94,7 @@ void AdjustPPK::OnReceivedCloud(const PPointCloud &cloud) ...@@ -94,6 +94,7 @@ void AdjustPPK::OnReceivedCloud(const PPointCloud &cloud)
pcl_conversions::fromPCL(cloud.header.stamp, rosTime); pcl_conversions::fromPCL(cloud.header.stamp, rosTime);
cloudPacket.timestamp = rosTime.toSec(); cloudPacket.timestamp = rosTime.toSec();
cloudPacket.cloud.reserve(cloud.size()); cloudPacket.cloud.reserve(cloud.size());
LOG(INFO) << setprecision(15) << "OnReceivedCloud: " << cloudPacket.timestamp;
for(const auto &p : cloud){ for(const auto &p : cloud){
PointInter point; PointInter point;
point.x = p.x; point.x = p.x;
...@@ -326,8 +327,12 @@ void AdjustPPK::LoadMap() ...@@ -326,8 +327,12 @@ void AdjustPPK::LoadMap()
} }
string streamPath = outputDir + to_string(meshId) + ".stream"; string streamPath = outputDir + to_string(meshId) + ".stream";
Compress(meshInfo.pcdPathVec, streamPath); if(!exists(streamPath)){
LOG(WARNING) << "mesh compressed: " << meshId; Compress(meshInfo.pcdPathVec, streamPath);
LOG(WARNING) << "mesh compressed: " << meshId;
}else{
LOG(WARNING) << "mesh exists: " << meshId;
}
LoadMesh(streamPath, meshInfo); LoadMesh(streamPath, meshInfo);
LOG(WARNING) << "mesh loaded: " << meshId; LOG(WARNING) << "mesh loaded: " << meshId;
......
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