Commit 03e2c139 authored by limingbo's avatar limingbo

test

parent 0d177b48
...@@ -236,6 +236,11 @@ void filterByPosition( ...@@ -236,6 +236,11 @@ 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(oneRet.index), filteredOneRet.periods.back());
pcl::io::savePCDFileBinary("/tmp/" + to_string(filteredOneRet.trajPath) +
"_" + to_string(filteredOneRet.periods.back().first) +
".pcd", periodCloud);
findIndex = true; findIndex = true;
break; break;
} }
...@@ -246,6 +251,11 @@ void filterByPosition( ...@@ -246,6 +251,11 @@ 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(oneRet.index), closeTrajInfo.periods.back());
pcl::io::savePCDFileBinary("/tmp/" + to_string(closeTrajInfo.trajPath) +
"_" + to_string(closeTrajInfo.periods.back().first) +
".pcd", periodCloud);
} }
} }
...@@ -301,11 +311,6 @@ vector<CloseTrajInfo> crossFilter( ...@@ -301,11 +311,6 @@ vector<CloseTrajInfo> crossFilter(
end = query.info; end = query.info;
inPeriod = false; inPeriod = false;
timePeriods.push_back(make_pair(start, end)); timePeriods.push_back(make_pair(start, end));
PointCloudExport periodCloud =
getCloudFromPeriod(pointClouds.at(pcIndex), timePeriods.back());
pcl::io::savePCDFileBinary("/tmp/" + to_string(filteredTaskInfo[pcIndex].meshId) +
"_" + to_string(timePeriods.back().first) +
".pcd", periodCloud);
// LOG(INFO) << setprecision(15) << "end: " << end; // LOG(INFO) << setprecision(15) << "end: " << end;
} }
} }
......
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