Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/jaxsim/api/actuation_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def compute_resultant_torques(

τ_friction = jnp.zeros_like(τ_references).astype(float)

if model.dofs() > 0:
# Apply joint friction only if enabled in the actuation parameters.
if model.dofs() > 0 and model.actuation_params.friction:

# Static and viscous joint friction parameters
kc = jnp.array(
Expand Down
2 changes: 2 additions & 0 deletions src/jaxsim/rbda/actuation/common.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import dataclasses

import jax_dataclasses
from jax_dataclasses import Static

import jaxsim.typing as jtp
from jaxsim.utils import JaxsimDataclass
Expand All @@ -15,3 +16,4 @@ class ActuationParams(JaxsimDataclass):
torque_max: jtp.Float = dataclasses.field(default=3000.0) # (Nm)
omega_th: jtp.Float = dataclasses.field(default=30.0) # (rad/s)
omega_max: jtp.Float = dataclasses.field(default=100.0) # (rad/s)
friction: Static[bool] = dataclasses.field(default=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can call it enable_friction or consider_friction ? to avoid misinterpretation of the value

Loading