google / brax

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

How to get the local joint angle from QP ? #319

Closed Theo-Cheynel closed 1 year ago

Theo-Cheynel commented 1 year ago

Hi, I'm trying to access, within a QP object, the angle of each joint (I know that the global angle of each rigidbody is stored in qp['rot'], but I'm interested in the local angle of the joints).

I think the information in the QP is not sufficient, but surely there's a way of doing it for a given System object ?

Theo-Cheynel commented 1 year ago

Found it ! For anyone wondering, it's env.sys.joints[0].angle_vel(state.qp), containing the angle and speed of each joint