Skip to content

Add per-link articulation physics configuration#278

Open
yuecideng wants to merge 1 commit into
mainfrom
feat/per-link-articulation-physics
Open

Add per-link articulation physics configuration#278
yuecideng wants to merge 1 commit into
mainfrom
feat/per-link-articulation-physics

Conversation

@yuecideng
Copy link
Copy Markdown
Contributor

Description

This PR adds per-link rigid-body physics configuration for articulations. Previously, ArticulationCfg.attrs applied the same RigidBodyAttributesCfg to every link via a single DexSim set_physical_attr call.

Changes

  • RigidBodyAttributesOverrideCfg: partial overrides (None = keep base value)
  • LinkPhysicsOverrideCfg + ArticulationCfg.link_attrs: named groups with regex link matching (same pattern as joint drive_pros)
  • apply_articulation_link_physics: global attrs first, then per-link overrides; errors if a link matches multiple groups
  • Articulation.get_link_physical_attr / set_link_physical_attr: runtime API with regex link selection
  • ArticulationCfg.from_dict / RobotCfg.from_dict: parse nested link_attrs
  • Tests: merge/overlap unit tests + CPU integration tests (TestArticulationLinkPhysicsCPU)
  • Docs: sim_articulation.md updated with link_attrs table and example

Example

ArticulationCfg(
    fpath="robot.urdf",
    attrs=RigidBodyAttributesCfg(static_friction=0.5),
    link_attrs={
        "handle": LinkPhysicsOverrideCfg(
            link_names_expr=["handle_xpos"],
            attrs=RigidBodyAttributesOverrideCfg(static_friction=0.87),
        ),
    },
)

Dependencies: none (uses existing DexSim per-link set_physical_attr API).

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which improves an existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (existing functionality will not work without user modification)
  • Documentation update

Screenshots

N/A (simulation physics configuration; no visual UI change).

Checklist

  • I have run the black . command to format the code base.
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Dependencies have been updated, if applicable.

Test plan

  • pytest tests/sim/objects/test_articulation.py::TestRigidBodyAttributesOverride
  • pytest tests/sim/objects/test_articulation.py::TestArticulationLinkPhysicsCPU

Made with Cursor

Support link_attrs override groups with regex link matching, partial
RigidBodyAttributesOverrideCfg merging, and runtime get/set_link_physical_attr.
DexSim already supported per-link set_physical_attr; this wires config and tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@yuecideng yuecideng added enhancement New feature or request physics Things related to physics object Simulation object assets dexsim Things related to dexsim labels May 22, 2026
@yuecideng yuecideng requested a review from MahooX May 22, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dexsim Things related to dexsim enhancement New feature or request object Simulation object assets physics Things related to physics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant