Skip to content

Commit fa5684f

Browse files
committed
replacing rcpputils with filesystem
1 parent bbb4bf5 commit fa5684f

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

yasmin_factory/src/yasmin_factory.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@
1515

1616
#include "yasmin_factory/yasmin_factory.hpp"
1717

18+
#include "yasmin/blackboard/blackboard_pywrapper.hpp"
1819
#include <algorithm>
1920
#include <cctype>
21+
#include <filesystem>
2022
#include <sstream>
2123
#include <stdexcept>
2224

23-
#include "rcpputils/filesystem_helper.hpp"
24-
#include "yasmin/blackboard/blackboard_pywrapper.hpp"
25-
2625
namespace yasmin_factory {
2726

2827
// Static member initialization
@@ -246,7 +245,7 @@ YasminFactory::create_sm(tinyxml2::XMLElement *root) {
246245
try {
247246
package_path = ament_index_cpp::get_package_share_directory(package) +
248247
"/state_machines";
249-
file_path = (rcpputils::fs::path(package_path) / file_name).string();
248+
file_path = (std::filesystem::path(package_path) / file_name).string();
250249
} catch (const ament_index_cpp::PackageNotFoundError &e) {
251250
file_path = "";
252251
}
@@ -255,12 +254,11 @@ YasminFactory::create_sm(tinyxml2::XMLElement *root) {
255254

256255
// Check if StateMachine is an included XML file
257256
if (!file_path.empty()) {
258-
if (!rcpputils::fs::path(file_path).is_absolute()) {
257+
if (!std::filesystem::path(file_path).is_absolute()) {
259258
file_path =
260-
(rcpputils::fs::path(this->xml_path_).parent_path() / file_path)
259+
(std::filesystem::path(this->xml_path_).parent_path() / file_path)
261260
.string();
262261
}
263-
264262
return this->create_sm_from_file(file_path);
265263
}
266264

0 commit comments

Comments
 (0)