-
Notifications
You must be signed in to change notification settings - Fork 276
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
Bugfix: Fixed Centre of Mass and Inertia Matrix Calculation Bug MeshInertiaCalculator::CalculateMassProperties()
function
#2182
Merged
azeey
merged 15 commits into
gazebosim:gz-sim8
from
jasmeet0915:jasmeet/inertia_tensor_transformation
Nov 13, 2023
Merged
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
9803a6f
Added function to transform inertia matrix to COM using parallel axis…
jasmeet0915 63ddac2
Corrected mismatch of values in ixz and iyz calculation from integral
jasmeet0915 1cb4f78
Added doc for TransformInertiaMatrixToCOM() function
jasmeet0915 8e0741a
Added correction for rotational offset of inertia matrix after transf…
jasmeet0915 fcda45f
Completed codecheck
jasmeet0915 f6c71db
Added cylinder model with origin at the bottom
jasmeet0915 b02bf99
Added cylinder with origin at bottom to test world
jasmeet0915 4d17fcc
Updated transformation function to directly set off diagonal elements…
jasmeet0915 42b2562
Fixed center of mass & inertia matrix calculation in CalculateMassPro…
jasmeet0915 a161374
Added test for inertia calculation of cylinder with origin at the bottom
jasmeet0915 7795580
Completed codecheck
jasmeet0915 d2c780e
Added newline at end of collada file
jasmeet0915 01aa539
Updated input params of TransformInertiaMatrixToCOM() to const ref
jasmeet0915 9a7e24d
Updated tutorial doc
jasmeet0915 7424bab
Removed unused functions from the code
jasmeet0915 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
test/worlds/models/cylinder_dae_bottom_origin/meshes/cylinder_bottom_origin.dae
Large diffs are not rendered by default.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
test/worlds/models/cylinder_dae_bottom_origin/model.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0"?> | ||
|
||
<model> | ||
<name>cylinder_dae_bottom_origin</name> | ||
<version>1.0</version> | ||
<sdf version="1.11">model.sdf</sdf> | ||
|
||
<author> | ||
<name>Jasmeet Singh</name> | ||
<email>[email protected]</email> | ||
</author> | ||
|
||
<description> | ||
A model of a Cylinder collada with mesh origin at the center of the bottom face | ||
</description> | ||
</model> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" ?> | ||
<sdf version="1.11"> | ||
<model name="cylinder_dae_bottom_origin"> | ||
<link name="cylinder_dae_bottom_origin"> | ||
<pose>0 0 0 0 0 0</pose> | ||
<inertial auto="true" /> | ||
<collision name="cylinder_collision"> | ||
<density>1240.0</density> | ||
<auto_inertia_params> | ||
<gz:voxel_size>0.01</gz:voxel_size> | ||
</auto_inertia_params> | ||
<geometry> | ||
<mesh> | ||
<uri>meshes/cylinder_bottom_origin.dae</uri> | ||
</mesh> | ||
</geometry> | ||
</collision> | ||
<visual name="cylinder_visual"> | ||
<pose>0 0 0 0 0 0</pose> | ||
<geometry> | ||
<mesh> | ||
<uri>meshes/cylinder_bottom_origin.dae</uri> | ||
</mesh> | ||
</geometry> | ||
<material> | ||
<diffuse>0.7 0.7 0.7 1.0</diffuse> | ||
<ambient>0.7 0.7 0.7 1.0</ambient> | ||
<specular>0.7 0.7 0.7 1.0</specular> | ||
</material> | ||
</visual> | ||
</link> | ||
</model> | ||
</sdf> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Since
CalculateMeshCentroid
andTransformInertiaMatrixToCOM
are unused and untested, I think we should remove them. I'd be in favor of addingTransformInertiaMatrixToCOM
togz::math::Inertial
with 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.
Removed the unused functions in 7424bab. Would create a PR over at gz-math as soon as possible for the
TransformInertiaMatrixToCOM()
function.