Describe the bug
The function randomize_joint_parameters can be used to randomize joint friction.
Starting from Isaac Sim 5.0.0, it is possible to set static, dynamic (Coulomb), and viscous friction separately.
However, the main constraint that must be respected is:
static friction ≥ dynamic friction
Currently, calling randomize_joint_parameters randomizes only the static friction, as shown here:
|
# sample joint properties from the given ranges and set into the physics simulation |
|
# joint friction coefficient |
|
if friction_distribution_params is not None: |
|
friction_coeff = _randomize_prop_by_op( |
|
self.asset.data.default_joint_friction_coeff.clone(), |
|
friction_distribution_params, |
|
env_ids, |
|
joint_ids, |
|
operation=operation, |
|
distribution=distribution, |
|
) |
|
self.asset.write_joint_friction_coefficient_to_sim( |
|
friction_coeff[env_ids[:, None], joint_ids], joint_ids=joint_ids, env_ids=env_ids |
|
) |
This can result in static friction being set lower than dynamic friction, which violates PhysX constraints.
Problems Identified
- Only the static friction is updated.
- Nothing prevents static friction < dynamic friction, which triggers PhysX errors.
Proposed Solution
Problem 1: Only static friction is randomized
Problem 2: Constraint violation (static friction < dynamic friction)
During randomization, enforce the condition:
if static_friction < dynamic_friction:
# Option A: Increase static friction
static_friction = dynamic_friction
# Option B: Decrease dynamic friction
dynamic_friction = static_friction
A consistent choice should be made (e.g., always clamp static friction to be at least dynamic friction).
Steps to Reproduce
-
Define an articulation with:
friction = {" .*": 10.0},
dynamic_friction = {" .*": 10.0},
viscous_friction = {" .*": 0.0},
-
Add the event:
randomize_friction = EventTerm(
func=mdp.randomize_joint_parameters,
mode="reset",
params={
"asset_cfg": SceneEntityCfg("robot"),
"friction_distribution_params": (0.5, 1.5),
"operation": "scale",
"distribution": "uniform",
},
)
The following error will be obtained
2025-08-25T09:13:33Z [118,688ms] [Error] [omni.physx.plugin]
PhysX error: Static friction effort must be greater than or equal to dynamic friction effort.,
FILE /builds/omniverse/physics/physx/source/physx/src/NpArticulationJointReducedCoordinate.cpp, LINE 209
System Info
- Commit: 9d63214
- Isaac Sim Version: 5.0
- OS: Ubuntu 22.04
- GPU: NVIDIA L40S
- CUDA: 12.4
- GPU Driver: 550.107.02
Additional Context
N/A
Checklist
Acceptance Criteria
Describe the bug
The function
randomize_joint_parameterscan be used to randomize joint friction.Starting from Isaac Sim 5.0.0, it is possible to set static, dynamic (Coulomb), and viscous friction separately.
However, the main constraint that must be respected is:
static friction ≥ dynamic friction
Currently, calling
randomize_joint_parametersrandomizes only the static friction, as shown here:IsaacLab/source/isaaclab/isaaclab/envs/mdp/events.py
Lines 704 to 717 in 3a1a65b
This can result in static friction being set lower than dynamic friction, which violates PhysX constraints.
Problems Identified
Proposed Solution
Problem 1: Only static friction is randomized
Update dynamic friction (available in Isaac Sim ≥ 5) calling
IsaacLab/source/isaaclab/isaaclab/assets/articulation/articulation.py
Line 871 in 3a1a65b
Update viscous friction (available in Isaac Sim ≥ 5) calling
IsaacLab/source/isaaclab/isaaclab/assets/articulation/articulation.py
Line 871 in 3a1a65b
Problem 2: Constraint violation (static friction < dynamic friction)
During randomization, enforce the condition:
A consistent choice should be made (e.g., always clamp static friction to be at least dynamic friction).
Steps to Reproduce
Define an articulation with:
Add the event:
The following error will be obtained
System Info
Additional Context
N/A
Checklist
Acceptance Criteria