google / brax

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

Closed kinematic chain simulation #392

Closed finnfi closed 8 months ago

finnfi commented 10 months ago

Hi, We are currently trying to setup a simulation of a quadruped where each leg is designed like a five-bar-linkage system like this: image

Is this closed chain kinematics supported by brax?

btaba commented 8 months ago

Hi @finnfi , we don't model closed kinematic chains in brax, but the way to do this in MuJoCo (or for the generalized backend) is to add a weld constraint at the paw. We don't have weld implemented in generalized right now For spring/pbd, I would (maybe) expect such a system to sort of work (with a lot of tuning). But since we use the MJCF loader, you won't be able to create a system with a kinematic loop in Brax. To sum it up, we'd need weld constraints implemented in Brax