Repository navigation
Refactor articulation actuator ownership - #6839
kellyguo11 merged 151 commits into
Conversation
5c59a09 to
9ce89f5
Compare
0d670f4 to
d15f91a
Compare
4929716 to
6a6049a
Compare
|
Too many files changed for review (176 files, 100 file limit). Bypass the limit by tagging |
There was a problem hiding this comment.
Isaac Lab Review Bot
The backend-neutral ActuatorCollection ownership split is coherent, but two construction-path regressions affect supported custom actuator configurations: direct ActuatorBase subclasses receive unsupported gain keywords, and string class references are validated without being resolved for instantiation.
- Design and architecture: The separation between articulation-owned solver state, collection-owned commands and telemetry, model-owned parameters, and backend-specific control adapters is consistent across PhysX, Newton, and OVPhysX. Before merge, the collection’s group-construction path should preserve the documented ActuatorBase extension contract and consistently use resolved actuator classes.
- API: ActuatorBase subclasses that inherit its constructor now fail because ActuatorCollection unconditionally supplies stiffness and damping even though ActuatorBase.init no longer accepts them. This breaks a documented extension point without a compatibility path. Additionally, string class_type references are treated as accepted inputs during validation but fail later because the unresolved string is inspected and called.
- Implementation: Execution batching, backend submission, alias forwarding, and copied-config resolution are broadly consistent. The actionable defects are localized to ActuatorCollection._build_groups: conditionally pass gain arguments or retain compatibility in ActuatorBase, and resolve class_type once before signature inspection, construction, and grouping.
Minor fixes needed. Posted 2 actionable findings inline.
The full PR diff was reviewed; some supplemental surrounding file context was omitted.
Automated review; human maintainers own approval decisions.
| joint_ids=actuator_joint_ids, | ||
| num_envs=self.num_instances, | ||
| device=self.device, | ||
| stiffness=properties.stiffness, |
There was a problem hiding this comment.
🟡 Warning · Api — ActuatorBase subclasses break on gain kwargs
_build_groups always passes stiffness= and damping= into cfg.class_type(**actuator_kwargs), but ActuatorBase.__init__ no longer accepts them (they moved to ImplicitActuator/IdealPDActuator). Actuators deriving directly from ActuatorBase, a documented extension point, now raise TypeError at construction with no deprecation path. Either keep accepting these kwargs in ActuatorBase.__init__, or gate them with the same inspect.signature fallback already used for effort_limit.
| else: | ||
| effort_limit_name = "actuator_effort_limit" | ||
| effort_limit_value = defaults.joint_effort_limit | ||
| constructor_parameters = inspect.signature(actuator_cfg.class_type.__init__).parameters |
There was a problem hiding this comment.
🟡 Warning · Implementation — String class_type resolved but not used
_is_implicit_actuator_cfg resolves a string class_type via _resolve_actuator_class, so string references are an accepted config form, but _build_groups then calls inspect.signature(actuator_cfg.class_type.__init__) and actuator_cfg.class_type(**actuator_kwargs) on the unresolved value. A "module:Class" config therefore fails at construction. Resolve the class once and reuse that type for signature inspection, instantiation, and grouping.
Add ActuatorCollection as the backend-neutral owner for actuator state and command APIs. Route legacy articulation target and gain setters through the collection with deprecation warnings. Move common articulation actuator-control forwarding into a shared helper and keep backend adapters focused on command submission, friction writes, and native actuator paths for PhysX, OVPhysX, and Newton. Add changelog fragments and focused ActuatorCollection tests.
ooctipus
left a comment
There was a problem hiding this comment.
Thanks this looks much nicer now.
only left a comment about shim layer but otherwise looks like a great rework :D
Congrat
| | gpu_max_rigid_patch_count: 81920 | actuators={ | | ||
| | gpu_found_lost_pairs_capacity: 1024 | "cart_actuator": ImplicitActuatorCfg( | | ||
| | gpu_found_lost_aggregate_pairs_capacity: 262144 | joint_names_expr=["slider_to_cart"], | | ||
| | gpu_total_aggregate_pairs_capacity: 1024 | effort_limit=400.0, | |
There was a problem hiding this comment.
this should be actuator_limit?
| "arm": ImplicitActuatorCfg( | ||
| joint_names_expr=["shoulder_pan_joint", "shoulder_lift_joint", | ||
| "elbow_joint", "wrist_1_joint", "wrist_2_joint", "wrist_3_joint"], | ||
| effort_limit=87.0, # From UR10e specifications |
There was a problem hiding this comment.
would this be actuator_(effort|velocity)_limit?
The command view holds the targets users request and the joint-command view holds what the actuator models produce for the solver; name them for those roles. ActuatorCommand becomes ActuatorTargetCommand exposed as target_command, and ActuatorJointCommand becomes ActuatorOutputCommand exposed as output_command, swept across the backends, data bindings, deprecation messages, tests, tutorials, and documentation.
The superpowers entry excluded a contributor-local worktree stash that does not exist in the repository.
The method had become a one-line wrapper around the module-level resolve_joint_parameter() after the resolution logic moved there. Call sites in the actuator models now call the free function directly, addressing review feedback on the redundant indirection. Custom-actuator backward compatibility was already broken by the constructor rework in this PR, so no deprecation path is kept.
Fix leftover command and joint_command view names in the actuators concept page, and replace the stale 1.0e9 solver effort note: explicit groups now keep the authored joint effort limit, so the solver clips the model output a second time. Document that behavior change with migration guidance in the 3.0 guide and the changelog fragment, point users of the deprecated write_actuator_*_to_sim writers at randomize_actuator_gains and write_group_parameter, and add the isaaclab.actuators.newton group-parameter functions to the API reference so their cross-references resolve.
Export resolve_joint_parameter from isaaclab.actuators so custom actuator subclasses have a public replacement for the removed ActuatorBase._parse_joint_parameter helper. Add the function to the API reference, a migration-guide entry with a before/after snippet for custom actuator authors, and changelog entries for the addition and the removal.
Fix the write_actuator_*_to_sim deprecation warning to point at write_group_parameter instead of the removed ActuatorBase.write_parameter, drop the unasserted private _sim_bind_joint_computed_effort recordings from both actuator equivalence twins, classify implicit groups in randomize_actuator_gains through the is_implicit_model class flag instead of a parallel isinstance tuple, and hoist the local imports in the PhysX benchmark asset runtime.
Forward None instead of slice(None) from Articulation.reset to the actuator collection so delayed-actuator buffers, which reject slices, reset all environments correctly (review feedback). Rename the fake collection in the PhysX prepare test to the target_command view and drop the removed adapter computed-effort field from the shared ordering-trace helper.
The OV articulation was missed when the PhysX and Newton backends were changed to forward None instead of slice(None) to the actuator collection reset. Also migrate the OV gain-event test off the removed group.stiffness/damping accessors to read_group_parameter, fixing the previously failing environment-selective reset and gain test.
Integrates 51 commits from develop. Notable resolutions: - Ported the implicit-actuator rated/solver effort-limit separation (isaac-sim#7078, via the Factory task isaac-sim#6891) into the renamed API: implicit groups honor a configured actuator_effort_limit as a stored rated limit distinct from the joint_effort_limit solver clamp, and the deprecated effort_limit alias now resolves to the rated limit for every actuator type (mirroring to the solver clamp when no separate clamp is configured). Verified the Factory Franka configs resolve with distinct rated and solver limits on both axes. - Kept develop's whole-path prim-regex matching (path_expr_to_glob) in both backend articulations. - Followed develop's test prunes (test_dr_legs_physics_presets.py deleted, reach preset tests trimmed) and kept the consolidated actuator equivalence twins.
Quote the torch union annotation in build_implicit_dof_mask so the module imports under Sphinx's mocked torch, remove the stale ActuatorJointProperties references from the actuators API page, rebuild the four migration-guide grid tables whose columns overflowed during the command-view rename, and wrap an overlong line in the actuator schema authoring.
Import IdealPDActuator lazily in randomize_actuator_gains so the environment-factory import path stays free of actuator config modules (test_factories_are_kitless_in_fresh_process), and point the actuators concept page at the existing policy-transfer how-to instead of a nonexistent document.
Resolves six conflicts from isaac-sim#6839 (actuator ownership) and isaac-sim#7036 (Shadow Hand prototype spawn): - Carry isaac-sim#7036's spawn_path onto the unified asset so only env_0 is authored. - Adopt joint_effort_limit, the new name for effort_limit_sim. - Keep isaac-sim#6839's actuators.compute/submit_commands delegation and re-apply the MuJoCo tendon actuator write on top. - Restore SHADOW_HAND_NEWTON_CFG as the asset's MuJoCo variant, so the demo and its new test keep working against the unified asset.
# Description Remove the root-level `manim-actuator-animations-handoff.md` planning artifact. The file was added as one of 185 changed files in #6839. Its content is an internal handoff brief tied to a temporary branch and unfinished hosting decisions, including instructions to keep generated work outside the repository. It is not linked from the documentation or used by repository tooling, and its old media-host guidance is now stale. No replacement is needed because maintained actuator documentation already lives under `docs/source/`. ## Type of change - Documentation update ## Release backport - [ ] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Screenshots Not applicable. ## Validation - `git diff upstream/main...HEAD --check` - `ISAACLAB_CHANGELOG_BASE_REF=upstream/main uvx pre-commit run --from-ref upstream/main --to-ref HEAD` - Confirmed the deleted file has no repository references. - Sphinx was not run because this root-level Markdown file is outside the rendered documentation tree. The standard `uv run isaaclab --format` command cannot initialize on this macOS host because the repository lockfile supports Linux and Windows. The equivalent pre-commit diff run above passes. ## Checklist - [x] I have read and understood the contribution guidelines. - [x] I ran the applicable pre-commit checks directly against the PR diff. - [x] The documentation change is complete; the obsolete artifact is removed without replacement. - [x] My changes generate no new warnings. - [x] No tests are needed because no runtime behavior changed. - [x] No changelog fragment is required because no source package changed. - [x] My name already exists in `CONTRIBUTORS.md`.
…ort for assemble trocar (#8771) # Description This fixes two regressions affecting GR00T N1.5 RL post-training for the G129 Dex3 assemble-trocar task. 1. **RLinf 0.3 compatibility after the integration update** - The RLinf revision pinned by [#8258](#8258) already registers `new_embodiment` as projector 10, while the GR00T N1.5 checkpoint uses projector 31. Honor an explicitly configured `embodiment_tag_id` instead of keeping the incompatible pre-registered value. - Add the patch-based weight syncer now required to synchronize updated actor weights to the rollout worker during training. - Give the stage-update reward term a non-zero weight because `RewardManager` skips weight-zero terms entirely. Its function still returns zero, so this does not alter the reward value. - Use `uv` and install the build dependencies for the documented flash-attn source build. 2. **G129 arm-motion regression from the actuator limit migration** - The actuator refactor in [#6839](#6839) changed the G129 waist setting from `velocity_limit=0.0` to `joint_velocity_limit=0.0`. - The old implicit-actuator path ignored `velocity_limit=0.0`, but the new field writes a hard zero-velocity limit to PhysX. This produced alternating arm velocity/torque responses and made the arms move too slowly to complete the task. - Remove the zero solver limit so the waist retains the USD velocity limit, restoring smooth arm tracking. 3. **PhysX and Newton support for the assemble-trocar task** * PhysX stays the default; append `physics=newton_mjwarp` to `isaaclab train/play --rl_library rlinf` to run on Newton. Other trailing `KEY=VALUE` env overrides are forwarded the same way. * Fix two Newton import issues in this scene (PhysX merged-mesh colliders, negative collider scales) and select G1 joints by name, since joint order differs per backend. * The task now runs independently on either physics backend. PhysX remains the default and its settings are unchanged; Newton is selected with `physics=newton_mjwarp`, and the Newton-specific settings apply only when Newton is selected. With the current Newton settings, we restarted PPO post-training from the SFT checkpoint with `success_stage=3` (insertion) on 16 GPUs and trained for about 120 steps The training success rate rises steadily from 20.3% at the first step to about 67% (5-step moving average) after 122 steps. <img width="1300" height="650" alt="e811f225-f331-44b6-ae42-962e8c75e48d" src="https://github.com/user-attachments/assets/b25d7556-ffb3-461a-af4f-26b884b2b1b1" /> ## Videos **PhysX Before Fix — zero waist velocity limit, 0/8 success** <img width="896" height="336" alt="physx_before_fix" src="https://github.com/user-attachments/assets/d24850a2-c623-4f26-942c-78c1d57a1fe9" /> **PhysX After Fix — zero waist velocity limit removed, 4/8 success** <img width="896" height="336" alt="physx_after_fix" src="https://github.com/user-attachments/assets/a83e35c8-0cd5-4999-a81d-97c100e50ed2" /> **Make Newton behaviour normal as PhysX by SFT model** <img width="960" height="360" alt="sft_physx_newton_4x2" src="https://github.com/user-attachments/assets/1cfa65d9-3bcf-40e6-b186-6e9e4a7ceb77" /> ## Type of change - Bug fix (non-breaking change which fixes an issue) - Documentation update ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `uv run isaaclab --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have validated the changed behavior with focused coverage - [x] I have added changelog fragments for the touched packages - [x] My name already exists in `CONTRIBUTORS.md` --------- Co-authored-by: Mustafa Haiderbhai <[email protected]>
Isaac Lab now comes from refs/pull/9074/head of isaac-sim/IsaacLab, which reviewers can see and which carries upstream's Git LFS objects. Isaac Lab main requires pre-release hydra-core and omegaconf, so pre-releases are allowed as in Isaac Lab itself. uv.lock is regenerated. Isaac Lab main references a Git LFS object its server does not have (docs/source/_static/actuators/delay-clip.webp, from isaac-sim/IsaacLab#6839); until that is fixed, install with GIT_LFS_SKIP_SMUDGE=1.
Isaac Lab now comes from refs/pull/9074/head of isaac-sim/IsaacLab, which reviewers can see and which carries upstream's Git LFS objects. Isaac Lab main requires pre-release hydra-core and omegaconf, so pre-releases are allowed as in Isaac Lab itself. uv.lock is regenerated. Isaac Lab main references a Git LFS object its server does not have (docs/source/_static/actuators/delay-clip.webp, from isaac-sim/IsaacLab#6839); until that is fixed, install with GIT_LFS_SKIP_SMUDGE=1.
Description
This PR adds a backend-neutral actuator runtime around
ActuatorCollectionandseparates actuator-model state from simulated joint state. It keeps one scoped
collection per articulation while presenting one command, processed-command,
telemetry, group-access, and lifecycle API across PhysX, Newton, and OVPhysX.
The two main goals are:
their named configuration or access.
Ownership and public API
Articulationowns actuator application and backend submission.ArticulationDataowns live solver joint properties, including joint gains,solver limits, armature, and friction.
ActuatorCollectionowns articulation-wide commands, processed commands,effort telemetry, group lookup, and actuator lifecycle.
ActuatorControlimplementations own ordering conversion,joint-property writes, command submission, and native-controller integration.
All collection-wide arrays use articulation joint order. Native paths bypass
joint_command, so that view is not submitted-command telemetry for them.Joint properties and actuator properties
actuator_effort_limitis the explicit model clipping limit.joint_effort_limitandjoint_velocity_limitconfigure the joint or solver.The deprecated
effort_limitalias resolves to the actuator limit for explicitmodels and to the joint limit for implicit models.
effort_limit_simandvelocity_limit_simremain deprecated configuration aliases through 3.x.Explicit groups retain their model gains, rated velocity, delay, motor curves,
and clipping limits. They do not retain copies of solver limits or friction.
Implicit groups instead read stiffness, damping, and effort limits from live
articulation buffers because the backend executes their drive.
The former group-level joint-property accessors (
effort_limit_sim,velocity_limit_sim, armature, and friction variants) are removed. Read thosevalues through
ArticulationDataand update them with articulation jointwriters. The legacy backend gain writers remain deprecated 3.x forwarders;
managed randomization should use
randomize_actuator_gains.Logical groups and execution batching
Named groups remain the configuration and access surface. Internally:
one batch even when their parameters differ;
processed commands and telemetry in one fused Warp launch;
compute, cached Warp gathers, and fused output publication;
redundant gather;
separate.
Native runtime parsing aggregates structurally compatible controllers while
keeping per-DOF values. Unsupported custom explicit configurations raise before
USD actuator state is changed. Two ambiguous construction states are rejected:
Backend behavior
native explicit actuators through the shared host adapter.
shared host adapter while preserving eager tensor binding and partial writes.
manager-owned native controllers inside the solver.
only at backend boundaries.
The host adapter captures staging, native model execution, and telemetry on
CUDA when possible and falls back to eager execution otherwise. It manages the
capture for stateful native actuators. Neural checkpoints use Isaac Lab's shared
file cache before Newton metadata is added, so local and remote paths follow the
same loading path.
Compatibility and documentation
actuators.command.ArticulationDatacommand and torque-telemetry accessors forwardto the collection.
Newton-native actuators.
explicit/implicit behavior, batching, native execution, and backend-specific
constraints.
LEAPP action terms retain the annotated articulation setters until the exporter
supports collection setters.
Final performance validation
Both revisions used fresh, isolated environments and the same dependency lock.
Run order was counterbalanced by row and seed. Throughput values below are mean
± sample standard deviation. Throughput changes are paired geometric FPS ratios
with two-sided 95% t intervals; p-values are Holm-adjusted across all 12 rows.
Checkpoint playback: five paired seeds
Protocol: fixed policy checkpoints, 4,096 environments, 50 warm-up steps, and
1,000 measured steps under inference mode. This uses the full benchmark task
configuration rather than the reduced interactive play configuration. The
canonical result set contains 60 paired comparisons and 120 unique bundles.
developFPSThere is no supported playback regression. Six rows remain significant after
correction. The negative Go2 PhysX-native point estimate is small relative to
its seed variance and its interval spans large gains and losses.
Environment creation time (exploratory)
The playback harness also records the time spent in
gym.make(), includingarticulation construction. This is not total process startup: imports, task
configuration, app launch, runner and checkpoint loading, and the first step
are outside this timer. Persistent driver and Warp caches can also affect these
measurements, so the intervals below are unadjusted and should be treated as
follow-up evidence rather than a release gate. A positive change means the PR
was slower to create the environment.
developsecondsMost rows are unresolved. The consistent signal worth a dedicated startup
benchmark is the roughly 0.23-second increase for Go2 on Newton, on both the Lab
and native actuator paths.
Full training: three paired seeds
Protocol: RSL-RL, 4,096 environments, 50 timing warm-up steps, and each task's
full schedule: Cartpole 150, ANYmal-D and Go2 300, Franka 1,000, and G1 1,500
iterations. The canonical set contains 36 paired comparisons and 72 unique
successful bundles. Native neural runs are excluded because that path is known
not to work on either revision.
developFPSNo row has a negative mean training-throughput change. Cartpole on both
backends and G1 on Newton remain significant after correction.
Each run's late-training reward is averaged over its final 100 iterations. The
table reports the mean ± sample standard deviation across three seeds:
developrewardEpisode length and success were also checked over the final 100 iterations. No
convergence regression is statistically established.
G1 PhysX has a lower mean reward on the PR, but the paired difference is
unresolved (
p = 0.157) and success is unchanged. ANYmal-D on Newton isbimodal across seeds; its apparent improvement is also unresolved (
p = 0.182).Compared commits:
develop:135cf98904cbd73f3b8bdd89188e1a463ebcbb979ee6296124687ec54ed13e102ac59b7667b08d8dValidation
Fused implicit telemetry can differ from the previous Torch expression by one
float32 ULP (
4.768e-7) because of arithmetic ordering. Processed position,velocity, and feed-forward effort commands sent to the backend remain exact.
Type of change
Checklist
./isaaclab.sh -fCONTRIBUTORS.md