Skip to content

Accelerate and strengthen asset tests [11/13] - #8153

Closed
AntoineRichard wants to merge 8 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/asset-tests-p20-newton-actuators
Closed

AntoineRichard wants to merge 8 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/asset-tests-p20-newton-actuators

Conversation

@AntoineRichard

@AntoineRichard AntoineRichard commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Part 11/13 of the asset-test series (tracker: #7282). Scope: Newton actuators. Depends on #8151; this branch contains their commits until they merge.

What changed

source/isaaclab_newton/test/assets/test_newton_actuators_newton.py runs kitless on local articulations from #8151. Each actuator configuration gets its own two-environment island in one composite scene per execution path: one Isaac Lab actuator scene and one Newton-native actuator scene. On develop, every configuration built two ANYmal scenes. A decimation-2 scene pair with CUDA-graph capture covers RemotizedPD. The islands are:

  • IdealPD on a floating two-leg robot, and on a fixed cartpole that shares the model-wide adapter;
  • a DC motor that saturates at 2 N·m;
  • implicit hips next to explicit Newton actuators;
  • implicit actuators with a feedforward effort;
  • DelayedPD and RemotizedPD with ramped targets;
  • MLP/LSTM neural actuators;
  • a mixed island with permutation-sensitive commands, identity and reordered.

The shared EquivalenceAssertionsMixin oracles run unchanged on every island. The Newton scene stays alive for the tests that drive native actuators directly: gain writes, domain randomization through events, target submission in backend order, and per-environment state reset.

source/isaaclab_newton/test/assets/unit/test_newton_actuator_adaptation.py holds develop's builder target-mode tests and native-group selection test, copied verbatim from assets/test_articulation.py (#8156 deletes the originals), and the torque-telemetry kernel test, moved verbatim from the actuator file. None of them steps a simulation.

Disposition

Test on develop Keeper Proof
TestDCMotorEquivalence (4 oracles, test_dc_motor_clamp_binds) test_newton_actuators_match_lab_actuators[dc_motor], test_dc_motor_clamp_binds Oracles verbatim; not authoring NewtonDCMotorClampingAPI turns both red
TestMixedWithImplicitEquivalence ...match_lab_actuators[mixed] Oracles verbatim
TestImplicitWithFeedforwardEquivalence ...[implicit_feedforward] (torque_atol=0.5) Oracles verbatim
TestDelayedPDEquivalence, test_newton_actuators_are_delayed_pd ...[delayed], test_newton_actuators_are_delayed_pd Not authoring the delay turns the equivalence and the authoring test red
TestRemotizedPDEquivalence, test_newton_knee_actuators_are_delayed_position_clamped_pd ...[remotized], knee test Removing the delay turns the equivalence red; removing position clamping turns the knee test red
TestDecimationRemotizedPD test_decimated_remotized_pd_matches_lab_actuators Removing the delay turns it red
TestHeterogeneousMultiArticulationNewton (test_anymal_matches_lab, test_cartpole_matches_lab) ...[ideal] and ...[cartpole] in one shared native scene Positions, velocities and efforts compared (was positions only)
TestRandomizeActuatorGainsViaEventsNewton (test_two_articulations) test_randomize_actuator_gains_reaches_newton_controllers Verbatim on leg plus cartpole
TestActuatorStateReset (Newton and Lab) test_newton_state_reset_isolated_to_reset_env, test_lab_state_reset_isolated_to_reset_env Assertions verbatim, on the reset articulation's own delayed actuators; resetting every environment turns the Newton test red
TestNeuralActuatorAuthoring (3 tests) Same three test names on the neural island Verbatim
test_newton_actuator_rollout_matches_reversed_joint_ordering test_newton_actuator_rollout_matches_reordered_joints Shared trace helper; the order is not its own inverse
test_sync_torque_telemetry_keeps_user_order_effort_buffers_unmapped Moved verbatim to the unit file —
assets/test_articulation.py, deleted in #8156: 8 builder target-mode and prepare_native_actuators tests (test_prepare_native_actuators_activates_only_explicit_groups, test_actuator_cfg_sets_newton_target_mode_before_solver_init, test_actuator_cfg_matches_explicit_descendant_articulation_root, test_actuator_cfg_matches_clone_plan_root_expr, test_actuator_cfg_leaves_excluded_joint_types_imported, test_actuator_cfg_uses_imported_gain_for_none_stiffness, test_actuator_cfg_leaves_unconfigured_newton_target_modes_imported, test_actuator_cfg_aligns_partial_dictionary_gains_by_joint_name) Verbatim copies in the unit file —
assets/test_articulation.py, deleted in #8156: test_newton_native_actuator_gain_write_maps_public_joint_subset_to_backend Same name, on the reordered IdealPD island Unpermuted columns in write_group_parameter turns it red
assets/test_articulation.py, deleted in #8156: test_write_data_to_sim_writes_joint_targets_in_backend_order (Newton-actuator rows) Same name, [identity/reordered] Passing the inverse permutation turns it red

Device scope and CI routing

  • The actuator scenes run on test_devices(DeviceScope.CUDA); develop hard-coded cuda:0. The file therefore also enters the multi-GPU lane, which runs one non-default GPU per shard. That path is not verified here: the validation host has one GPU.
  • Neither develop's file nor this one carries @pytest.mark.isaacsim_ci; Isaac Sim CI routing is unchanged.

Product observations (not fixed here)

  • The Newton actuator adapter is model-wide. Resetting environment 0 of one articulation also clears environment 0's delay state of every other articulation's native actuators; in the shared scene, the remotized island's knee delays reset with the delayed island. The state-reset test checks only the reset articulation's own actuators and asserts neither behaviour for the others.

Timing

Warm Warp cache, repository orchestrator, one process per file, RTX 5090. The second of two runs is reported.

File develop This PR
assets/test_newton_actuators_newton.py 38 pass, 15.5 s 21 pass, 8.3 s
assets/unit/test_newton_actuator_adaptation.py — 17 pass, 3.9 s

Type of change

  • Test-suite redesign (no production change)

Release backport

  • Backport this pull request to the active release branch after it merges into develop

Checklist

Docker and GPU tests run on demand. Push the commits you want tested, then
comment run-ci on the pull request.

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with uv run isaaclab --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have validated the changed behavior with focused coverage and applied the test-audit criteria to any test changes
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package (do not edit CHANGELOG.rst or bump package versions — CI handles that)
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@greptile-apps

greptile-apps Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium risk] Adds test utilities and expands asset test coverage.

