-
Notifications
You must be signed in to change notification settings - Fork 706
Fix collisions_updater CLI if no package is used #2344
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
Fix collisions_updater CLI if no package is used #2344
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.
| throw std::runtime_error("URDF/COLLADA file not found: " + urdf_path_.string()); | ||
| } | ||
|
|
||
| if (urdf_pkg_name_.empty()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes silence the warning if there is no package name associated with the file.
sea-bass
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
* 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)
) * 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>
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