Commit 3a75f2c8 authored by wangdawei's avatar wangdawei

meshes.center

parent 376ef0eb
...@@ -97,20 +97,25 @@ void AdjustPPK::ReadBag(const string &bagPath) ...@@ -97,20 +97,25 @@ void AdjustPPK::ReadBag(const string &bagPath)
Vector3d AdjustPPK::ReadCenter(const string& taskName) Vector3d AdjustPPK::ReadCenter(const string& taskName)
{ {
Vector3d center; Vector3d center;
string centerPath = mapDir_ + taskName + "/" + taskName + "_station_jf.txt"; string centerPath = mapDir_ + taskName + "/" + taskName + "meshes.center.txt.txt";
std::ifstream ifs(centerPath); std::ifstream ifs(centerPath);
string line; string line;
vector<string> line_vec; vector<string> line_vec;
if(ifs) { if(ifs) {
getline(ifs, line); getline(ifs, line);
boost::split(line_vec, line, boost::is_any_of(":"), boost::token_compress_on); boost::split(line_vec, line, boost::is_any_of(","), boost::token_compress_on);
center.x() = stof(line_vec.at(1)); center.x() = stod(line_vec.at(0));
getline(ifs, line); center.y() = stod(line_vec.at(1));
boost::split(line_vec, line, boost::is_any_of(":"), boost::token_compress_on); center.z() = stod(line_vec.at(2));
center.y() = stof(line_vec.at(1)); // getline(ifs, line);
getline(ifs, line); // boost::split(line_vec, line, boost::is_any_of(":"), boost::token_compress_on);
boost::split(line_vec, line, boost::is_any_of(":"), boost::token_compress_on); // center.x() = stof(line_vec.at(1));
center.z() = stof(line_vec.at(1)); // getline(ifs, line);
// boost::split(line_vec, line, boost::is_any_of(":"), boost::token_compress_on);
// center.y() = stof(line_vec.at(1));
// getline(ifs, line);
// boost::split(line_vec, line, boost::is_any_of(":"), boost::token_compress_on);
// center.z() = stof(line_vec.at(1));
} }
return center; return center;
} }
...@@ -236,7 +241,7 @@ void AdjustPPK::LoadMapInfo() ...@@ -236,7 +241,7 @@ void AdjustPPK::LoadMapInfo()
} }
auto fileName = pcd_iter->path().filename().string(); auto fileName = pcd_iter->path().filename().string();
ulong meshId = stoi(split_string(fileName, '_').front()); ulong meshId = stoi(split_string(fileName, '_').front());
LOG(INFO) << " meshId: " << meshId; LOG(INFO) << "meshId: " << meshId;
PCDPathInfo pcdPathInfo; PCDPathInfo pcdPathInfo;
pcdPathInfo.pcdPath = pcd_iter->path().string(); pcdPathInfo.pcdPath = pcd_iter->path().string();
if(baseTaskName_ != taskName){ if(baseTaskName_ != taskName){
......
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