-
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
Implements a method to get the link inertia #2218
Conversation
Signed-off-by: Voldivh <[email protected]>
Signed-off-by: Voldivh <[email protected]>
Codecov Report
@@ Coverage Diff @@
## gz-sim8 #2218 +/- ##
===========================================
+ Coverage 65.74% 65.91% +0.16%
===========================================
Files 323 323
Lines 30719 30730 +11
===========================================
+ Hits 20197 20255 +58
+ Misses 10522 10475 -47
|
@@ -190,6 +189,23 @@ std::optional<math::Pose3d> Link::WorldPose( | |||
.value_or(sim::worldPose(this->dataPtr->id, _ecm)); | |||
} | |||
|
|||
////////////////////////////////////////////////// | |||
std::optional<math::Inertiald> Link::WorldInertial( |
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.
include <optional>
and math::Inertiald
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.
Those are being included in the link.hh
file, should I move them to this 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.
I don't think that's necessary.
python/test/link_TEST.py
Outdated
@@ -59,6 +59,10 @@ def on_pre_udpate_cb(_info, _ecm): | |||
# Visuals Test | |||
self.assertNotEqual(K_NULL_ENTITY, link.visual_by_name(_ecm, 'visual_test')) | |||
self.assertEqual(1, link.visual_count(_ecm)) | |||
# World Inertial Test | |||
self.assertEqual(Pose3d(), link.world_inertial(_ecm).pose()) | |||
self.assertEqual(Matrix3d(1,0,0,0,1,0,0,0,1), link.world_inertial(_ecm).moi()) |
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.
self.assertEqual(Matrix3d(1,0,0,0,1,0,0,0,1), link.world_inertial(_ecm).moi()) | |
self.assertEqual(Matrix3d(1, 0, 0, 0, 1, 0, 0, 0, 1), link.world_inertial(_ecm).moi()) |
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.
Done.
Signed-off-by: Voldivh <[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.
Looks good. Just one comment about the link and inertial pose.
Signed-off-by: Voldivh <[email protected]>
Signed-off-by: Voldivh <[email protected]>
Signed-off-by: Voldivh <[email protected]>
🎉 New feature
This PR addresses issue #2209
Summary
This PR adds a method to get the Link inertia in relation to the world frame.
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.