Skip to content

[Bug Report] randomize_joint_parameters only updates static friction and may violate PhysX constraint (static < dynamic friction) #3266

@GiulioRomualdi

Description

@GiulioRomualdi

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

  1. Only the static friction is updated.
  2. 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

  1. Define an articulation with:

    friction = {" .*": 10.0},
    dynamic_friction = {" .*": 10.0},
    viscous_friction = {" .*": 0.0},
  2. 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

  • I have checked that there is no similar issue in the repo (required)
  • I have confirmed this issue is not in Isaac Sim itself but in this repo

Acceptance Criteria

  • All friction types (static, dynamic, viscous) can be randomized
  • Randomization ensures static friction ≥ dynamic friction

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions