google / brax

Massively parallel rigidbody physics simulation on accelerator hardware.
Apache License 2.0
2.23k stars 246 forks source link

Joints broke after last merge #181

Open lukaszjumper opened 2 years ago

lukaszjumper commented 2 years ago

After last commits joints do not connect bodies properly. It is easily visible in the Brax Basics Collab: https://colab.research.google.com/github/google/brax/blob/main/notebooks/basics.ipynb For example, in the last part actuators do not raise the ball to the target angles. Our codes using Brax also stopped working. It looks like the code is reinvented right now, so I was wondering what is the vision of new joints.

erikfrey commented 2 years ago

Hi Lukasz - thanks for pointing this out. We just pushed a few fixes in 730e05d4af58eada5b49a44e849107d76e386b9a that return the basics colab back to normal behavior.

We have introduced new position-based dynamics that should handle both contact and joint constraints more accurately than our existing approach, although clearly still a few bugs to work out! Thanks for bearing with us.

In the meantime, you can get the old behavior by setting dynamics_mode = "legacy_spring" in your configs.

Our immediate plans are to fix any remaining bugs around position-based dynamics, tidy up the code and the performance of it a bit more, and then cut a 1.0 release.

After 1.0 we will add support for reduced coordinates but there's still quite a bit to do before that's ready.