-
Notifications
You must be signed in to change notification settings - Fork 277
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
Physics: set link velocity from *VelocityReset components #2489
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2489 +/- ##
==========================================
- Coverage 65.95% 65.87% -0.08%
==========================================
Files 327 330 +3
Lines 31319 31831 +512
==========================================
+ Hits 20655 20969 +314
- Misses 10664 10862 +198 ☔ View full report in Codecov by Sentry. |
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've read the code and left some comments; I'll make a suggestion shortly about how to test this
/// \brief Link initial angular velocity in its own frame and | ||
/// in SI units (rad/s).The angular velocity of entity is | ||
/// represented by gz::math::vector3d. |
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.
/// \brief Link initial angular velocity in its own frame and | |
/// in SI units (rad/s).The angular velocity of entity is | |
/// represented by gz::math::vector3d. | |
/// \brief Angular velocity of an entity in its own frame | |
/// and in SI units (rad/s). The angular velocity is | |
/// represented by gz::math::Vector3d. |
math::eigen3::convert(worldAngularVel)); | ||
|
||
return true; | ||
}); |
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.
nit: the indentation level of this block has an odd number of spaces in some parts. please check and match the indentation level of similar code blocks
for a test, I suggest a similar structure to the test for if we borrow a 1x4x9 box from the boxes benchmark with the "complex" case (gravity and gyroscopic tumbling) we could set the initial linear velocity and expect it to change according to gravity, and we could set the initial angular velocity and expect it to rotate while preserving angular momentum in the world frame |
21f0b9a
to
11db468
Compare
okay, I will check this out and will add the test. |
I've made an example test for WorldLinearVelocityReset in yaswanth1701#1 please merge that in and then add one for WorldAngularVelocityReset if you have time |
yeah, sure I will add the test for angular velocity reset. |
6472309
to
23ccac4
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.
just a few small suggestions; the new test looks good!
Signed-off-by: yaswanth1701 <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: yaswanth1701 <[email protected]>
Signed-off-by: yaswanth1701 <[email protected]>
Signed-off-by: yaswanth1701 <[email protected]>
Co-authored-by: Steve Peters <[email protected]> Signed-off-by: Yaswanth <[email protected]>
Co-authored-by: Steve Peters <[email protected]> Signed-off-by: Yaswanth <[email protected]>
Co-authored-by: Steve Peters <[email protected]> Signed-off-by: Yaswanth <[email protected]>
Co-authored-by: Steve Peters <[email protected]> Signed-off-by: Yaswanth <[email protected]>
36015a3
to
4477f77
Compare
done |
🎉 New feature
Closes #
Summary
Follow-up PR to #2440. Added link velocity reset component for linear and angular velocity. Updated the physics system plugin to support the reset components of link velocity.
Test it
Have to add test case.
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.