Fixes joint friction API docs#5533
Conversation
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.
Greptile SummaryThis 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 (
Confidence Score: 4/5Documentation-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
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
Reviews (1): Last reviewed commit: "Fix joint friction API docs" | Re-trigger Greptile |
| @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. |
There was a problem hiding this comment.
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.
| @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!
| 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]. |
There was a problem hiding this comment.
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.
| 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!
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
Screenshots
Not applicable.
Checklist
pre-commitchecks with./isaaclab.sh --formatsource/<pkg>/changelog.d/for every touched package (do not editCHANGELOG.rstor bumpextension.toml— CI handles that)CONTRIBUTORS.mdor my name already exists there