-
Notifications
You must be signed in to change notification settings - Fork 310
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
Allow empty urdf tag #1017
Allow empty urdf tag #1017
Conversation
{ | ||
const std::string broken_urdf_string = | ||
std::string(ros2_control_test_assets::urdf_head) + | ||
ros2_control_test_assets::invalid_urdf_ros2_control_parameter_empty + | ||
ros2_control_test_assets::urdf_tail; | ||
|
||
ASSERT_THROW(parse_control_resources_from_urdf(broken_urdf_string), std::runtime_error); | ||
ASSERT_NO_THROW(parse_control_resources_from_urdf(broken_urdf_string)); |
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.
While this may be technically correct. I don't think we should do it. We need a new test explicitly to make sure that empty tags as here are permitted but not a fully broken urdf as per the tests suggests
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.
Thanks for the feedback, absolutely valid point. I replaced the test with a more consistent one in 4c02c65.
This replaces the test that checks that empty parameter tags work and actually checks the parsed urdf.
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.
Thanks!!
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #1017 +/- ##
==========================================
- Coverage 34.61% 32.65% -1.97%
==========================================
Files 52 91 +39
Lines 2981 9566 +6585
Branches 1855 6445 +4590
==========================================
+ Hits 1032 3124 +2092
- Misses 310 704 +394
- Partials 1639 5738 +4099
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@Mergifyio backport humble |
✅ Backports have been created
|
* Do not explode with empty tag * Update tests to allow empty URDF parameter to hardware interface * Test checks that empty parameter tags work and actually checks the parsed urdf. --------- Co-authored-by: Bence Magyar <[email protected]> Co-authored-by: Dr. Denis <[email protected]> (cherry picked from commit 7c07430) # Conflicts: # hardware_interface/src/component_parser.cpp
* Do not explode with empty tag * Update tests to allow empty URDF parameter to hardware interface * Test checks that empty parameter tags work and actually checks the parsed urdf. --------- Co-authored-by: Bence Magyar <[email protected]> Co-authored-by: Dr. Denis <[email protected]> (cherry picked from commit 7c07430) # Conflicts: # hardware_interface/src/component_parser.cpp
* Do not explode with empty tag * Update tests to allow empty URDF parameter to hardware interface * Test checks that empty parameter tags work and actually checks the parsed urdf. --------- Co-authored-by: Bence Magyar <[email protected]> Co-authored-by: Dr. Denis <[email protected]> (cherry picked from commit 7c07430) # Conflicts: # hardware_interface/src/component_parser.cpp
* [URDF Parser] Allow empty urdf tag, e.g., parameter (#1017) * Do not explode with empty tag * Update tests to allow empty URDF parameter to hardware interface * Test checks that empty parameter tags work and actually checks the parsed urdf. * Patch test updates for humble API --------- Co-authored-by: Bence Magyar <[email protected]> Co-authored-by: Dr. Denis <[email protected]> (cherry picked from commit 7c07430)
) * [URDF Parser] Allow empty urdf tag, e.g., parameter (ros-controls#1017) * Do not explode with empty tag * Update tests to allow empty URDF parameter to hardware interface * Test checks that empty parameter tags work and actually checks the parsed urdf. * Patch test updates for humble API --------- Co-authored-by: Bence Magyar <[email protected]> Co-authored-by: Dr. Denis <[email protected]> (cherry picked from commit 7c07430)
This is #1008 with updated tests.