-
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
Added Mesh Moment of Inertia Calculator #2061
Added Mesh Moment of Inertia Calculator #2061
Conversation
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.
some lines are more than 100 characters, review style too
Is there any reason to include the implementation in the hpp
? I think you should move the implementation to a cpp
file.
Add some tests too
and add some tests
Can you merge from |
Signed-off-by: Jasmeet Singh <[email protected]>
96278c4
to
d440184
Compare
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]>
…CalcProperties Signed-off-by: Jasmeet Singh <[email protected]>
…unctions Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
d440184
to
3fc1587
Compare
Corrected the style and completed codecheck in 3fc1587
I have removed implementation from the header file and added it to a separate source file. |
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.
Maybe add a test for the MeshInertiaCalculator
class?
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
…3D mesh 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]>
…om_mesh_inerita_calculator
…nerita_calculator
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
hmm there seems to be more test failures than usual |
merging #2105 first |
…oad() in server Signed-off-by: Jasmeet Singh <[email protected]>
@iche033 the test failures were coming due to not using the |
…ertia_tensor_transformation
Codecov Report
@@ Coverage Diff @@
## gz-sim8 #2061 +/- ##
===========================================
+ Coverage 65.34% 65.43% +0.08%
===========================================
Files 322 323 +1
Lines 30554 30699 +145
===========================================
+ Hits 19967 20088 +121
- Misses 10587 10611 +24
|
- Added check to compare inertia origin and centre of mass Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
Signed-off-by: Jasmeet Singh <[email protected]>
🎉 New feature
Based on this proposal.
Summary
Demo & Usage Example
Demo 1: This demo shows the automatic inertia calculation feature on a rubber ducky model which is a non-convex mesh. On the left, we have the rubber ducky mesh with automatic calculations enabled and on the right, the mesh uses the default values.
SDF snippet for the duck mesh with auto inertial
Demo 2: This demo shows 2 cylinders: One using a Collada cylinder mesh (right) and the other made using the
<cylinder>
geometry from SDF (left).Both use
<inertial auto="true" />
and we can see that the inertia values for both come up to be almost the same (within 0.005 tolerance). The mesh cylinder uses the mesh inertia calculator added togz-sim
and is used withlibsdformat
using the callback-based API.SDF snippet for the mesh cylinder
TODO:
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.