The PR appears safe to merge, with two non-blocking test-coverage corrections worth making.

Findings

  1. P2 Reordered rollout lacks equivalence check ▶
  2. P2 Reset check includes other islands ▶

Summary

Replaces separate ANYmal actuator simulations with kitless, locally authored articulation islands and a shared Lab-versus-Newton rollout. It also moves builder and telemetry checks into a unit-test file.

  • The reordered IdealPD rollout is collected on both paths but is omitted from equivalence assertions.
  • The composite-scene reset test does not distinguish the articulation being reset from other delayed articulations.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  F[Local USD fixtures] --> L[Lab scene: shared islands]
  F --> N[Newton scene: shared and Newton-only islands]
  L --> E[Trajectory and effort equivalence]
  N --> E
  N --> D[Live gain, target, and reset tests]
Loading

Reviews (1) · Last reviewed commit: "Run Newton actuator equivalence on local..."

"""Implicit-only actuators with a non-zero feedforward effort target.
@pytest.mark.parametrize(
"island",
["ideal", "cartpole", "dc_motor", "mixed", "implicit_feedforward", "delayed", "remotized"],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Reordered rollout lacks equivalence check

Both fixtures roll out ideal_reordered, but this list never compares its Lab and Newton trajectories or effort. The other tests for that island check target and gain writes, so an actuator that writes correctly but applies the wrong effort during stepping could go undetected.

Suggested change
["ideal", "cartpole", "dc_motor", "mixed", "implicit_feedforward", "delayed", "remotized"],
["ideal", "ideal_reordered", "cartpole", "dc_motor", "mixed", "implicit_feedforward", "delayed", "remotized"],

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!

Comment on lines +719 to +723
stateful_pairs = [
(act, st)
for act, st in zip(adapter.actuators, adapter._states_a)
if st is not None and getattr(st, "delay_state", None) is not None
]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Reset check includes other islands

This selects delayed states from the model-wide adapter, including the separate RemotizedPD island. It then resets only the delayed articulation but expects every selected environment-0 state to clear. That makes clearing an unrelated articulation's state count as success. Check that the delayed island resets while the RemotizedPD island remains unchanged.

@AntoineRichard
AntoineRichard marked this pull request as draft September 29, 2026 12:55
@AntoineRichard AntoineRichard changed the title Accelerate and strengthen asset tests [20/24] Accelerate and strengthen asset tests [11/13] Sep 29, 2026
@StafaH

StafaH commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator

Closing because the combined PR #7282 has merged. This split PR is superseded by #7282 and is no longer needed.

@StafaH StafaH closed this Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants