Commit b006bd72 authored by wangdawei's avatar wangdawei

map dir

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