Skip to content

Fixes joint friction API docs#5533

Merged
AntoineRichard merged 2 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/docs-joint-friction-pr
May 8, 2026
Merged

Fixes joint friction API docs#5533
AntoineRichard merged 2 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/docs-joint-friction-pr

Conversation

@AntoineRichard
Copy link
Copy Markdown
Collaborator

Description

Clarifies the articulation joint friction API docs across the base, PhysX, and Newton implementations.

The base API now warns that joint friction semantics are backend-specific. The PhysX docs distinguish legacy
unitless coefficients from PhysX 5 static/dynamic friction efforts and viscous coefficients. The Newton docs now
identify joint friction as an absolute force/torque value and include an MJWarp example mapping the value to
MuJoCo Warp's dof_frictionloss.

Fixes isaac-sim/IsaacLab-Internal#875

Type of change

  • Documentation update

Screenshots

Not applicable.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works (not applicable: docs-only change)
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package (do not edit CHANGELOG.rst or bump extension.toml — CI handles that)
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

Clarify that the base articulation API exposes backend-specific joint friction semantics. Document PhysX legacy coefficient versus PhysX 5 friction efforts, and document Newton joint friction as force or torque with an MJWarp frictionloss example.
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label May 7, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 7, 2026

Greptile Summary

This is a documentation-only PR that clarifies the semantics and units of the joint friction API across the base, PhysX, and Newton backends — addressing a real source of confusion caused by a historically unitless parameter name (joint_friction_coeff) that now carries backend-specific physical units.

  • Base API (base_articulation.py, base_articulation_data.py): replaced the old unitless-coefficient description with a backend-agnostic .. warning:: block noting that physical meaning and units are backend-dependent.
  • PhysX backend (isaaclab_physx): distinguished legacy (< 5.0) unitless coefficients from the PhysX 5 model of static/dynamic friction efforts [N or N·m] and viscous friction [N·s/m or N·m·s/rad]; added a warning that static effort must be ≥ dynamic effort.
  • Newton backend (isaaclab_newton): identified friction as an absolute force/torque value mapped to Newton's Model.joint_friction field, with a concrete MJWarp / dof_frictionloss example and a note that unsupported solvers may silently ignore the value.

Confidence Score: 4/5

Documentation-only change with no logic modifications; safe to merge.

All three changed property docstrings in isaaclab_physx/articulation_data.py were updated in this PR, but the terminology is inconsistent: joint_friction_coeff uses "value", joint_dynamic_friction_coeff uses "effort", and joint_viscous_friction_coeff retains the old title without the "PhysX" prefix. Since the stated goal is to clarify semantics, keeping this inconsistency in the same file works against that goal, but it has no runtime impact.

source/isaaclab_physx/isaaclab_physx/assets/articulation/articulation_data.py — minor terminology inconsistency across the three property docstrings introduced in this PR.

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/assets/articulation/base_articulation.py Updated two write_joint_friction_coefficient_to_sim_* docstrings to replace the old unitless-coefficient description with a backend-agnostic warning; no logic changed.
source/isaaclab/isaaclab/assets/articulation/base_articulation_data.py Added a backend-agnostic warning block to the joint_friction_coeff abstract property docstring; no logic changed.
source/isaaclab_physx/isaaclab_physx/assets/articulation/articulation.py Rewrote friction docstrings to distinguish legacy (< 5.0) unitless coefficients from PhysX 5 effort/viscous-coefficient model with units; added static ≥ dynamic warning. Method titles for dynamic-friction methods updated from "coefficient" to "effort".
source/isaaclab_physx/isaaclab_physx/assets/articulation/articulation_data.py joint_friction_coeff property updated to say "value", joint_dynamic_friction_coeff updated to say "effort", and joint_viscous_friction_coeff updated with units — terminology is slightly inconsistent across the three properties.
source/isaaclab_newton/isaaclab_newton/assets/articulation/articulation.py Clarified that Newton stores friction as an absolute force/torque, not a unitless coefficient; added MJWarp dof_frictionloss example and solver-support note.
source/isaaclab_newton/isaaclab_newton/assets/articulation/articulation_data.py Updated joint_friction_coeff property to document Newton force/torque semantics with MJWarp example; no logic changed.

