[USD] Make PhysX tendon fragments schema- and instance-specific - #7534
Conversation
Greptile SummaryThe PR corrects PhysX tendon property namespaces, adds instance-selective fixed and spatial tendon fragments, and separates fixed-tendon root properties from per-axis properties.
Confidence Score: 4/5The PR should not merge until an explicitly requested but nonexistent tendon instance produces a surfaced error instead of silently leaving the asset unchanged. The new selector returns a false result for absent explicit names, while the production spawn path ignores that result, allowing requested tendon configuration to be dropped without diagnostics. Files Needing Attention: source/isaaclab_physx/isaaclab_physx/sim/schemas/schemas.py; source/isaaclab/isaaclab/sim/spawners/from_files/from_files.py Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
C[Spawn tendon fragment] --> P[Core prim-path targeting]
P --> S{Fragment schema}
S -->|Fixed root| R[PhysxTendonAxisRootAPI]
S -->|Fixed axis| A[PhysxTendonAxisAPI]
S -->|Spatial root| T[PhysxTendonAttachmentRootAPI]
R --> I[Select existing instance names]
A --> I
T --> I
I --> U[Resolve canonical USD property template]
U --> W[Author physxTendon instance properties]
Reviews (1): Last reviewed commit: "Make PhysX tendon fragments instance-sel..." | Re-trigger Greptile |
| instances = _selected_tendon_instances(prim, schema_type, cfg.instance_names) | ||
| if not instances: | ||
| return False |
There was a problem hiding this comment.
Unmatched instances silently no-op
When instance_names contains an absent or misspelled tendon name, this branch returns False, but the production spawn path discards that result. The requested tendon properties are therefore not authored and PhysX runs with the asset's unchanged values without reporting the invalid selection.
There was a problem hiding this comment.
Isaac Lab Review Bot
The PhysX tendon update correctly adopts the schema-owned physxTendon:<instance>:* namespace, splits fixed-tendon root and axis properties, and adds instance selection. One user-visible compatibility change still needs release documentation: spatial-tendon matching no longer accepts leaf-only prims.
- Design and architecture: The RootAPI/AxisAPI split follows the USD schema boundary, while schema-template resolution remains private to
isaaclab_physxand core retains family targeting and dispatch. The narrowing of spatial-tendon targets to attachment roots is coherent with that ownership model but changes prior core behavior and must be documented. - API: The new
PhysxFixedTendonAxisCfgandapply_fixed_tendon_axisAPIs are exported and documented, and selector fields preserve existing positional field order. However, leaf-only spatial-tendon targets now return failure rather than being accepted, without corresponding migration guidance in theisaaclabchangelog fragment. - Implementation: Canonical multiple-apply parsing and schema-derived property templates avoid the previous ignored custom attributes. The changed
_is_spatial_tendon_targetpredicate and legacy spatial writer consistently restrict tuning toPhysxTendonAttachmentRootAPI; the remaining action is to document that callers must target attachment-root prims rather than leaf-only prims.
Minor fixes needed. Posted 1 actionable finding inline.
Automated review; human maintainers own approval decisions.
| "PhysxTendonAttachmentRootAPI" in s or "PhysxTendonAttachmentLeafAPI" in s for s in prim.GetAppliedSchemas() | ||
| ) | ||
| """Whether a prim carries a spatial-tendon root instance.""" | ||
| return any(_applied_schema_instance(schema, "PhysxTendonAttachmentRootAPI") for schema in prim.GetAppliedSchemas()) |
There was a problem hiding this comment.
🟡 Warning · Api — Spatial leaf targets dropped without changelog note
_is_spatial_tendon_target and modify_spatial_tendon_properties now match only PhysxTendonAttachmentRootAPI, so a prim carrying only PhysxTendonAttachmentLeafAPI stops being a valid target: the writer warns "No spatial-tendon targets matched" and returns False where it previously returned True. The isaaclab changelog fragment records only the namespace fix and the fixed-tendon extension; add this narrowing with migration guidance to target the attachment-root prim.
|
run-ci |
|
Backported to |
(cherry picked from commit 29bcb09)
Summary
PhysxTendonAxisRootAPI:index_finger:stiffness. PhysX reads the schema-declared propertynamespace,
physxTendon:index_finger:stiffness.instance_namesselector for one,several, or all existing instances.
this API is released.
parsing remains a private PhysX implementation detail.
This is a focused alternative to #7527. It fixes tendon authoring without introducing a generic
multiple-apply fragment convention in core.
Why the old namespace was wrong
A joint prim can carry both applied-schema instances:
Those tokens identify the API type and arbitrary instance name; they are not property prefixes.
Both schemas declare properties in the shared
physxTendonnamespace on the same prim:The previous writers concatenated the applied-schema token and field name. That produced custom
attributes which looked plausible in USD but were ignored by PhysX.
Public API and ownership
PhysxTendonAxisRootCfgPhysxTendonAxisRootAPIPhysxTendonAxisCfgPhysxTendonAxisAPIgearing,force_coefficient, andjoint_axisfor one joint contributionPhysxTendonAttachmentRootCfgPhysxTendonAttachmentRootAPIThe names deliberately follow the concrete USD schemas. “Fixed” and “spatial” remain family-level
concepts in
FixedTendonFragment,SpatialTendonFragment,fixed_tendons_props, andspatial_tendons_props; they no longer obscure which schema owns a concrete config.Every concrete fragment accepts:
Nonebroadcasts to every matching instance on each targeted prim.The prim-path expression selects prims;
instance_namesselects instances on those prims. Thefragments tune already-authored topology and never create a missing tendon instance.
Breaking migration
No aliases are retained:
PhysxFixedTendonCfgPhysxTendonAxisRootCfgPhysxSpatialTendonCfgPhysxTendonAttachmentRootCfgisaaclab_physx.sim.schemas.apply_fixed_tendonisaaclab.sim.schemas.apply_fixed_tendon_propertiesisaaclab_physx.sim.schemas.apply_spatial_tendonisaaclab.sim.schemas.apply_spatial_tendon_propertiesPhysxTendonAxisCfgis the new config for per-jointPhysxTendonAxisAPIproperties.Configuration examples
The selector supports broadcast, one instance, or a subset:
In a USD-file spawner, mapping keys select prims relative to the asset and fragments select schema
instances and properties:
The family writers can also be called directly:
Architecture boundary
_usd_applied_schemametadata._tune_tendon_schemaimplementation selects instances and resolves canonicalproperty names/types with
Usd.SchemaRegistry.MultiApplyFragment,apply_schema_instances, orpublic schema-name parsing helper.
angularor
linear), while tendon instance names are arbitrary asset-authored identifiers.Relationship to #7161
The Shadow Hand asset in #7161 already authors its tendon topology, and runtime tendon actions write
through the tensor API. That migration does not need this spawn-time schema fix, but it can rebase on
this PR to use the corrected public fragments.
Test plan
The complete PR is net-negative against
develop: 471 additions and 642 deletions (−171 lines).The focused tests cover canonical namespace authoring, one/list/all instance selection, concrete
schema ownership, root/child traversal, spatial-root isolation, legacy-writer regression, and
codeless schema resolution. Tests of internal metadata strings, public-symbol absence, constructor
field ordering, and other implementation details were removed.
Release backport
develop