Commit 3a75f2c8 authored by wangdawei's avatar wangdawei

meshes.center

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