Commit b006bd72 authored by wangdawei's avatar wangdawei

map dir

parent 1e1a2534
......@@ -578,16 +578,16 @@ void AdjustPPK::Compress(const vector<PCDPathInfo> &pcdPathVec,
*pointcloud += pc;
}
LOG(INFO) << "pointcloud->size() to dispatch: " << pointcloud->size();
PointCloudExport downSampledPc;
downSampledPc.reserve(pointcloud->size() * 0.06);
for(size_t i = 0; i < pointcloud->size(); i++){
if(i % 20 != 0){
continue;
}
const auto& p = pointcloud->at(i);
downSampledPc.push_back(p);
}
pcl::io::savePCDFileBinary(ieBaseDir_ + "/downSampledPc.pcd", downSampledPc);
// PointCloudExport downSampledPc;
// downSampledPc.reserve(pointcloud->size() * 0.06);
// for(size_t i = 0; i < pointcloud->size(); i++){
// if(i % 20 != 0){
// continue;
// }
// const auto& p = pointcloud->at(i);
// downSampledPc.push_back(p);
// }
// pcl::io::savePCDFileBinary(ieBaseDir_ + "/downSampledPc.pcd", downSampledPc);
boost::shared_ptr<Dispatch> dispatch(new Dispatch(pointcloud));
// dispatch.setMeshId(meshId);
dispatch->configOffset();
......
......@@ -62,7 +62,7 @@ void Dispatch::configOffset()
point.y -= offset_.y();
// point.z -= offset_.z();
}
LOG(INFO) << "offset_: " << offset_.transpose();
}
void Dispatch::dispatch()
......@@ -128,8 +128,13 @@ void Dispatch::dispatchPoint(const PointExport &point)
// auto gi = bl[0]->getGridIndexByPoint(p);
Vector2i blockIndex = meshLayer_->getGridIndexByPoint(point);
BlockGrid* block = reinterpret_cast<BlockGrid*>(
meshLayer_->getBlock(blockIndex).get());
BlockGrid* block;
try{
block = reinterpret_cast<BlockGrid*>(
meshLayer_->getBlock(blockIndex).get());
} catch (exception e){
LOG(INFO) << blockIndex.transpose();
}
vector<boost::shared_ptr<GridLayer>> blockLayers =
block->getLayers();
for(const auto &blockLayer : blockLayers){
......
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