Add per-link articulation physics configuration#278
Open
yuecideng wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds per-link rigid-body physics configuration for articulations. Previously,
ArticulationCfg.attrsapplied the sameRigidBodyAttributesCfgto every link via a single DexSimset_physical_attrcall.Changes
RigidBodyAttributesOverrideCfg: partial overrides (None= keep base value)LinkPhysicsOverrideCfg+ArticulationCfg.link_attrs: named groups with regex link matching (same pattern as jointdrive_pros)apply_articulation_link_physics: globalattrsfirst, then per-link overrides; errors if a link matches multiple groupsArticulation.get_link_physical_attr/set_link_physical_attr: runtime API with regex link selectionArticulationCfg.from_dict/RobotCfg.from_dict: parse nestedlink_attrsTestArticulationLinkPhysicsCPU)sim_articulation.mdupdated withlink_attrstable and exampleExample
Dependencies: none (uses existing DexSim per-link
set_physical_attrAPI).Type of change
Screenshots
N/A (simulation physics configuration; no visual UI change).
Checklist
black .command to format the code base.Test plan
pytest tests/sim/objects/test_articulation.py::TestRigidBodyAttributesOverridepytest tests/sim/objects/test_articulation.py::TestArticulationLinkPhysicsCPUMade with Cursor