Skip to content

Commit

Permalink
Use vertical asymptote joint viscous friction
Browse files Browse the repository at this point in the history
  • Loading branch information
flferretti committed Feb 26, 2025
1 parent 07c192b commit 1c219eb
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/jaxsim/api/actuation_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,16 @@ def compute_resultant_torques(

= data.joint_velocities

v_thresh = 10.0
v_thresh = 50.0

# Compute the joint friction torque.
τ_friction = -(
jnp.diag(kc) @ jnp.sign()
+ jnp.diag(kv) @ ( * v_thresh / (jnp.abs() + v_thresh))
)
# τ_friction = -(
# # jnp.diag(kc) @ jnp.sign(ṡ)
# + jnp.diag(kv) @ (ṡ * v_thresh / (jnp.abs(ṡ) + v_thresh))
# )

# Vertical asymptote
τ_friction = -jnp.diag(kv) @ ( / (v_thresh - jnp.abs()))

# ===============================
# Compute the total joint forces.
Expand Down

0 comments on commit 1c219eb

Please sign in to comment.