diff --git a/docs/guide/configuration.rst b/docs/guide/configuration.rst index 4061b30ff..8a9bdb723 100644 --- a/docs/guide/configuration.rst +++ b/docs/guide/configuration.rst @@ -47,10 +47,21 @@ Joint Dynamics ~~~~~~~~~~~~~~ Joint dynamics are configured using environment variables starting with ``JAXSIM_JOINT_``. Available variables include: +- ``JAXSIM_JOINT_FRICTION_STATIC``: Overrides the static friction coefficient for all joints. + + *Default:* ``0.0``. + +- ``JAXSIM_JOINT_FRICTION_VISCOUS``: Overrides the viscous friction coefficient for all joints. + + *Default:* ``0.0``. + - ``JAXSIM_JOINT_POSITION_LIMIT_DAMPER``: Overrides the damper value for joint position limits of the SDF model. + *Default:* ``0.0``. + - ``JAXSIM_JOINT_POSITION_LIMIT_SPRING``: Overrides the spring value for joint position limits of the SDF model. + *Default:* ``0.0``. Logging and Exceptions ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/src/jaxsim/parsers/rod/parser.py b/src/jaxsim/parsers/rod/parser.py index 99d779d3e..86f98fe72 100644 --- a/src/jaxsim/parsers/rod/parser.py +++ b/src/jaxsim/parsers/rod/parser.py @@ -252,14 +252,14 @@ def extract_model_data( if j.axis is not None and j.axis.dynamics is not None and j.axis.dynamics.friction is not None - else 0.0 + else os.environ.get("JAXSIM_JOINT_FRICTION_STATIC", 0.0) ), friction_viscous=float( j.axis.dynamics.damping if j.axis is not None and j.axis.dynamics is not None and j.axis.dynamics.damping is not None - else 0.0 + else os.environ.get("JAXSIM_JOINT_FRICTION_VISCOUS", 0.0) ), position_limit_damper=float( j.axis.limit.dissipation