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-featurestore: Enable auto deactivation #630

Merged
merged 3 commits into from
Apr 24, 2024

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Apr 22, 2024

🎉 New feature

Summary

bullet supports auto deactivation of bodies after certain period if there's no motion (velocity < some threshold). This feature should be enabled by default by bullet but it looks like we were overriding this by looping through all models and setting them to active after every step. I think this may have been done because free group / joint cmds were not working after objects were deactivated.

This PR removes that logic for activating all bodies after every step. Instead, an explicit call to wake up the bodies when setting free group / joint commands.

Test it

The effect is most obvious with mesh-to-mesh collisions which are less stable. When 2 meshes collide and come to a rest, they should now stop drifting.

I tested with the box meshes from #600 (under To Test section). Expand the Component Inspector to see more decimal points, let the 2 box meshes collide. After a couple of seconds, the box pose values should settle and stop updating. Before these changes, the pose values would continue to drift over time.

bullet_auto_disable

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • 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.

Signed-off-by: Ian Chen <[email protected]>
@github-actions github-actions bot added the 🎵 harmonic Gazebo Harmonic label Apr 22, 2024
@iche033 iche033 added the Bullet Bullet engine label Apr 22, 2024
@azeey
Copy link
Contributor

azeey commented Apr 23, 2024

Do we need to do the same for applying external forces to links? You can test this with the "Mouse Drag" GUI plugin in gz-sim.

@iche033
Copy link
Contributor Author

iche033 commented Apr 23, 2024

Do we need to do the same for applying external forces to links? You can test this with the "Mouse Drag" GUI plugin in gz-sim.

oh yes, missed LinkFeatures. Added in 457578d.

Copy link

codecov bot commented Apr 23, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 78.32%. Comparing base (92e02c3) to head (457578d).
Report is 12 commits behind head on gz-physics7.

❗ Current head 457578d differs from pull request most recent head d2e86b6. Consider uploading reports for the commit d2e86b6 to get more accurate results

Files Patch % Lines
bullet-featherstone/src/JointFeatures.cc 60.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           gz-physics7     #630   +/-   ##
============================================
  Coverage        78.32%   78.32%           
============================================
  Files              140      140           
  Lines             8069     8079   +10     
============================================
+ Hits              6320     6328    +8     
- Misses            1749     1751    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@iche033 iche033 merged commit 62ee52c into gz-physics7 Apr 24, 2024
8 checks passed
@iche033 iche033 deleted the bullet_auto_disable branch April 24, 2024 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bullet Bullet engine 🎵 harmonic Gazebo Harmonic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants