Skip to content

Commit

Permalink
Use a linalg.pinv to invert the mass matrix in RelaxedRigidContacts
Browse files Browse the repository at this point in the history
  • Loading branch information
flferretti authored Nov 22, 2024
1 parent 51ab012 commit f2016a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jaxsim/rbda/contacts/relaxed_rigid.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def compute_contact_forces(

# Compute the Delassus matrix and the free mixed linear acceleration of
# the collidable points.
G = Jl_WC @ jnp.linalg.lstsq(M, Jl_WC.T)[0]
G = Jl_WC @ jnp.linalg.pinv(M) @ Jl_WC.T
CW_al_free_WC = Jl_WC @ BW_ν̇_free + J̇_WC @ BW_ν

# Calculate quantities for the linear optimization problem.
Expand Down

0 comments on commit f2016a8

Please sign in to comment.