Skip to content

Conversation

@henningkayser
Copy link
Member

@henningkayser henningkayser commented Sep 6, 2023

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

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 henningkayser added the backport-iron Mergify label that triggers a PR backport to Iron label Sep 6, 2023
throw std::runtime_error("URDF/COLLADA file not found: " + urdf_path_.string());
}

if (urdf_pkg_name_.empty())
Copy link
Member Author

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
Copy link
Member Author

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.

@henningkayser henningkayser self-assigned this Sep 6, 2023
Copy link
Contributor

@sea-bass sea-bass left a 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
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Patch coverage: 92.86% and no project coverage change.

Comparison is base (4210f46) 50.75% compared to head (1e919a8) 50.74%.

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     
Files Changed Coverage Δ
...sistant/moveit_setup_framework/src/urdf_config.cpp 55.69% <92.86%> (+6.29%) ⬆️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@henningkayser henningkayser force-pushed the pr-collisions_updater_without_package branch from b814a8d to bc35c64 Compare September 11, 2023 14:48
@sjahr sjahr enabled auto-merge (squash) September 12, 2023 13:10
@sjahr sjahr merged commit 16ac53c into moveit:main 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-iron Mergify label that triggers a PR backport to Iron

Projects

None yet

Development

Successfully merging this pull request may close these issues.

collisions_updater fails if no package is specified

3 participants