Class Diagram

%%{init: {'theme': 'neutral'}}%%
classDiagram
    class BaseArticulation {
        +write_joint_friction_coefficient_to_sim_index()
        +write_joint_friction_coefficient_to_sim_mask()
    }
    class BaseArticulationData {
        <<abstract>>
        +joint_friction_coeff : ProxyArray
    }
    class PhysXArticulation {
        +write_joint_friction_coefficient_to_sim_index()
        +write_joint_friction_coefficient_to_sim_mask()
        +write_joint_dynamic_friction_coefficient_to_sim_index()
        +write_joint_dynamic_friction_coefficient_to_sim_mask()
        +write_joint_viscous_friction_coefficient_to_sim_index()
        +write_joint_viscous_friction_coefficient_to_sim_mask()
    }
    class PhysXArticulationData {
        +joint_friction_coeff : ProxyArray
        +joint_dynamic_friction_coeff : ProxyArray
        +joint_viscous_friction_coeff : ProxyArray
    }
    class NewtonArticulation {
        +write_joint_friction_coefficient_to_sim_index()
        +write_joint_friction_coefficient_to_sim_mask()
    }
    class NewtonArticulationData {
        +joint_friction_coeff : ProxyArray
    }
    BaseArticulation <|-- PhysXArticulation
    BaseArticulation <|-- NewtonArticulation
    BaseArticulationData <|-- PhysXArticulationData
    BaseArticulationData <|-- NewtonArticulationData
Loading

Reviews (1): Last reviewed commit: "Fix joint friction API docs" | Re-trigger Greptile

Comment on lines 370 to +375
@property
def joint_friction_coeff(self) -> ProxyArray:
"""Joint static friction coefficient provided to the simulation.
"""PhysX joint static friction value provided to the simulation.

For Isaac Sim 5.0 and later, this is the static friction effort [N or N·m, depending on joint type].
For earlier Isaac Sim versions, this is the legacy unitless joint friction coefficient.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Inconsistent terminology across the three friction properties: joint_friction_coeff uses "value", joint_dynamic_friction_coeff uses "effort", and joint_viscous_friction_coeff keeps the old "coefficient" title without the "PhysX" prefix. The method-level docstrings consistently use "effort" for the static and dynamic quantities, so aligning the property doc title here avoids reader confusion when cross-referencing the two.

Suggested change
@property
def joint_friction_coeff(self) -> ProxyArray:
"""Joint static friction coefficient provided to the simulation.
"""PhysX joint static friction value provided to the simulation.
For Isaac Sim 5.0 and later, this is the static friction effort [N or N·m, depending on joint type].
For earlier Isaac Sim versions, this is the legacy unitless joint friction coefficient.
@property
def joint_friction_coeff(self) -> ProxyArray:
"""PhysX joint static friction effort provided to the simulation.
For Isaac Sim 5.0 and later, this is the static friction effort [N or N·m, depending on joint type].
For earlier Isaac Sim versions, this is the legacy unitless joint friction coefficient.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines 396 to +399
def joint_viscous_friction_coeff(self) -> ProxyArray:
"""Joint viscous friction coefficient provided to the simulation.

The coefficient is [N·s/m or N·m·s/rad, depending on joint type].
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 The joint_viscous_friction_coeff property title was not updated to include the "PhysX" prefix, unlike joint_friction_coeff and joint_dynamic_friction_coeff. For consistent style across all three properties in this file, the prefix should be added here too.

Suggested change
def joint_viscous_friction_coeff(self) -> ProxyArray:
"""Joint viscous friction coefficient provided to the simulation.
The coefficient is [N·s/m or N·m·s/rad, depending on joint type].
def joint_viscous_friction_coeff(self) -> ProxyArray:
"""PhysX joint viscous friction coefficient provided to the simulation.
The coefficient is [N·s/m or N·m·s/rad, depending on joint type].

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@AntoineRichard AntoineRichard changed the title Fix joint friction API docs Fixes joint friction API docs May 7, 2026
@AntoineRichard AntoineRichard merged commit af9c98f into isaac-sim:develop May 8, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants