Commit 3bd95482 authored by wangdawei's avatar wangdawei

map dir

parent 8eb8dd5b
......@@ -48,7 +48,7 @@ void Dispatch::configOffset()
Vector3d totalPosi = Vector3d::Zero();
size_t cnt = 0;
for(size_t i = 0; i < pointcloud_->size(); i++){
if(i > 0 && i % 500000 == 0){
if(i > 0 && i % 1000000 == 0){
LOG(INFO) << "totalPosi: " << totalPosi.transpose()
<< " cnt: " << cnt;
avgPosiVec.push_back(totalPosi / cnt);
......@@ -56,6 +56,10 @@ void Dispatch::configOffset()
cnt = 0;
}
const auto &point = pointcloud_->at(i);
if(isnanf(point.x) || isnanf(point.y)){
LOG_EVERY_N(INFO, 9999) << "nan";
continue;
}
totalPosi.x() += point.x;
totalPosi.y() += point.y;
// z += point.z;
......
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