From 6178e8cd0a25bfe2d44eb8278980b2ab36c67db0 Mon Sep 17 00:00:00 2001 From: Alessandro Croci Date: Tue, 22 Oct 2024 16:18:41 +0200 Subject: [PATCH] Fix bug in Delassus matrix computation --- examples/jaxsim_as_multibody_dynamics_library.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/jaxsim_as_multibody_dynamics_library.ipynb b/examples/jaxsim_as_multibody_dynamics_library.ipynb index b22379b2c..43ecbd288 100644 --- a/examples/jaxsim_as_multibody_dynamics_library.ipynb +++ b/examples/jaxsim_as_multibody_dynamics_library.ipynb @@ -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", @@ -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",