-
Notifications
You must be signed in to change notification settings - Fork 100
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 ambiguities in spec inertial documentation #990
Fix ambiguities in spec inertial documentation #990
Conversation
This helps resolve ambiguities in the SDF <inertial> tag by clarifying the link’s center of mass location, explicitly states that the inertia is always about the link’s center of mass, clarifies directions associated with moments/products of inertia, and clarifies the ± sign convention for product of inertia. Thanks to Paul Mitiguy and Michael Sherman from Toyota Research Institute for these improvements. Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
Codecov Report
@@ Coverage Diff @@
## sdf12 #990 +/- ##
=======================================
Coverage 65.38% 65.38%
=======================================
Files 2 2
Lines 26 26
=======================================
Hits 17 17
Misses 9 9
Continue to review full report at Codecov.
|
sdf/1.9/inertial.sdf
Outdated
</element> | ||
<element name="ixy" type="double" default="0.0" required="1"> | ||
<description></description> | ||
<description> | ||
The link’s product of inertia about Co (the link’s center of mass) for |
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.
nit (here and elsewhere) link’s
=> link's
(different character?)
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.
Signed-off-by: Steve Peters <[email protected]>
sdf/1.9/inertial.sdf
Outdated
convention for product of inertia, align Ĉx, Ĉy, Ĉᴢ with principal | ||
inertia directions so that all the products of inertia are zero. | ||
For more information about this sign convention, see the following | ||
Mathworks documentation for working with CAD tools: |
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.
Nitpick: The company is tipically indicated with the W capitalized, see https://www.mathworks.com/ .
Mathworks documentation for working with CAD tools: | |
MathWorks documentation for working with CAD tools: |
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.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @scpeters)
Signed-off-by: Steve Peters <[email protected]> Co-authored-by: Silvio Traversaro <[email protected]>
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.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @EricCousineau-TRI and @traversaro)
sdf/1.9/inertial.sdf, line 51 at r2 (raw file):
Previously, traversaro (Silvio Traversaro) wrote…
Nitpick: The company is tipically indicated with the W capitalized, see https://www.mathworks.com/ .
MathWorks documentation for working with CAD tools:
Ok, thanks! I applied your suggestion in 1c5df36
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 looks great. Thank you Silvio, Eric, Steve, Addisu, and all. Much appreciated.
Reviewed 1 of 1 files at r3.
Reviewable status: all files reviewed (commit messages unreviewed), 1 unresolved discussion (waiting on @traversaro)
I just tested it, and I think there are some significant issues with URLs based on how we are rendering the content in https://sdformat.org/spec They can be seen in the current form by interacting with the That documentation contains a link to http://sdformat.org/tutorials?tut=specify_pose but it is not clickable in my tests. None of the text is even selectable. Attempting to select text will drag the whole block, which drops a link to that portion of the page if you drop it into a text document. So the text of these new URLs is visible but not clickable or selectable. This should be remedied on the web app code. |
I think even w/ rendering |
Sure, I'll work on replicating the changes to the other spec folders |
Versions 1.5 - 1.7 will be addressed in a separate commit since those versions have an //inertial/pose/@frame or //inertial/pose/@relative_to attribute that is not present in 1.4, 1.8, or 1.9. Signed-off-by: Steve Peters <[email protected]>
The changes to inertial.sdf are copied with slight modifications to account to the presence of //inertial/pose/@frame in 1.5, 1.6 and //inertial/pose/@relative_to in 1.7. Signed-off-by: Steve Peters <[email protected]>
I've copied the changes back to spec version 1.4 in 43f2f84 and fc0ba0a. I adjusted the wording slightly in spec versions 1.5, 1.6, and 1.7 to account for the presence of |
sdf/1.4/inertial.sdf
Outdated
vectors. The subsequent values characterize C's orientation relative to | ||
link-frame L as a sequence of Euler rotations | ||
(r p y) documented in http://sdformat.org/tutorials?tut=specify_pose, | ||
or as a quaternion (x y z w), where w is the scalar component. |
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.
We only support quaternions in >= SDFormat 1.9
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.
Please tell me the quaternion is given as (w x y z)!
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.
To be consistent with ROS and Ignition/Gazebo, we went with xyzw gazebosim/sdf_tutorials#56 (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.
fixed in 2a62ad1
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.
:( but consistency is a good argument. Eigen stores it that way also but was apparently so ashamed that they hid it by having their Quaternion constructor take w,x,y,z!
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.
I hear your pain, but at least the convention is specified in the @rotation_format
attribute as quat_xyzw
.
sdf/1.8/inertial.sdf
Outdated
or as a quaternion (x y z w), where w is the scalar component. | ||
</description> | ||
|
||
<attribute name="rotation_format" type="string" default="euler_rpy" required="0"> |
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 attributes rotation_format
and degree
were added to 1.9. Was it intentional to add them in sdf/1.8/inerital.sdf
?
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.
nope, not intentional. removed in 2a62ad1
Signed-off-by: Steve Peters <[email protected]>
🎉 New feature
Part of gazebosim/sdf_tutorials#70
Summary
As noted in gazebosim/sdf_tutorials#70, there are some ambiguities in the definition of inertial properties in the SDFormat specification, particularly the pose and inertia tensor terms. Thanks to @mitiguy, @sherm1, and @EricCousineau-TRI for providing the text of these changes.
These changes should be propagated to earlier versions of the spec, both in the other folders of the
sdf12
branch and to earlier supported branches such assdf9
andsdf6
. It also needs to be tested for its rendering on sdformat.org on the following page:I have marked this as a draft pull request for now. Once the text has been approved, I will propagate the changes to the other files as needed.
Test it
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.https://reviewable.io/reviews/ignitionrobotics/sdformat/990#-
This change is