Fix collisions_updater CLI if no package is used#2344
Merged
sjahr merged 3 commits intomoveit:mainfrom Sep 12, 2023
Merged
Conversation
The exceptions introduced with moveit#2032 prevented from running the collisions updater CLI without a ROS package. This fix makes ROS packages optional again, allowing to use the CLI with absolute paths only.
henningkayser
commented
Sep 6, 2023
| throw std::runtime_error("URDF/COLLADA file not found: " + urdf_path_.string()); | ||
| } | ||
|
|
||
| if (urdf_pkg_name_.empty()) |
Member
Author
There was a problem hiding this comment.
This exception should not be triggered if we actually don't provide a file path outside of a ROS package. That's why I moved it to loadFromPackage() above.
| } | ||
| // Check that ROS can find the package | ||
| const std::filesystem::path robot_desc_pkg_path = getSharePath(urdf_pkg_name_); | ||
| // Reset to defaults: no package name, relative path is set to absolute path |
Member
Author
There was a problem hiding this comment.
These changes silence the warning if there is no package name associated with the file.
sea-bass
approved these changes
Sep 6, 2023
Contributor
sea-bass
left a comment
There was a problem hiding this comment.
Changes look good -- thanks for this!
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2344 +/- ##
==========================================
- Coverage 50.75% 50.74% -0.00%
==========================================
Files 386 386
Lines 31958 31963 +5
==========================================
+ Hits 16216 16217 +1
- Misses 15742 15746 +4
☔ View full report in Codecov by Sentry. |
b814a8d to
bc35c64
Compare
sjahr
approved these changes
Sep 12, 2023
mergify bot
pushed a commit
that referenced
this pull request
Sep 12, 2023
* Fix collisions_updater CLI if no package is used The exceptions introduced with #2032 prevented from running the collisions updater CLI without a ROS package. This fix makes ROS packages optional again, allowing to use the CLI with absolute paths only. * Improve warn message wording (cherry picked from commit 16ac53c)
henningkayser
added a commit
that referenced
this pull request
Oct 24, 2023
) * Fix collisions_updater CLI if no package is used The exceptions introduced with #2032 prevented from running the collisions updater CLI without a ROS package. This fix makes ROS packages optional again, allowing to use the CLI with absolute paths only. * Improve warn message wording (cherry picked from commit 16ac53c) Co-authored-by: Henning Kayser <henningkayser@picknik.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The exceptions introduced with #2032 broke support for running the collisions updater CLI without a ROS package. This fix makes ROS packages optional again, allowing to use the CLI with absolute paths only.
Fixes #2338