Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to leverage std::filesystem #592

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tesseract_command_language/src/profile_dictionary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include <boost/serialization/shared_ptr.hpp>
#include <boost/serialization/unordered_map.hpp>

#include <mutex>

namespace tesseract_planning
{
bool ProfileDictionary::hasProfileEntry(std::size_t key, const std::string& ns) const
Expand Down
6 changes: 4 additions & 2 deletions tesseract_examples/src/basic_cartesian_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP
#include <tesseract_examples/basic_cartesian_example.h>

#include <tesseract_common/stopwatch.h>
#include <tesseract_common/resource_locator.h>

#include <tesseract_collision/core/types.h>

Expand Down Expand Up @@ -176,8 +177,9 @@ bool BasicCartesianExample::run()
console_bridge::setLogLevel(console_bridge::LogLevel::CONSOLE_BRIDGE_LOG_INFO);

// Create Task Composer Plugin Factory
const std::string share_dir(TESSERACT_TASK_COMPOSER_DIR);
tesseract_common::fs::path config_path(share_dir + "/config/task_composer_plugins.yaml");
std::shared_ptr<const tesseract_common::ResourceLocator> locator = env_->getResourceLocator();
std::filesystem::path config_path(
locator->locateResource("package://tesseract_task_composer/config/task_composer_plugins.yaml")->getFilePath());
TaskComposerPluginFactory factory(config_path, *env_->getResourceLocator());

// Create Program
Expand Down
6 changes: 3 additions & 3 deletions tesseract_examples/src/basic_cartesian_example_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/

#include <tesseract_examples/basic_cartesian_example.h>
#include <tesseract_common/filesystem.h>
#include <filesystem>
#include <tesseract_environment/environment.h>
#include <tesseract_common/resource_locator.h>

Expand All @@ -36,9 +36,9 @@ using namespace tesseract_environment;
int main(int /*argc*/, char** /*argv*/)
{
auto locator = std::make_shared<GeneralResourceLocator>();
tesseract_common::fs::path urdf_path =
std::filesystem::path urdf_path =
locator->locateResource("package://tesseract_support/urdf/lbr_iiwa_14_r820.urdf")->getFilePath();
tesseract_common::fs::path srdf_path =
std::filesystem::path srdf_path =
locator->locateResource("package://tesseract_support/urdf/lbr_iiwa_14_r820.srdf")->getFilePath();
auto env = std::make_shared<Environment>();
if (!env->init(urdf_path, srdf_path, locator))
Expand Down
2 changes: 1 addition & 1 deletion tesseract_examples/src/car_seat_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ bool CarSeatExample::run()

// Create Task Composer Plugin Factory
const std::string share_dir(TESSERACT_TASK_COMPOSER_DIR);
tesseract_common::fs::path config_path(share_dir + "/config/task_composer_plugins.yaml");
std::filesystem::path config_path(share_dir + "/config/task_composer_plugins.yaml");
TaskComposerPluginFactory factory(config_path, *env_->getResourceLocator());

// Get manipulator
Expand Down
6 changes: 3 additions & 3 deletions tesseract_examples/src/car_seat_example_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/

#include <tesseract_examples/car_seat_example.h>
#include <tesseract_common/filesystem.h>
#include <filesystem>
#include <tesseract_environment/environment.h>
#include <tesseract_common/resource_locator.h>

Expand All @@ -36,9 +36,9 @@ using namespace tesseract_environment;
int main(int /*argc*/, char** /*argv*/)
{
auto locator = std::make_shared<GeneralResourceLocator>();
tesseract_common::fs::path urdf_path =
std::filesystem::path urdf_path =
locator->locateResource("package://tesseract_support/urdf/car_seat_demo.urdf")->getFilePath();
tesseract_common::fs::path srdf_path =
std::filesystem::path srdf_path =
locator->locateResource("package://tesseract_support/urdf/car_seat_demo.srdf")->getFilePath();
auto env = std::make_shared<Environment>();
if (!env->init(urdf_path, srdf_path, locator))
Expand Down
2 changes: 1 addition & 1 deletion tesseract_examples/src/freespace_hybrid_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ bool FreespaceHybridExample::run()

// Create Task Composer Plugin Factory
const std::string share_dir(TESSERACT_TASK_COMPOSER_DIR);
tesseract_common::fs::path config_path(share_dir + "/config/task_composer_plugins.yaml");
std::filesystem::path config_path(share_dir + "/config/task_composer_plugins.yaml");
TaskComposerPluginFactory factory(config_path, *env_->getResourceLocator());

// Create Program
Expand Down
6 changes: 3 additions & 3 deletions tesseract_examples/src/freespace_hybrid_example_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/

#include <tesseract_examples/freespace_hybrid_example.h>
#include <tesseract_common/filesystem.h>
#include <filesystem>
#include <tesseract_environment/environment.h>
#include <tesseract_common/resource_locator.h>

Expand All @@ -36,9 +36,9 @@ using namespace tesseract_environment;
int main(int /*argc*/, char** /*argv*/)
{
auto locator = std::make_shared<GeneralResourceLocator>();
tesseract_common::fs::path urdf_path =
std::filesystem::path urdf_path =
locator->locateResource("package://tesseract_support/urdf/lbr_iiwa_14_r820.urdf")->getFilePath();
tesseract_common::fs::path srdf_path =
std::filesystem::path srdf_path =
locator->locateResource("package://tesseract_support/urdf/lbr_iiwa_14_r820.srdf")->getFilePath();
auto env = std::make_shared<Environment>();
if (!env->init(urdf_path, srdf_path, locator))
Expand Down
2 changes: 1 addition & 1 deletion tesseract_examples/src/freespace_ompl_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ bool FreespaceOMPLExample::run()

// Create Task Composer Plugin Factory
const std::string share_dir(TESSERACT_TASK_COMPOSER_DIR);
tesseract_common::fs::path config_path(share_dir + "/config/task_composer_plugins.yaml");
std::filesystem::path config_path(share_dir + "/config/task_composer_plugins.yaml");
TaskComposerPluginFactory factory(config_path, *env_->getResourceLocator());

// Create Program
Expand Down
6 changes: 3 additions & 3 deletions tesseract_examples/src/freespace_ompl_example_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/

#include <tesseract_examples/freespace_ompl_example.h>
#include <tesseract_common/filesystem.h>
#include <filesystem>
#include <tesseract_environment/environment.h>
#include <tesseract_common/resource_locator.h>

Expand All @@ -36,9 +36,9 @@ using namespace tesseract_environment;
int main(int /*argc*/, char** /*argv*/)
{
auto locator = std::make_shared<GeneralResourceLocator>();
tesseract_common::fs::path urdf_path =
std::filesystem::path urdf_path =
locator->locateResource("package://tesseract_support/urdf/lbr_iiwa_14_r820.urdf")->getFilePath();
tesseract_common::fs::path srdf_path =
std::filesystem::path srdf_path =
locator->locateResource("package://tesseract_support/urdf/lbr_iiwa_14_r820.srdf")->getFilePath();
auto env = std::make_shared<Environment>();
if (!env->init(urdf_path, srdf_path, locator))
Expand Down
2 changes: 1 addition & 1 deletion tesseract_examples/src/glass_upright_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ bool GlassUprightExample::run()

// Create Task Composer Plugin Factory
const std::string share_dir(TESSERACT_TASK_COMPOSER_DIR);
tesseract_common::fs::path config_path(share_dir + "/config/task_composer_plugins.yaml");
std::filesystem::path config_path(share_dir + "/config/task_composer_plugins.yaml");
TaskComposerPluginFactory factory(config_path, *env_->getResourceLocator());

// Create Program
Expand Down
6 changes: 3 additions & 3 deletions tesseract_examples/src/glass_upright_example_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/

#include <tesseract_examples/glass_upright_example.h>
#include <tesseract_common/filesystem.h>
#include <filesystem>
#include <tesseract_environment/environment.h>
#include <tesseract_common/resource_locator.h>

Expand All @@ -36,9 +36,9 @@ using namespace tesseract_environment;
int main(int /*argc*/, char** /*argv*/)
{
auto locator = std::make_shared<GeneralResourceLocator>();
tesseract_common::fs::path urdf_path =
std::filesystem::path urdf_path =
locator->locateResource("package://tesseract_support/urdf/lbr_iiwa_14_r820.urdf")->getFilePath();
tesseract_common::fs::path srdf_path =
std::filesystem::path srdf_path =
locator->locateResource("package://tesseract_support/urdf/lbr_iiwa_14_r820.srdf")->getFilePath();
auto env = std::make_shared<Environment>();
if (!env->init(urdf_path, srdf_path, locator))
Expand Down
6 changes: 3 additions & 3 deletions tesseract_examples/src/glass_upright_ompl_example_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/

#include <tesseract_examples/glass_upright_ompl_example.h>
#include <tesseract_common/filesystem.h>
#include <filesystem>
#include <tesseract_environment/environment.h>
#include <tesseract_common/resource_locator.h>

Expand All @@ -36,9 +36,9 @@ using namespace tesseract_environment;
int main(int argc, char** argv)
{
auto locator = std::make_shared<GeneralResourceLocator>();
tesseract_common::fs::path urdf_path =
std::filesystem::path urdf_path =
locator->locateResource("package://tesseract_support/urdf/lbr_iiwa_14_r820.urdf")->getFilePath();
tesseract_common::fs::path srdf_path =
std::filesystem::path srdf_path =
locator->locateResource("package://tesseract_support/urdf/lbr_iiwa_14_r820.srdf")->getFilePath();
auto env = std::make_shared<Environment>();
if (!env->init(urdf_path, srdf_path, locator))
Expand Down
6 changes: 3 additions & 3 deletions tesseract_examples/src/online_planning_example_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*/

#include <tesseract_examples/online_planning_example.h>
#include <tesseract_common/filesystem.h>
#include <filesystem>
#include <tesseract_environment/environment.h>
#include <tesseract_common/resource_locator.h>

Expand All @@ -41,9 +41,9 @@ using namespace tesseract_environment;
int main(int /*argc*/, char** /*argv*/)
{
auto locator = std::make_shared<GeneralResourceLocator>();
tesseract_common::fs::path urdf_path =
std::filesystem::path urdf_path =
locator->locateResource("package://tesseract_support/urdf/online_planning_example.urdf")->getFilePath();
tesseract_common::fs::path srdf_path =
std::filesystem::path srdf_path =
locator->locateResource("package://tesseract_support/urdf/online_planning_example.srdf")->getFilePath();
auto env = std::make_shared<Environment>();
if (!env->init(urdf_path, srdf_path, locator))
Expand Down
2 changes: 1 addition & 1 deletion tesseract_examples/src/pick_and_place_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ bool PickAndPlaceExample::run()

// Create Task Composer Plugin Factory
const std::string share_dir(TESSERACT_TASK_COMPOSER_DIR);
tesseract_common::fs::path config_path(share_dir + "/config/task_composer_plugins.yaml");
std::filesystem::path config_path(share_dir + "/config/task_composer_plugins.yaml");
TaskComposerPluginFactory factory(config_path, *env_->getResourceLocator());

// Create Program
Expand Down
6 changes: 3 additions & 3 deletions tesseract_examples/src/pick_and_place_example_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/

#include <tesseract_examples/pick_and_place_example.h>
#include <tesseract_common/filesystem.h>
#include <filesystem>
#include <tesseract_environment/environment.h>
#include <tesseract_common/resource_locator.h>

Expand All @@ -36,9 +36,9 @@ using namespace tesseract_environment;
int main(int /*argc*/, char** /*argv*/)
{
auto locator = std::make_shared<GeneralResourceLocator>();
tesseract_common::fs::path urdf_path =
std::filesystem::path urdf_path =
locator->locateResource("package://tesseract_support/urdf/pick_and_place_plan.urdf")->getFilePath();
tesseract_common::fs::path srdf_path =
std::filesystem::path srdf_path =
locator->locateResource("package://tesseract_support/urdf/pick_and_place_plan.srdf")->getFilePath();
auto env = std::make_shared<Environment>();
if (!env->init(urdf_path, srdf_path, locator))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ bool PuzzlePieceAuxillaryAxesExample::run()

// Create Task Composer Plugin Factory
const std::string share_dir(TESSERACT_TASK_COMPOSER_DIR);
tesseract_common::fs::path config_path(share_dir + "/config/task_composer_plugins.yaml");
std::filesystem::path config_path(share_dir + "/config/task_composer_plugins.yaml");
TaskComposerPluginFactory factory(config_path, *env_->getResourceLocator());

// Create Program
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/

#include <tesseract_examples/puzzle_piece_auxillary_axes_example.h>
#include <tesseract_common/filesystem.h>
#include <filesystem>
#include <tesseract_environment/environment.h>
#include <tesseract_common/resource_locator.h>

Expand All @@ -36,9 +36,9 @@ using namespace tesseract_environment;
int main(int /*argc*/, char** /*argv*/)
{
auto locator = std::make_shared<GeneralResourceLocator>();
tesseract_common::fs::path urdf_path =
std::filesystem::path urdf_path =
locator->locateResource("package://tesseract_support/urdf/puzzle_piece_workcell.urdf")->getFilePath();
tesseract_common::fs::path srdf_path =
std::filesystem::path srdf_path =
locator->locateResource("package://tesseract_support/urdf/puzzle_piece_workcell.srdf")->getFilePath();
auto env = std::make_shared<Environment>();
if (!env->init(urdf_path, srdf_path, locator))
Expand Down
2 changes: 1 addition & 1 deletion tesseract_examples/src/puzzle_piece_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ bool PuzzlePieceExample::run()

// Create Task Composer Plugin Factory
const std::string share_dir(TESSERACT_TASK_COMPOSER_DIR);
tesseract_common::fs::path config_path(share_dir + "/config/task_composer_plugins.yaml");
std::filesystem::path config_path(share_dir + "/config/task_composer_plugins.yaml");
TaskComposerPluginFactory factory(config_path, *env_->getResourceLocator());

// Create Program
Expand Down
6 changes: 3 additions & 3 deletions tesseract_examples/src/puzzle_piece_example_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/

#include <tesseract_examples/puzzle_piece_example.h>
#include <tesseract_common/filesystem.h>
#include <filesystem>
#include <tesseract_environment/environment.h>
#include <tesseract_common/resource_locator.h>

Expand All @@ -36,9 +36,9 @@ using namespace tesseract_environment;
int main(int /*argc*/, char** /*argv*/)
{
auto locator = std::make_shared<GeneralResourceLocator>();
tesseract_common::fs::path urdf_path =
std::filesystem::path urdf_path =
locator->locateResource("package://tesseract_support/urdf/puzzle_piece_workcell.urdf")->getFilePath();
tesseract_common::fs::path srdf_path =
std::filesystem::path srdf_path =
locator->locateResource("package://tesseract_support/urdf/puzzle_piece_workcell.srdf")->getFilePath();
auto env = std::make_shared<Environment>();
if (!env->init(urdf_path, srdf_path, locator))
Expand Down
6 changes: 3 additions & 3 deletions tesseract_examples/src/scene_graph_example_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/

#include <tesseract_examples/scene_graph_example.h>
#include <tesseract_common/filesystem.h>
#include <filesystem>
#include <tesseract_environment/environment.h>
#include <tesseract_common/resource_locator.h>

Expand All @@ -36,9 +36,9 @@ using namespace tesseract_environment;
int main(int /*argc*/, char** /*argv*/)
{
auto locator = std::make_shared<GeneralResourceLocator>();
tesseract_common::fs::path urdf_path =
std::filesystem::path urdf_path =
locator->locateResource("package://tesseract_support/urdf/scene_graph_example.urdf")->getFilePath();
tesseract_common::fs::path srdf_path =
std::filesystem::path srdf_path =
locator->locateResource("package://tesseract_support/urdf/scene_graph_example.srdf")->getFilePath();
auto env = std::make_shared<Environment>();
if (!env->init(urdf_path, srdf_path, locator))
Expand Down
10 changes: 5 additions & 5 deletions tesseract_examples/test/basic_cartesian_example_unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_examples/basic_cartesian_example.h>
#include <tesseract_common/filesystem.h>
#include <filesystem>
#include <tesseract_environment/environment.h>
#include <tesseract_common/resource_locator.h>

Expand All @@ -15,9 +15,9 @@ using namespace tesseract_environment;
TEST(TesseractExamples, BasicCartesianTrajOptExampleUnit) // NOLINT
{
auto locator = std::make_shared<GeneralResourceLocator>();
tesseract_common::fs::path urdf_path =
std::filesystem::path urdf_path =
locator->locateResource("package://tesseract_support/urdf/lbr_iiwa_14_r820.urdf")->getFilePath();
tesseract_common::fs::path srdf_path =
std::filesystem::path srdf_path =
locator->locateResource("package://tesseract_support/urdf/lbr_iiwa_14_r820.srdf")->getFilePath();
auto env = std::make_shared<Environment>();
if (!env->init(urdf_path, srdf_path, locator))
Expand All @@ -30,9 +30,9 @@ TEST(TesseractExamples, BasicCartesianTrajOptExampleUnit) // NOLINT
TEST(TesseractExamples, BasicCartesianTrajOptIfoptExampleUnit) // NOLINT
{
auto locator = std::make_shared<GeneralResourceLocator>();
tesseract_common::fs::path urdf_path =
std::filesystem::path urdf_path =
locator->locateResource("package://tesseract_support/urdf/lbr_iiwa_14_r820.urdf")->getFilePath();
tesseract_common::fs::path srdf_path =
std::filesystem::path srdf_path =
locator->locateResource("package://tesseract_support/urdf/lbr_iiwa_14_r820.srdf")->getFilePath();
auto env = std::make_shared<Environment>();
if (!env->init(urdf_path, srdf_path, locator))
Expand Down
10 changes: 5 additions & 5 deletions tesseract_examples/test/car_seat_example_unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_examples/car_seat_example.h>
#include <tesseract_common/filesystem.h>
#include <filesystem>
#include <tesseract_environment/environment.h>
#include <tesseract_common/resource_locator.h>

Expand All @@ -15,9 +15,9 @@ using namespace tesseract_environment;
TEST(TesseractExamples, CarSeatCppTrajOptExampleUnit) // NOLINT
{
auto locator = std::make_shared<GeneralResourceLocator>();
tesseract_common::fs::path urdf_path =
std::filesystem::path urdf_path =
locator->locateResource("package://tesseract_support/urdf/car_seat_demo.urdf")->getFilePath();
tesseract_common::fs::path srdf_path =
std::filesystem::path srdf_path =
locator->locateResource("package://tesseract_support/urdf/car_seat_demo.srdf")->getFilePath();
auto env = std::make_shared<Environment>();
if (!env->init(urdf_path, srdf_path, locator))
Expand All @@ -30,9 +30,9 @@ TEST(TesseractExamples, CarSeatCppTrajOptExampleUnit) // NOLINT
TEST(TesseractExamples, CarSeatCppTrajOptIfoptExampleUnit) // NOLINT
{
auto locator = std::make_shared<GeneralResourceLocator>();
tesseract_common::fs::path urdf_path =
std::filesystem::path urdf_path =
locator->locateResource("package://tesseract_support/urdf/car_seat_demo.urdf")->getFilePath();
tesseract_common::fs::path srdf_path =
std::filesystem::path srdf_path =
locator->locateResource("package://tesseract_support/urdf/car_seat_demo.srdf")->getFilePath();
auto env = std::make_shared<Environment>();
if (!env->init(urdf_path, srdf_path, locator))
Expand Down
Loading
Loading