Skip to content

Accelerate and strengthen asset tests [10/13] - #8151

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

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

Conversation

@AntoineRichard

@AntoineRichard AntoineRichard commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Part 10/13 of the asset-test series (tracker: #7282). Scope: Newton fixtures and task-space controllers. No dependencies.

What changed

source/isaaclab_newton/test/articulation_test_utils.py gives the Newton asset and controller tests small local scenes that need neither Kit nor Nucleus. #8153, #8154 and #8156 build on it.

  • Seven authored USD fixtures, written as text to a per-process temporary directory: a floating two-link body, a fixed six-DOF chain (three slides and a three-axis wrist, links with centre-of-mass offsets, USD drives), a revolute pendulum, a two-finger hand with two MuJoCo fixed tendons and tendon actuators, a floating two-leg robot with ANYmal joint names, a cartpole, and a rigid body carrying an articulation root with a second body fixed to it. They are authored in Python because .gitignore bans *.usda files. local_usd(name, **kwargs) returns a UsdFileCfg, so spawner features such as fix_root_link and joint_drive_props still apply.
  • Scene plumbing: newton_sim_cfg (MJWarp, no gravity and no CUDA graph by default), spawn_assets (clone plan, asset construction and replicate into /World/Env_*; collections are planned as their member objects), env_origins, and world_gravity (applies per-world model gravity for a block and restores it).
  • Test modules import it with the sys.path.insert(parents[1]) idiom that develop's Newton sensor tests use, which works under the per-file CI runner.

source/isaaclab_newton/test/controllers/test_newton_task_space_controllers.py is the new home for the two Franka operational-space sentinels in assets/test_articulation.py, which #8156 deletes. The tests close the Isaac Lab OperationalSpaceController loop through the articulation's body_link_jacobian_w, mass_matrix and gravity_compensation_forces, on the local six-DOF fixed chain with unpowered joints. The file is kitless and builds one module-scoped scene.

  • test_osc_tracking_accuracy: a 5 cm pose step with gravity off; the tail-mean error must stay under 5 mm and 0.05 rad (develop's bounds).
  • test_osc_gravity_compensation_precision: a two-phase hold with gravity on. The uncompensated sag must exceed 1.2 cm, the compensated hold must stay under 0.1 mm, the improvement must be at least 10x, and each phase must pass a stationarity guard (develop's bounds). The chain settles within about 100 steps, so each phase runs 300 steps instead of develop's 400/600/800.
  • develop's test_newton_controllers.py and test_newton_ik_solver.py exercise the model-free controller wrappers; this file does not duplicate them. The DiffIK tracking sentinel is not revived; [Tests] Prune Newton tests with the test-audit skill #8008 deleted it on develop.

Disposition

Nothing is deleted in this PR. It adds the keepers for these assets/test_articulation.py tests, which #8156 deletes:

Test on develop Keeper Proof
test_franka_osc_tracking_accuracy test_osc_tracking_accuracy Same assertions on the local chain; a zeroed mass-matrix gather turns it red
test_franka_osc_gravity_compensation_precision test_osc_gravity_compensation_precision Same assertions; flipping the sign of gravity_compensation_forces turns it red

Device scope and CI routing

  • The chain runs on the devices test_devices(DeviceScope.CPU) selects, without CUDA-graph capture. On develop the Franka sentinels ran on CUDA with Newton's default graph capture. The captured-graph republish of articulation state is covered in Accelerate and strengthen asset tests [13/13] #8156.
  • Both tests keep @pytest.mark.isaacsim_ci, as the develop tests they replace did, so the file is 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
controllers/test_newton_task_space_controllers.py — (the Franka tests ran inside assets/test_articulation.py) 2 pass, 11.4 s
articulation_test_utils.py — helper module, no tests

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 test utilities and changelog entry for asset tests.

The PR appears safe to merge, with a non-blocking gap in fixture validation.

Findings

  1. P2 Fixtures Lack Load Checks ▶

Summary

Adds Kit- and Nucleus-independent Newton test infrastructure: seven locally authored USD fixtures and helpers for simulation configuration, asset replication, environment origins, and temporary per-world gravity. The fixtures are not yet exercised by tests.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Fixture name] --> B[local_usd]
  B --> C[Temporary authored USD or test data]
  C --> D[Asset configuration]
  D --> E[spawn_assets]
  E --> F[Clone plan]
  F --> G[Construct assets]
  G --> H[Replicate into environments]
Loading

Reviews (1) · Last reviewed commit: "Add local fixtures for kitless Newton as..."

Comment on lines +399 to +407
_FIXTURES: dict[str, Callable[[], str]] = {
"fixed_cartpole.usda": _fixed_cartpole,
"fixed_spatial_chain.usda": _fixed_spatial_chain,
"fixed_tendon_hand.usda": _fixed_tendon_hand,
"floating_two_leg.usda": _floating_two_leg,
"floating_two_link.usda": _floating_two_link,
"revolute_pendulum.usda": _revolute_pendulum,
"rigid_body_with_articulation_root.usda": _rigid_body_with_articulation_root,
}

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 Fixtures lack load checks. This registers seven text-authored USD fixtures, but no test calls local_usd to check that they parse and load through Newton. An authoring mistake could therefore go unnoticed until a later test uses the fixture. A parameterized smoke test for all seven would catch that earlier.

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:54
@AntoineRichard AntoineRichard changed the title Accelerate and strengthen asset tests [18/24] Accelerate and strengthen asset tests [10/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

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants