Skip to content

Commit

Permalink
Remove unnecessary assertion in crb
Browse files Browse the repository at this point in the history
  • Loading branch information
flferretti committed Oct 25, 2023
1 parent dbe3734 commit 6a78dc6
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/jaxsim/high_level/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1143,18 +1143,10 @@ def forward_dynamics_crb(
KV = jnp.diag(
jnp.array(list(self.physics_model._joint_motor_viscous_friction.values()))
)
Γ = jnp.diag(GR)

# Check on the motor parameters
jax.lax.cond(
pred=(jnp.diag(IM) != 0).any(),
operand=Γ,
true_fun=lambda Γ: jnp.diag(GR),
false_fun=lambda Γ: jnp.eye(GR.size),
)

# Compute auxiliary quantities
Γ = jnp.diag(GR)
Γ_inv = jnp.linalg.inv(Γ)

K̅ᵥ = Γ.T @ KV @ Γ

# Compute terms of the floating-base EoM
Expand Down

0 comments on commit 6a78dc6

Please sign in to comment.