Commit f040eae6 authored by wangdawei's avatar wangdawei

test

parent cdfd5fde
Pipeline #1530 canceled with stages
......@@ -129,26 +129,45 @@ void AdjustPPK::LoadPPK()
void AdjustPPK::LoadMapInfo()
{
// string meshDir = mapDir_ + "/mesh";
// if(is_directory(meshDir)){
// directory_iterator mesh_iter(meshDir);
// directory_iterator mesh_end_iter;
// for(; mesh_iter != mesh_end_iter; mesh_iter++) {
// if (!is_directory(mesh_iter->path())){
// continue;
// }
// string meshId = mesh_iter->path().stem().string();
// MashMap meshMap;
// meshMap.pcdPathVec.reserve(10);
// directory_iterator pcd_iter(mesh_iter->path());
// directory_iterator pcd_end_iter;
// for(; pcd_iter != pcd_end_iter; pcd_iter++) {
// if(pcd_iter->path().extension().string() != ".pcd"){
// continue;
// }
// meshMap.pcdPathVec.push_back(pcd_iter->path().string());
// }
// meshVec_.insert(make_pair(ulong(stoi(meshId)), meshMap));
// }
// }
string meshDir = mapDir_ + "/pcd_cart";
if(is_directory(meshDir)){
directory_iterator mesh_iter(meshDir);
directory_iterator mesh_end_iter;
for(; mesh_iter != mesh_end_iter; mesh_iter++) {
if (!is_directory(mesh_iter->path())){
directory_iterator pcd_iter(meshDir);
directory_iterator pcd_end_iter;
for(; pcd_iter != pcd_end_iter; pcd_iter++) {
if(pcd_iter->path().extension().string() != ".pcd"){
continue;
}
string meshId = mesh_iter->path().stem().string();
MashMap meshMap;
meshMap.pcdPathVec.reserve(10);
directory_iterator pcd_iter(mesh_iter->path());
directory_iterator pcd_end_iter;
for(; pcd_iter != pcd_end_iter; pcd_iter++) {
if(pcd_iter->path().extension().string() != ".pcd"){
continue;
}
auto fileName = pcd_iter->path().filename().string();
ulong meshId = stoi(split_string(fileName, '_').front());
if(meshVec_.find(meshId) == meshVec_.end()){
MashMap meshMap;
meshMap.pcdPathVec.push_back(pcd_iter->path().string());
meshVec_.insert(make_pair(ulong(stoi(meshId)), meshMap));
}else{
meshVec_.at(meshId).pcdPathVec.push_back(pcd_iter->path().string());
}
meshVec_.insert(make_pair(ulong(stoi(meshId)), meshMap));
}
}
LOG(INFO) << "meshVec_.size(): " << meshVec_.size();
......
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