fixed segmentation fault causing by std::filesystem on some devices

This commit is contained in:
TJU_Lu
2024-12-09 10:31:13 +08:00
parent d9853abdd7
commit a349d0ca13
4 changed files with 10 additions and 13 deletions

View File

@@ -202,8 +202,8 @@ bool FlightPilot::loadParams(const YAML::Node& cfg) {
}
pointcloud_resolution_ = cfg["unity"]["pointcloud_resolution"].as<Scalar>();
ply_path_ = getenv("FLIGHTMARE_PATH") + cfg["ply_path"].as<std::string>();
if (!std::filesystem::exists(ply_path_)) {
std::filesystem::create_directories(ply_path_);
if (!boost::filesystem::exists(ply_path_)) {
boost::filesystem::create_directories(ply_path_);
std::cout << "Directory created: " << ply_path_ << std::endl;
}
return true;