Skip to content

Accelerate and strengthen asset tests [13/13] - #8156

Closed
AntoineRichard wants to merge 27 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/asset-tests-p23-newton-articulation-core
Closed

AntoineRichard wants to merge 27 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/asset-tests-p23-newton-articulation-core

Conversation

@AntoineRichard

@AntoineRichard AntoineRichard commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Description

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

What changed

source/isaaclab_newton/test/assets/test_articulation.py is kitless: it starts with launch_test_simulation(SimulationCfg(physics=NewtonCfg())), carries the integration and kitless markers, and uses no Nucleus assets.

  • One composite scene. A module-scoped scene, reset once, holds eleven locally authored islands from Accelerate and strengthen asset tests [10/13] #8151, two environments each: a floating two-link body, a fixed six-DOF chain (cfg gains on the slides, USD gains on the wrist, passive viscous friction), a passive chain, a pendulum, a reordered floating leg, a branching fixture with PhysX ordering, a tendon hand, one root fixed and one root freed by spawner fragments, and implicit and explicit limit islands. Partial writes target environment 1 and prove that environment 0 keeps its backend state. Islands in one environment share a solver world, so a function fixture rests every island before each test, and tests restore every property they change. Reordered islands use public joint and body orders that are not their own inverse, so a map applied in the wrong direction is caught.
  • Composite-scene tests:
    • four core tests: test_articulation_initialization_and_partial_state; test_articulation_joint_and_body_properties_round_trip, with the exact model-change notifications; test_articulation_drive_and_dynamics; test_floating_articulation_root_and_wrench_response, where net force and moment are checked against Δv = 2FΔt/M and Δω;
    • regression tests: PhysX ordering on the branching fixture; ordered-state publishing and same-timestamp refresh; Lab-path target submission in backend order; limit resolution per actuator group; material and collider-offset randomization; the tendon hand (partial targets and solver properties); the gravity-compensation identity with per-view shapes; static equilibrium on a passive chain; pendulum body and COM state; GRAVITY_VEC_W through randomize_physics_scene_gravity; body_q freshness before collide().
  • Own scenes, which run before the composite scene exists because only one simulation context can be alive (selected after a composite-scene test, they fail):
    • test_invalid_articulation_cfg_fails_initialization[joint_pos|joint_vel|articulation_root_prim_path];
    • test_newton_rebind_refreshes_ordered_state_and_preserves_lab_owned_actuator_gains: three implicit islands (floating identity, floating reordered, fixed reordered) and two explicit islands; sentinel state and model arrays are swapped in once, then deregistration of the post-step hook is checked;
    • test_newton_ordered_state_publishes_inside_captured_cuda_graph[cuda]: one reordered-leg island on CUDA with graph capture; the user-order state shadows are clobbered after capture and must be republished by the replayed graph.

Other files

  • assets/unit/test_articulation_accessors.py: develop's task-space allocation test and shape-count test, moved verbatim.
  • assets/test_articulation_ordering_kernels.py: adds pytestmark = pytest.mark.unit.

Disposition (deleted from test_articulation.py)

Test on develop Keeper Proof
test_write_joint_state_data_consistency Initialization node, on the reordered leg Verbatim (limits, unsorted int64 selectors, body refresh, clamping)
test_fragment_fix_root_link_uses_base_manager Initialization node (root API, world joint) and drive node (root holds default) Verbatim
test_initialization_fixed_base_made_floating_base Initialization node, root-freed island Verbatim
test_write_joint_viscous_friction_to_sim Properties node (index and mask writers, per-environment friction rows) Verbatim
test_loading_gains_from_usd Properties node, wrist gains with the per-degree USD unit Zeroing the default stiffness turns it red
test_fixed_base_reports_body_velocities Drive node Zeroing the body-velocity binding turns it red
test_write_root_state_functions_data_consistency Wrench node (set_coms_index and COM/link/root writes) Verbatim
test_external_force_on_multiple_bodies, test_external_force_on_multiple_bodies_at_position Wrench node Dropping torque in pack_body_wrench_to_world turns it red
test_reset Wrench node (cfg gains, reset call, wrench clearing) Verbatim
test_branching_fixture_physx_ordering_reorders_newton_to_bfs Same name (CPU) Verbatim
test_newton_ordered_body_state_cache_invalidates_on_same_timestamp_root_write test_newton_ordered_state_publishes_in_step_and_refreshes_same_timestamp_writes Verbatim; not refreshing a dirty ordered body state turns it red
test_newton_post_step_hook_publishes_ordered_state_and_deregisters The same publish test, plus the deregistration part of the rebind test; the captured-graph path by the CUDA-graph test Verbatim; not registering the hook turns it red; skipping the republish while capturing turns the CUDA-graph test red while the CPU publish test stays green
test_newton_ordered_state_caches_invalidate_on_rebind, test_newton_rebind_preserves_lab_owned_actuator_gains test_newton_rebind_refreshes_ordered_state_and_preserves_lab_owned_actuator_gains Verbatim, one swap
test_write_data_to_sim_writes_joint_targets_in_backend_order Same name: Lab rows here, Newton-actuator rows in #8153 Passing the inverse permutation turns it red
test_setting_joint_limits_from_cfg Same name, one group per row on implicit and explicit islands Explicit effort default taken from the solver clamp turns it red
test_out_of_range_default_joint_state, test_setting_articulation_root_prim_path test_invalid_articulation_cfg_fails_initialization; the valid root path is the floating island Same match strings; removing each check turns it red
test_set_material_properties Same name Verbatim
test_hand_with_tendons_initializes_and_targets_only_given_envs, test_fixed_tendon_properties_reach_solver test_hand_with_tendons_targets_only_given_envs_and_properties_reach_solver (local tendon hand) Ignoring env_ids turns it red; dropping the tendon-property notification turns it red
test_heterogeneous_scene_per_view_shapes, test_get_gravity_compensation_forces_matches_jacobian_gravity test_get_gravity_compensation_forces_matches_jacobian_gravity[fixed/floating/floating_reordered] Ignoring ordering in the gravity gather turns it red
test_get_gravity_compensation_forces_static_equilibrium Same name, passive chain Flipping the gravity-force sign turns it red
test_body_root_state Same name, revolute pendulum, COM set with set_coms_index Ignoring the COM offset turns it red
test_gravity_vec_w_tracks_model_gravity Same name, gravity written through randomize_physics_scene_gravity Making the event write a copy of model.gravity turns it red
test_body_q_consistent_after_root_write Same name Verbatim
test_franka_osc_tracking_accuracy, test_franka_osc_gravity_compensation_precision #8151 See #8151
8 builder target-mode and prepare_native_actuators tests; test_newton_native_actuator_gain_write_maps_public_joint_subset_to_backend #8153 See #8153
test_num_shapes_per_body_follows_public_body_order, test_task_space_allocation_and_capture assets/unit/test_articulation_accessors.py Moved verbatim

