Commit 0479f927 authored by limingbo's avatar limingbo

test

parent 5809545d
...@@ -236,11 +236,6 @@ void filterByPosition( ...@@ -236,11 +236,6 @@ void filterByPosition(
for(auto &filteredOneRet : filteredRet){ for(auto &filteredOneRet : filteredRet){
if(filteredOneRet.index == index){ if(filteredOneRet.index == index){
filteredOneRet.periods.push_back(ret.at(index).periods.at(longestIndex.second)); filteredOneRet.periods.push_back(ret.at(index).periods.at(longestIndex.second));
PointCloudExport periodCloud =
getCloudFromPeriod(pointClouds.at(ret.at(index).index), filteredOneRet.periods.back());
pcl::io::savePCDFileBinary("/tmp/" + filteredOneRet.trajPath +
"_" + to_string(filteredOneRet.periods.back().first) +
".pcd", periodCloud);
findIndex = true; findIndex = true;
break; break;
} }
...@@ -251,11 +246,6 @@ void filterByPosition( ...@@ -251,11 +246,6 @@ void filterByPosition(
closeTrajInfo.periods.push_back(ret.at(index).periods.at(longestIndex.second)); closeTrajInfo.periods.push_back(ret.at(index).periods.at(longestIndex.second));
closeTrajInfo.trajPath = ret.at(index).trajPath; closeTrajInfo.trajPath = ret.at(index).trajPath;
filteredRet.push_back(closeTrajInfo); filteredRet.push_back(closeTrajInfo);
PointCloudExport periodCloud =
getCloudFromPeriod(pointClouds.at(ret.at(index).index), closeTrajInfo.periods.back());
pcl::io::savePCDFileBinary("/tmp/" + closeTrajInfo.trajPath +
"_" + to_string(closeTrajInfo.periods.back().first) +
".pcd", periodCloud);
} }
} }
...@@ -327,6 +317,17 @@ vector<CloseTrajInfo> crossFilter( ...@@ -327,6 +317,17 @@ vector<CloseTrajInfo> crossFilter(
} }
} }
filterByPosition(ret, pointClouds); filterByPosition(ret, pointClouds);
for(size_t retIndex = 0; retIndex < ret.size(); retIndex++){
const auto& oneRet = ret.at(retIndex);
for(size_t periodIndex = 0; periodIndex < oneRet.periods.size(); periodIndex++){
PointCloudExport periodCloud =
getCloudFromPeriod(pointClouds.at(oneRet.index), oneRet.periods.at(periodIndex));
pcl::io::savePCDFileBinary("/tmp/" + to_string(filteredTaskInfo[oneRet.index].meshId) +
"_" + to_string(oneRet.periods.at(periodIndex).first) +
".pcd", periodCloud);
}
}
return ret; return ret;
} }
......
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