-
Notifications
You must be signed in to change notification settings - Fork 98
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
Automatic Moment of Inertia Calculations for Basic Shapes #1299
Automatic Moment of Inertia Calculations for Basic Shapes #1299
Conversation
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
…phere Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
…for each collision Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
sdf/1.11/1_10.convert
Outdated
@@ -0,0 +1,2 @@ | |||
<convert name="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.
why this is empty ? remove ?
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.
As mentioned in the migration.md
file in the 'Note on Backward Compatibility' section, the .convert
files are used to facilitate forward conversion and are present in all the spec directories.
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
b0c6a9a
to
b092904
Compare
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 should add these new methods to the Python API.
std::optional< gz::math::MassMatrix3d > MassMatrix(const double _density);
Signed-off-by: Jasmeet Singh <[email protected]>
…rameter Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
…nfiguration Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
… Ellipsoid & Sphere Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
- Updated all functions returning Errors object to take errors object as an output param - Updated function params to take errors as a first params Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[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.
Great work! And thanks for iterating patiently :)
🎉 New feature
Based on this proposal.
Summary
This PR adds Automatic Moment of Inertia Calculations for Basic Shapes (Box, Capsule, Cylinder, Ellipsoid and Sphere). As mentioned in the proposal the PR adds the following to the SDF Spec:
//inertial/@auto
attribute to enable automatic calculations//link/collision/density
tag for mentioning the density for the collisionDemos & Usage Example
Demo 1: This demo shows 2 cylinders: one with default inertial values (right, green) and the other with automatic inertia calculations enabled (left, yellow).
The yellow cylinder uses
<inertial auto="true" />
and<density>1240.0</density>
for automatic calculations.SDF snippet for the yellow cylinder
Demo 2: This demo shows a model with a link having 2 collisions: a cube with a cylinder on top of it.
Here the model uses
<inertial auto="true" />
with<density>2.0</density>
for the box collision and<density>4.0</density>
for the cylinder.SDF snippet of the model in the demo
TODO:
auto
an attribute of<inertial>
tag instead and calculate mass and inertial pose. Update the proposal accordingly.auto
is set and link has no collisions<material_density>
tag to something less verbose like just<density>
or<mass_density>
. Update the proposal accordingly.CalculateInertial()
function. Update the function to use the enum from the config.//link/inertial/density
element.MassMatrix
Methods to the Python APIChecklist
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.