Device scope and CI routing

  • The composite scene and the first two own-scene tests run on the devices test_devices(DeviceScope.CPU) selects, without CUDA-graph capture. On develop about twenty of these tests ran on CUDA with Newton's default graph capture.
  • test_newton_ordered_state_publishes_inside_captured_cuda_graph runs on test_devices(DeviceScope.CUDA) with use_cuda_graph=True, so the ordered-state republish recorded into a captured graph stays covered.
  • The keepers of the tests develop marked keep @pytest.mark.isaacsim_ci: test_gravity_vec_w_tracks_model_gravity and the two gravity-compensation tests here, and the Franka keepers in Accelerate and strengthen asset tests [10/13] #8151. The file stays selected by Isaac Sim's short CI (ISAACSIM_CI_SHORT).

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_articulation.py 85 pass, 44.8 s 24 pass, 8.3 s (includes the CUDA-graph test)
assets/unit/test_articulation_accessors.py — 9 pass, 3.3 s
assets/test_articulation_ordering_kernels.py 5 pass, 2.7 s 5 pass, 3.1 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

[Low risk] Adds and reorganizes test files and fixtures.

The PR appears safe to merge, with a non-blocking gap in CUDA coverage for replaced articulation tests.

Findings

  1. P2 CUDA writer coverage removed ▶

Summary

The PR moves Newton asset and controller tests onto locally authored fixtures and shared scenes, and separates direct-model unit tests from integration tests.

  • Adds a CPU composite articulation scene with state, property, dynamics, ordering, material, and gravity checks.
  • Consolidates Lab-versus-Newton actuator rollouts and adds a local-chain operational-space controller test.
  • The replacement articulation coverage no longer exercises several writer paths on CUDA.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  USD[Local USD fixtures] --> Scene[Shared Newton scene]
  Scene --> Art[Articulation regression tests]
  USD --> Runs[Lab and Newton actuator scenes]
  Runs --> Eq[Trajectory and telemetry comparisons]
  USD --> Chain[Passive chain scene]
  Chain --> OSC[OSC tracking and gravity tests]
Loading

Reviews (1) · Last reviewed commit: "Test Newton articulations on a composite..."

@pytest.fixture(scope="module")
def composite_scene() -> _Scene:
"""Initialize every articulation island once for this module."""
sim_cfg = newton_sim_cfg(_DEVICE, use_newton_actuators=False, newton_contacts=True)

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 CUDA writer coverage removed The composite scene runs only on CPU, but the joint-state and friction-writer tests it replaces ran on the available test devices. A CUDA-specific regression in partial writes, ordering, or property updates could now go undetected. Please retain focused CUDA coverage or parameterize the composite scene by device.

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!

@AntoineRichard
AntoineRichard marked this pull request as draft September 29, 2026 12:55
…/asset-tests-p19-newton-task-space-controllers
… into antoiner/asset-tests-p23-newton-articulation-core
…from the test mask, and keep Isaac Sim CI routing
… antoiner/asset-tests-p24-newton-articulation-regressions

# Conflicts:
#	source/isaaclab_newton/test/assets/test_articulation.py
…e the gravity check through the public event
@AntoineRichard AntoineRichard changed the title Accelerate and strengthen asset tests [23/24] Accelerate and strengthen asset tests [13/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