Closed theorska closed 1 year ago
Hi @theorska ! I think you want to use the legacy spring joint update by tacking on a dynamics_mode: "legacy_spring"
to your brax config. The newer version of brax does a position update for the joint constraint, and the "legacy_spring" does an acceleration level update for the joint constraint
See https://github.com/google/brax/blob/main/brax/physics/spring_joints.py#L89 vs https://github.com/google/brax/blob/main/brax/physics/joints.py#L79
Hello!
I am looking at a code that was made a couple of years ago, probably in version
0.0.5
. Here is the code that I am trying to implement for my case:In this
qp
is a QP object. In recent versions I believe this would look something like this:The code that I am transforming accesses
dp_j.vel
anddp_j.ang
, butdp_j
is a Q object which does not have these attributes and the return of joint apply confirms that it is indeed a Q object. Can I ask why was this possible to do in that version of Brax, or what am I missing? How would I get these values in current versions? Maybe something like:env.sys.integrator.update(qp, pos_q=dq_j)
?Thank you for your answer in advance.