Skip to content
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

bullet-featherstone: fix setting angular velocity #567

Merged
merged 7 commits into from
Nov 9, 2023

Conversation

scpeters
Copy link
Member

@scpeters scpeters commented Nov 9, 2023

🦟 Bug fix

Part of #545.

Summary

I've been working on a test for off-diagonal moment of inertia components to support #544 based on free rotation of oblong rigid bodies (similar to a test from gazebo-classic), and I found that bullet-featherstone's SetFreeGroupWorldAngularVelocity API wasn't working quite right. I've updated the FeatureList for the FreeGroup test in COMMON_TEST_simulation_features so that it will run with bullet-featherstone (33e12fa) and also refactored the test a bit (a4359ef: use a world that doesn't start with shapes already in contact, add expectations for FreeGroup APIs, and tighten expected velocity tolerances).

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

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.

* Use falling.world instead of shapes.world to avoid
  initial contact.
* Verify free group pose and velocities in addition
  to link values.
* Use AssertVectorApprox for velocity expectations,
  and use tighter tolerances.

Signed-off-by: Steve Peters <[email protected]>
* Use btMultiBody::setBaseOmega API
* Fix null pointer check

Signed-off-by: Steve Peters <[email protected]>
@scpeters scpeters requested review from azeey and mxgrey as code owners November 9, 2023 12:52
@github-actions github-actions bot added the 🌱 garden Ignition Garden label Nov 9, 2023
@scpeters scpeters requested a review from iche033 November 9, 2023 12:55
linkFrameData = model->GetLink(0)->FrameDataRelativeToWorld();

// Expect linear velocity to be affected by gravity.
const Eigen::Vector3d linearVelocityAfterStep{0.1, 0.2, 0.3 - 9.8 * 0.001};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TPE is failing these expectations

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be fixed by d604c92

Copy link

codecov bot commented Nov 9, 2023

Codecov Report

Merging #567 (40a25ea) into gz-physics6 (cf74036) will increase coverage by 0.61%.
The diff coverage is 100.00%.

❗ Current head 40a25ea differs from pull request most recent head 018e8bd. Consider uploading reports for the commit 018e8bd to get more accurate results

@@               Coverage Diff               @@
##           gz-physics6     #567      +/-   ##
===============================================
+ Coverage        77.16%   77.77%   +0.61%     
===============================================
  Files              143      143              
  Lines             7309     7295      -14     
===============================================
+ Hits              5640     5674      +34     
+ Misses            1669     1621      -48     
Files Coverage Δ
bullet-featherstone/src/FreeGroupFeatures.cc 93.10% <100.00%> (+93.10%) ⬆️
bullet-featherstone/src/KinematicsFeatures.cc 85.00% <100.00%> (+1.66%) ⬆️

... and 2 files with indirect coverage changes

@scpeters scpeters merged commit 5e58f88 into gz-physics6 Nov 9, 2023
8 checks passed
@scpeters scpeters deleted the scpeters/bullet_freegroup_test branch November 9, 2023 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants