Commit 868a7556 authored by wangdawei's avatar wangdawei

test

parent fda22805
...@@ -128,7 +128,11 @@ void AdjustPPK::OnReceivedCloud(const PPointCloud &cloud) ...@@ -128,7 +128,11 @@ void AdjustPPK::OnReceivedCloud(const PPointCloud &cloud)
// } // }
// pcl::io::savePCDFileBinary(ieBaseDir_ + "/" + to_string(cloudPacket.timestamp) + "_raw.pcd", cloud); // pcl::io::savePCDFileBinary(ieBaseDir_ + "/" + to_string(cloudPacket.timestamp) + "_raw.pcd", cloud);
// exit(0); // exit(0);
for(const auto &p : cloud){ for(size_t i = 0; i < cloud.size(); i++){
if(i % 5 != 0){
continue;
}
const auto &p = cloud.at(i);
PointInter point; PointInter point;
point.x = p.x; point.x = p.x;
point.y = p.y; point.y = p.y;
...@@ -493,7 +497,7 @@ bool AdjustPPK::LoadMesh(const string &streamPath, boost::shared_ptr<VoxelMapMat ...@@ -493,7 +497,7 @@ bool AdjustPPK::LoadMesh(const string &streamPath, boost::shared_ptr<VoxelMapMat
LOG(INFO) << "mesh to load: " << streamPath; LOG(INFO) << "mesh to load: " << streamPath;
VoxelMapMatcherOption option; VoxelMapMatcherOption option;
option.option.filter_resolution = 1.2; option.option.filter_resolution = 0.5;
option.option.cloud_range = 80; option.option.cloud_range = 80;
option.fast_option.accepted_score = 0.4; option.fast_option.accepted_score = 0.4;
option.fast_option.accepted_low_score = 0.5; option.fast_option.accepted_low_score = 0.5;
......
...@@ -81,6 +81,7 @@ void BlockArea::parseBitmapBlock( ...@@ -81,6 +81,7 @@ void BlockArea::parseBitmapBlock(
{ {
vector<uint32_t> activeGridIndexes = vector<uint32_t> activeGridIndexes =
parseBitMap(blockInfo.bit_map(), blockInfo.bit_map_size()); parseBitMap(blockInfo.bit_map(), blockInfo.bit_map_size());
activeGridSize_ = activeGridIndexes.size();
vector<pair<uint32_t, uint32_t>> shiftedAndFeatureVec; vector<pair<uint32_t, uint32_t>> shiftedAndFeatureVec;
distributionVec_.reserve(activeGridIndexes.size() * 60); distributionVec_.reserve(activeGridIndexes.size() * 60);
hashMap_.reserve(activeGridIndexes.size() * 15); hashMap_.reserve(activeGridIndexes.size() * 15);
...@@ -103,6 +104,7 @@ void BlockArea::parseIndexBlock( ...@@ -103,6 +104,7 @@ void BlockArea::parseIndexBlock(
const BlockInfo &blockInfo) const BlockInfo &blockInfo)
{ {
uint32_t gridFeatureIndexSize = blockInfo.grid_feature_index_size(); uint32_t gridFeatureIndexSize = blockInfo.grid_feature_index_size();
activeGridSize_ = gridFeatureIndexSize;
distributionVec_.reserve(gridFeatureIndexSize * 60); distributionVec_.reserve(gridFeatureIndexSize * 60);
hashMap_.reserve(gridFeatureIndexSize * 15); hashMap_.reserve(gridFeatureIndexSize * 15);
vector<pair<uint32_t, uint32_t>> shiftedAndFeatureVec; vector<pair<uint32_t, uint32_t>> shiftedAndFeatureVec;
......
...@@ -69,7 +69,7 @@ public: ...@@ -69,7 +69,7 @@ public:
} }
inline size_t GetGridSize(){ inline size_t GetGridSize(){
return hashMap_.size(); return activeGridSize_;
} }
private: private:
void parseBitmapBlock(const BlockInfo &blockInfo); void parseBitmapBlock(const BlockInfo &blockInfo);
...@@ -114,6 +114,8 @@ private: ...@@ -114,6 +114,8 @@ private:
vector<double> plainParams_; vector<double> plainParams_;
bool plainParamValid_ = false; bool plainParamValid_ = false;
uint32_t activeGridSize_;
}; };
} }
......
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