Skip to content

Commit

Permalink
Merge pull request #270 from xela-95/fix/delassus-example-nb
Browse files Browse the repository at this point in the history
Fix bug in Delassus matrix computation in example notebook
  • Loading branch information
diegoferigo authored Oct 22, 2024
2 parents 481b6d8 + 6178e8c commit edc4a35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/jaxsim_as_multibody_dynamics_library.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@
"Key methodologies in this area may involve the Delassus matrix:\n",
"\n",
"$$\n",
"\\Psi(\\mathbf{q}) = J_{W,C}^T(\\mathbf{q}) \\, M(\\mathbf{q})^{-1} \\, J_{W,C}^T(\\mathbf{q})\n",
"\\Psi(\\mathbf{q}) = J_{W,C}(\\mathbf{q}) \\, M(\\mathbf{q})^{-1} \\, J_{W,C}^T(\\mathbf{q})\n",
"$$\n",
"\n",
"or the linear acceleration of a contact point:\n",
Expand Down Expand Up @@ -780,7 +780,7 @@
" J̇l_WC = js.contact.jacobian_derivative(model=model, data=data)[:, 0:3, :]\n",
"\n",
"# Compute the Delassus matrix.\n",
"Ψ = jnp.vstack(Jl_WC) @ jnp.linalg.lstsq(BW_M, jnp.vstack(J̇l_WC).T)[0]\n",
"Ψ = jnp.vstack(Jl_WC) @ jnp.linalg.lstsq(BW_M, jnp.vstack(Jl_WC).T)[0]\n",
"print(f\"Ψ: shape={Ψ.shape}\")\n",
"\n",
"# Compute the transforms of the mixed frames implicitly associated\n",
Expand Down

0 comments on commit edc4a35

Please sign in to comment.