diff --git a/flightlib/include/flightlib/envs/vec_env.hpp b/flightlib/include/flightlib/envs/vec_env.hpp index a31fb9a..12586b0 100644 --- a/flightlib/include/flightlib/envs/vec_env.hpp +++ b/flightlib/include/flightlib/envs/vec_env.hpp @@ -6,8 +6,7 @@ // std #include #include - -#include +#include #include #include diff --git a/flightlib/include/flightlib/ros_nodes/flight_pilot.hpp b/flightlib/include/flightlib/ros_nodes/flight_pilot.hpp index 48546bb..9529f92 100644 --- a/flightlib/include/flightlib/ros_nodes/flight_pilot.hpp +++ b/flightlib/include/flightlib/ros_nodes/flight_pilot.hpp @@ -6,11 +6,9 @@ #include #include #include - +#include #include -#include #include - #include "std_msgs/Empty.h" // flightlib #include "flightlib/bridges/unity_bridge.hpp" diff --git a/flightlib/src/envs/vec_env.cpp b/flightlib/src/envs/vec_env.cpp index d817260..67972c4 100644 --- a/flightlib/src/envs/vec_env.cpp +++ b/flightlib/src/envs/vec_env.cpp @@ -318,15 +318,15 @@ bool VecEnv::spawnTreesAndSavePointcloud(int ply_id_in, float spacing) template void VecEnv::generateMaps() { std::vector ply_files; - for (const auto& entry : std::filesystem::directory_iterator(ply_path_)) { - if (entry.is_regular_file() && entry.path().extension() == ".ply") { - ply_files.push_back(entry.path().string()); - } - } + for (const auto& entry : boost::filesystem::directory_iterator(ply_path_)) { + if (boost::filesystem::is_regular_file(entry) && entry.path().extension() == ".ply") { + ply_files.push_back(entry.path().string()); + } + } // Sort according to the number of the filename. std::sort(ply_files.begin(), ply_files.end(), [this](const std::string& a, const std::string& b) { - return extract_number(std::filesystem::path(a).filename().string()) < extract_number(std::filesystem::path(b).filename().string()); + return extract_number(boost::filesystem::path(a).filename().string()) < extract_number(boost::filesystem::path(b).filename().string()); }); for (auto ply_file : ply_files) { diff --git a/flightlib/src/ros_nodes/flight_pilot.cpp b/flightlib/src/ros_nodes/flight_pilot.cpp index a61f31b..59190b4 100644 --- a/flightlib/src/ros_nodes/flight_pilot.cpp +++ b/flightlib/src/ros_nodes/flight_pilot.cpp @@ -202,8 +202,8 @@ bool FlightPilot::loadParams(const YAML::Node& cfg) { } pointcloud_resolution_ = cfg["unity"]["pointcloud_resolution"].as(); ply_path_ = getenv("FLIGHTMARE_PATH") + cfg["ply_path"].as(); - 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;