Skip to content

Commit

Permalink
Remove unnecessary jax.vmap in model.link_bias_accelerations
Browse files Browse the repository at this point in the history
  • Loading branch information
flferretti committed Nov 21, 2024
1 parent 44daf21 commit bf02ea2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/jaxsim/api/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1951,11 +1951,9 @@ def body_to_other_representation(

case VelRepr.Mixed:
W_H_L = js.model.forward_kinematics(model=model, data=data)
LW_H_L = jax.vmap(lambda W_H_L: W_H_L.at[0:3, 3].set(jnp.zeros(3)))(W_H_L)
LW_H_L = W_H_L.at[:, 0:3, 3].set(jnp.zeros(3))
C_H_L = LW_H_L
L_v_CL = L_v_LW_L = jax.vmap( # noqa: F841
lambda v: v.at[0:3].set(jnp.zeros(3))
)(L_v_WL)
L_v_CL = L_v_LW_L = L_v_WL.at[:, 0:3].set(jnp.zeros(3)) # noqa: F841

case _:
raise ValueError(data.velocity_representation)
Expand Down

0 comments on commit bf02ea2

Please sign in to comment.