forked from gazebosim/gz-sim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix: Fixed Centre of Mass and Inertia Matrix Calculation Bug `Mesh…
…InertiaCalculator::CalculateMassProperties()` function (gazebosim#2182) * Added function to transform inertia matrix to COM using parallel axis theorem * Corrected mismatch of values in ixz and iyz calculation from integral * Added doc for TransformInertiaMatrixToCOM() function * Added correction for rotational offset of inertia matrix after transformation * Added cylinder with origin at bottom to test world * Fixed center of mass & inertia matrix calculation in CalculateMassProperties() * Added test for inertia calculation of cylinder with origin at the bottom * Updated input params of TransformInertiaMatrixToCOM() to const ref * Updated tutorial doc * Removed unused functions from the code --------- Signed-off-by: Jasmeet Singh <[email protected]>
- Loading branch information
1 parent
a30dfff
commit 9db8061
Showing
8 changed files
with
224 additions
and
79 deletions.
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