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

Explicit convert from std::filesystem::path to std::string for Windows compatibility #4870

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

traversaro
Copy link
Contributor

@traversaro traversaro commented Jan 19, 2025

Basic Info

Info Please fill out this column
Ticket(s) this addresses No ticket.
Primary OS tested on Windows
Robotic platform tested on Not tested on any robotic platform.
Does this PR contain AI generated software? No

Description of contribution in a few bullet points

On Linux and macOS std::filesystem::path is implicitly convertible to std::string, while on Windows it is convertible to std::wstring, see https://en.cppreference.com/w/cpp/filesystem/path and https://stackoverflow.com/questions/57377349/implicit-conversion-between-stdfilesystempath-and-stdstring-should-it-hap . If we want to convert std::filesystem::path to std::string in a Windows-compatible way, it is then necessary to explicitly call the .string() method.

Description of documentation updates required from your changes

Description of how this change was tested

I checked if the program compiled.

Future work that may be required in bullet points

For Maintainers:

  • Check that any new parameters added are updated in docs.nav2.org
  • Check that any significant change is added to the migration guide
  • Check that any new features OR changes to existing behaviors are reflected in the tuning guide
  • Check that any new functions have Doxygen added
  • Check that any new features have test coverage
  • Check that any new plugins is added to the plugins page
  • If BT Node, Additionally: add to BT's XML index of nodes for groot, BT package's readme table, and BT library lists

Copy link

codecov bot commented Jan 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
...v2_waypoint_follower/plugins/photo_at_waypoint.cpp 91.52% <100.00%> (ø)

... and 4 files with indirect coverage changes

@SteveMacenski SteveMacenski merged commit ad756f7 into ros-navigation:main Jan 21, 2025
11 checks passed
RBT22 pushed a commit to EnjoyRobotics/navigation2 that referenced this pull request Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants