-
Notifications
You must be signed in to change notification settings - Fork 107
Check joint parent/child names in Root::Load #727
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
Conversation
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
include/sdf/parser.hh
Outdated
/// \param[in] _root SDF Root object to check recursively. | ||
/// \param[out] _errors Detected errors will be appended to this variable. | ||
SDFORMAT_VISIBLE | ||
void checkJointParentChildLinkNames(const sdf::Root *_root, Errors &_errors); |
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.
now that I think about it, we could change this function name since parent and child aren't just links anymore
-
checkJointParentChildNames
-
checkJointParentChildFrameNames
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.
Can they be frames or links? If so, I think checkJointParentChildNames
would be better and the error messages should be updated to be "link or frame" (and not one or the other)
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.
the parent and child names can refer to a //link
, //joint
, //frame
, or //model
, so anything with a frame in the attached-to graph. I'll change to checkJointParentChildNames
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.
renamed in db3a590
Codecov Report
@@ Coverage Diff @@
## sdf11 #727 +/- ##
==========================================
+ Coverage 88.09% 88.21% +0.11%
==========================================
Files 73 73
Lines 11030 11021 -9
==========================================
+ Hits 9717 9722 +5
+ Misses 1313 1299 -14
Continue to review full report at Codecov.
|
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@@ -322,6 +322,17 @@ TEST(check, IGN_UTILS_TEST_DISABLED_ON_WIN32(SDF)) | |||
EXPECT_EQ("Valid.\n", output) << output; | |||
} | |||
|
|||
// Check an SDF file with the infinite values for joint axis limits. |
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.
Not sure if we need to add this test if it's covered by other tests.
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.
it helps with coverage of ign sdf --check
; I think it doesn't hurt anything except test runtime. I would keep it personally
This pull request has been mentioned on Gazebo Community. There might be relevant details there: https://community.gazebosim.org/t/new-ignition-releases-2022-03-25-fortress-edifice-citadel/1343/1 |
🦟 Bug fix
Fixes #719 for
sdf11
, similar to #726Summary
As noted in #710, several example files in the
test/sdf/
folder specify non-existent links in the//joint/parent
element, which violates the spec. I added anign sdf --check test/sdf/joint_axis_infinite_limits.sdf
test case in 893f2c8, which properly notes the failure, though thesdf::Root::Load
call inINTEGRATION_joint_axis_dom
does not report an error. To detect the error insdf::Root::Load
, I first added a version ofcheckJointParentChildLinkNames
that outputs ansdf::Errors
toparser.hh
(49b432b) and then call that function fromRoot::Load
(1d21294). This goes beyond the change in #726 by checking that each joint's parent and child frames resolve correctly. Finally, I fixed thetest/sdf/
files in 08ac2b9 and made a minor fix to an error message in 628f382.This will likely reduce coverage due to redundancy in our error checking.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge