Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
a823a25
Share success-guided reset-state sampling across tasks
maxkra15 Oct 29, 2026
45002e1
chore: Merge main into PR #8872
maxkra15 Oct 29, 2026
f7d1c09
chore: Merge main into PR #8872
maxkra15 Oct 30, 2026
fcfee1f
chore: Merge main into PR #8872
maxkra15 Nov 2, 2026
97f93b2
chore: Merge main into PR #8872
maxkra15 Nov 3, 2026
e28a794
chore: Merge main into PR #8872
maxkra15 Nov 4, 2026
51fc7f6
chore: Merge main into PR #8872
maxkra15 Nov 5, 2026
ea99b61
chore: Merge main into PR #8872
maxkra15 Nov 6, 2026
f0b3a15
Merge shared reset sampler foundation
maxkra15 Nov 6, 2026
f394085
Add validated reset buffers and sparse pickup
maxkra15 Nov 6, 2026
327d911
Merge existing reset sampler PR history
maxkra15 Nov 6, 2026
d6a30b1
Address reset buffer and pickup review findings
maxkra15 Nov 7, 2026
64f67b6
Fix cube pickup configuration and smoke collection
maxkra15 Nov 9, 2026
92d6968
chore: Merge main into PR #8872
maxkra15 Nov 9, 2026
97715ea
Fix reset catalog persistence and replay validation
maxkra15 Nov 9, 2026
0ec4a73
Fix seeded pickup resets and catalog ownership
maxkra15 Nov 9, 2026
e9f4eb8
Respect the robot frame in scripted pickup goals
maxkra15 Nov 10, 2026
f05f816
Fix reset diagnostics and simplify pickup sampling
maxkra15 Nov 10, 2026
e6d93ec
chore: Merge main into PR #8872
maxkra15 Nov 10, 2026
0dd6ec5
chore: Merge main into PR #8872
maxkra15 Nov 11, 2026
a17f7e0
Simplify reset sampling configuration and verify pickup goals
maxkra15 Nov 11, 2026
e4b4b1b
chore: Merge main into PR #8872
maxkra15 Nov 12, 2026
8d7bb85
chore: Merge main into PR #8872
maxkra15 Nov 13, 2026
cf0f8a5
chore: Merge main into PR #8872
maxkra15 Nov 16, 2026
04c220c
Add illustrated sparse pickup walkthrough
maxkra15 Nov 16, 2026
90779d9
Separate reset storage from collection and scoring
maxkra15 Nov 16, 2026
e6b5b9c
Make reset replay native and reuse existing task events
maxkra15 Nov 16, 2026
d42f0a2
chore: Merge main into PR #8872
maxkra15 Nov 17, 2026
93c9f61
Clarify reset flow and scoring names
maxkra15 Nov 17, 2026
d90c820
Add the Isaac Lab conveyor controller API
maxkra15 Nov 17, 2026
eb2c921
Expose scene-owned surface grippers in Isaac Lab
maxkra15 Nov 17, 2026
a78f38b
Combine the conveyor and surface gripper APIs
maxkra15 Nov 17, 2026
74ca7ca
Merge commit '93c9f6160' into maximiliank/conveyor-task-dependencies
maxkra15 Nov 17, 2026
401bdf8
Add the Franka conveyor transfer and sorting tasks
maxkra15 Nov 17, 2026
2b7a356
Keep seeded reset independent of the reset sampler
maxkra15 Nov 17, 2026
58a80f4
Keep reset sampler seeding in the task dependencies
maxkra15 Nov 17, 2026
982c148
Merge branch 'maximiliank/conveyor-task-dependencies' into maximilian…
maxkra15 Nov 17, 2026
e633643
Trim conveyor telemetry and document static belt shapes
maxkra15 Nov 17, 2026
246be40
Validate full-size Newton gripper commands
maxkra15 Nov 17, 2026
f18c092
Clarify reset selection and fix outcome attribution
maxkra15 Nov 17, 2026
4f1207a
Merge branch 'maximiliank/conveyor-controller-api' into maximiliank/c…
maxkra15 Nov 17, 2026
192ff5a
Merge branch 'maximiliank/surface-gripper-api' into maximiliank/conve…
maxkra15 Nov 17, 2026
6b63f93
Merge branch 'maximiliank/conveyor-task-dependencies' into maximilian…
maxkra15 Nov 17, 2026
72de3be
Write collider offsets and colors to heterogeneous Newton worlds
maxkra15 Nov 17, 2026
58b2cd0
Merge commit 'refs/conveyor-review/reset-8872' into maximiliank/conve…
maxkra15 Nov 17, 2026
5d50e98
Merge branch 'maximiliank/conveyor-task-dependencies' into maximilian…
maxkra15 Nov 17, 2026
fc420d7
Use the current native reset sampler weights
maxkra15 Nov 17, 2026
7fc3407
Use the conveyor controller simulation clone plan
maxkra15 Nov 17, 2026
31b5db2
Simplify conveyor reset catalogs and batched task updates
maxkra15 Nov 17, 2026
d8b44b4
Merge branch 'maximiliank/conveyor-fixture-review' into maximiliank/c…
maxkra15 Nov 17, 2026
5d024b3
Fix conveyor lifecycle ownership and configuration validation
maxkra15 Nov 17, 2026
6b22838
Merge branch 'maximiliank/conveyor-controller-api' into maximiliank/c…
maxkra15 Nov 17, 2026
4aa6785
Fix surface-gripper measurement and extension compatibility
maxkra15 Nov 17, 2026
aa041ea
Merge branch 'maximiliank/surface-gripper-api' into maximiliank/conve…
maxkra15 Nov 17, 2026
45bb2bd
Merge branch 'maximiliank/conveyor-task-dependencies' into maximilian…
maxkra15 Nov 17, 2026
7210d7e
Allow scene-defined conveyor surfaces before controller construction
maxkra15 Nov 17, 2026
81e0c42
Merge branch 'maximiliank/conveyor-controller-api' into maximiliank/c…
maxkra15 Nov 17, 2026
9f12652
Merge branch 'maximiliank/conveyor-task-dependencies' into maximilian…
maxkra15 Nov 17, 2026
754aabd
Resolve conveyor surfaces from the finalized clone plan
maxkra15 Nov 17, 2026
ce7f841
Merge branch 'maximiliank/conveyor-controller-api' into maximiliank/c…
maxkra15 Nov 17, 2026
5731f09
Merge branch 'maximiliank/conveyor-task-dependencies' into maximilian…
maxkra15 Nov 17, 2026
bbba1dd
Defer surface gripper annotation evaluation
maxkra15 Nov 17, 2026
ff2ac7c
Merge branch 'maximiliank/surface-gripper-api' into maximiliank/conve…
maxkra15 Nov 17, 2026
b19ec20
Merge branch 'maximiliank/conveyor-task-dependencies' into maximilian…
maxkra15 Nov 17, 2026
f6368f8
Merge dependency update into controller-api
maxkra15 Nov 17, 2026
999d2fb
Merge dependency update into task-dependencies
maxkra15 Nov 17, 2026
ecffb7c
Merge dependency update into task-dependencies
maxkra15 Nov 17, 2026
9fef4d5
Merge dependency update into surface-gripper-api
maxkra15 Nov 17, 2026
67b035e
Merge dependency update into task-examples
maxkra15 Nov 17, 2026
132e8ed
Merge dependency update into controller-api
maxkra15 Nov 17, 2026
8272c26
Merge dependency update into task-dependencies
maxkra15 Nov 17, 2026
4c9210c
Merge dependency update into surface-gripper-api
maxkra15 Nov 17, 2026
39586bc
Merge dependency update into task-dependencies
maxkra15 Nov 17, 2026
2e3b960
Merge dependency update into task-examples
maxkra15 Nov 17, 2026
3c6aad3
chore: Merge main into PR #8872
maxkra15 Nov 18, 2026
91b9c3a
chore: Merge main into PR #9069
maxkra15 Nov 18, 2026
b10b5e6
chore: Merge main into PR #9070
maxkra15 Nov 18, 2026
bb3f5ca
chore: Merge main into PR #9071
maxkra15 Nov 18, 2026
446bbcc
Address reset sampler review feedback
maxkra15 Nov 18, 2026
240886b
chore: Merge main into PR #9070
maxkra15 Nov 19, 2026
a83f2ef
chore: Merge main into PR #9069
maxkra15 Nov 19, 2026
b34bf37
chore: Merge main into PR #8872
maxkra15 Nov 19, 2026
116182f
chore: Merge main into PR #9071
maxkra15 Nov 19, 2026
7fb6908
Address reset sampler ownership and naming review
maxkra15 Nov 19, 2026
ae85da7
Illustrate success-guided reset sampling
maxkra15 Nov 19, 2026
e02422f
Merge the latest native reset framework into conveyor dependencies
maxkra15 Nov 19, 2026
d0b843e
Integrate the updated native reset sampler API
maxkra15 Nov 19, 2026
8bf72db
Merge latest main into conveyor controller API
maxkra15 Nov 19, 2026
1795a19
Merge main while retaining conveyor and mesh variant bindings
maxkra15 Nov 19, 2026
08f40c2
Merge branch 'conveyor-mdp2-controller' into conveyor-mdp2-dependencies
maxkra15 Nov 19, 2026
4828ca6
Merge latest main into surface gripper API
maxkra15 Nov 19, 2026
93680bd
Merge branch 'conveyor-mdp2-gripper' into conveyor-mdp2-dependencies
maxkra15 Nov 19, 2026
bdff2cf
Merge branch 'conveyor-mdp2-dependencies' into conveyor-mdp2-examples
maxkra15 Nov 19, 2026
37cd324
Reset and close surface grippers in MDP2 scenes
maxkra15 Nov 19, 2026
ff2970c
Merge branch 'conveyor-mdp2-gripper' into conveyor-mdp2-dependencies
maxkra15 Nov 19, 2026
120e7fe
Merge branch 'conveyor-mdp2-dependencies' into conveyor-mdp2-examples
maxkra15 Nov 19, 2026
5d4164a
Merge main into PR #9069
maxkra15 Nov 20, 2026
db18a6d
Merge main into PR #9070
maxkra15 Nov 20, 2026
16fbd3f
Merge main into PR #9071
maxkra15 Nov 20, 2026
5f18b93
Merge latest main into surface gripper API
maxkra15 Nov 20, 2026
376ceaa
Merge surface gripper and main into conveyor task dependencies
maxkra15 Nov 20, 2026
970089a
Merge latest main into conveyor controller API
maxkra15 Nov 20, 2026
908c4e8
Refresh the conveyor task dependency branch
maxkra15 Nov 20, 2026
e391d37
Merge main and refresh the conveyor example dependencies
maxkra15 Nov 20, 2026
ff1884b
Point conveyor training guides to the core reset API
maxkra15 Nov 20, 2026
424ef0c
Reuse suction deck and placement geometry
maxkra15 Nov 20, 2026
c06cf42
Author fixed conveyor scenery in USD
maxkra15 Nov 20, 2026
9afd83a
Simplify Newton surface gripper configuration and kernels
maxkra15 Nov 20, 2026
6a9977a
Refresh the surface gripper dependency
maxkra15 Nov 20, 2026
6b97ba3
Integrate the leaner surface gripper in the conveyor tasks
maxkra15 Nov 20, 2026
2f08a2d
Match the authored warehouse transforms and parcel tints
maxkra15 Nov 20, 2026
a0267a3
Fix conveyor startup and warehouse teardown
maxkra15 Nov 20, 2026
2547dd2
Preserve Newton graphs when solver outputs stay unchanged
maxkra15 Nov 20, 2026
27cb9e4
Discard MDP2 captures before closing surface grippers
maxkra15 Nov 20, 2026
c2ce311
Refresh the conveyor callback dependency
maxkra15 Nov 20, 2026
803a932
Refresh the surface gripper lifecycle dependency
maxkra15 Nov 20, 2026
38b91ac
Integrate the audited conveyor and gripper lifecycle
maxkra15 Nov 20, 2026
c4ec16a
Use native collision defaults for the conveyor tasks
maxkra15 Nov 20, 2026
6cc7283
Pin the conveyor force runtime and remove the collision option
maxkra15 Nov 20, 2026
96e3d5e
Use the controller with the pinned Newton runtime
maxkra15 Nov 20, 2026
ec34b87
Integrate the pinned conveyor force runtime
maxkra15 Nov 20, 2026
6ebe5d7
Merge main into the conveyor controller PR
maxkra15 Nov 20, 2026
676b18d
Merge main into the surface gripper PR
maxkra15 Nov 20, 2026
3560ab1
Refresh the controller dependency on main
maxkra15 Nov 20, 2026
22654f9
Refresh the gripper dependency on main
maxkra15 Nov 20, 2026
7f85db2
Merge main while preserving terminal observations and conveyor logs
maxkra15 Nov 20, 2026
51b9436
Use the locked Newton example pending a public conveyor API
maxkra15 Nov 20, 2026
3f67a8b
Document the temporary Newton conveyor example import
maxkra15 Nov 20, 2026
d56cd7c
Restore the locked Newton example dependency
maxkra15 Nov 20, 2026
f695ec8
Sync the examples with the temporary Newton import
maxkra15 Nov 20, 2026
e41f336
Merge main to resolve surface gripper conflicts
kellyguo11 Nov 22, 2026
c60c26d
Merge main into PR #9071
maxkra15 Nov 23, 2026
58aef5d
Consolidate the surface gripper guide
maxkra15 Nov 23, 2026
02127f7
Add a procedural conveyor suction tutorial
maxkra15 Nov 23, 2026
974db4f
Run the conveyor tutorial in smoke tests
maxkra15 Nov 23, 2026
836762c
Fix selected surface gripper reset and teardown
maxkra15 Nov 23, 2026
2120f2b
Integrate surface gripper review fixes
maxkra15 Nov 23, 2026
bc988c0
Merge main to resolve conveyor tutorial conflicts
kellyguo11 Nov 23, 2026
fa7eb16
Add changelog skip for conveyor tutorial coverage
kellyguo11 Nov 23, 2026
14555f6
Use authenticated lookup for wheel artifact download
kellyguo11 Nov 23, 2026
509b32c
Retry wheel artifact retrieval after upload
kellyguo11 Nov 23, 2026
8ebe7f2
Remove wheel workflow changes from tutorial PR
kellyguo11 Nov 23, 2026
940c2f2
Merge branch 'main' into maximiliank/conveyor-franka-examples
kellyguo11 Nov 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions docs/source/how-to/conveyors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,40 @@
Controlling conveyors
=====================

.. _tutorial-conveyor-suction:

Using a conveyor with suction
-----------------------------

This standalone Newton MJWarp example has one static belt, one parcel, and one kinematic
suction tool. It builds the scene from primitives. The belt moves the parcel, the tool seals
against its top face and lifts it, and opening the gripper releases it onto the belt.

.. code-block:: bash

uv run python scripts/tutorials/01_assets/run_conveyor_suction.py --device cuda:0 --viz newton

Use ``--viz none`` to run the same sequence without a window.

Create the scene and conveyor before resetting the simulation. Name the belt's collision
surface and the parcel body in the controller configuration. The belt and parcel use low
contact friction because the conveyor controller supplies their tangential traction.
After stopping the belt, command the kinematic tool above the parcel with its pads facing
down. Stage the gripper command, write the scene before stepping, and refresh it afterward.
Close the conveyor and scene before tearing down the simulation.

.. dropdown:: Code for run_conveyor_suction.py
:icon: code

.. literalinclude:: ../../../scripts/tutorials/01_assets/run_conveyor_suction.py
:language: python
:linenos:

See :ref:`tutorial-interact-surface-gripper` for backend-specific gripper configuration.

Configuring a controller
------------------------

Create a controller after authoring the collision geometry and before the first simulation
reset. This example assumes ``sim`` is a simulation context and each environment already
contains a ``Belt`` collision surface and five parcels named ``Parcel0`` through ``Parcel4``:
Expand Down
2 changes: 2 additions & 0 deletions docs/source/how-to/run_surface_gripper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ after stepping. The scene also handles selected-environment resets. Manager-base
use :class:`~isaaclab.envs.mdp.actions.SurfaceGripperBinaryActionCfg`, where negative policy
actions close the gripper and nonnegative actions open it.

For a runnable Newton MJWarp example, see :ref:`tutorial-conveyor-suction`.

Managed environments close the scene grippers automatically. In a standalone scene, call
``scene.close()`` before destroying the simulation. If the scene is inside an enclosing CUDA graph,
discard the graph before closing it. Custom ``SurfaceGripperCfg.class_type`` constructors continue
Expand Down
155 changes: 155 additions & 0 deletions scripts/tutorials/01_assets/run_conveyor_suction.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause

"""Move a parcel along a belt, lift it with suction, and release it in Newton."""

import argparse
from contextlib import closing

import torch
from isaaclab_newton.physics import MJWarpSolverCfg, NewtonCfg

import isaaclab.sim as sim_utils
from isaaclab.app import add_launcher_args, launch_simulation
from isaaclab.assets import AssetBaseCfg, RigidObjectCfg, SurfaceGripperCfg
from isaaclab.controllers import Conveyor, ConveyorCfg, ConveyorSurfaceCfg
from isaaclab.scene import InteractiveScene, InteractiveSceneCfg
from isaaclab.utils import configclass

PARCEL_SIZE = 0.05
TOOL_OFFSET = 0.10
# The controller supplies belt traction independently of the contact material.
BELT_CONTACT = sim_utils.RigidBodyMaterialBaseCfg(static_friction=1.1e-5, dynamic_friction=1.1e-5)


@configclass
class ConveyorSceneCfg(InteractiveSceneCfg):
"""A static belt, one parcel, and a kinematic suction tool."""

ground = AssetBaseCfg(
prim_path="/World/Ground",
spawn=sim_utils.CuboidCfg(size=(2.0, 1.5, 0.04), collision_props=sim_utils.UsdPhysicsCollisionCfg()),
init_state=AssetBaseCfg.InitialStateCfg(pos=(0.0, 0.0, -0.12)),
)
light = AssetBaseCfg(prim_path="/World/Light", spawn=sim_utils.DomeLightCfg(intensity=2000.0))
belt = AssetBaseCfg(
prim_path="{ENV_REGEX_NS}/Belt",
spawn=sim_utils.CuboidCfg(
size=(1.0, 0.28, 0.10),
collision_props=sim_utils.UsdPhysicsCollisionCfg(),
physics_material=BELT_CONTACT,
visual_material=sim_utils.PreviewSurfaceCfg(diffuse_color=(0.25, 0.28, 0.30)),
),
init_state=AssetBaseCfg.InitialStateCfg(pos=(0.0, 0.0, -0.05)),
)
parcel = RigidObjectCfg(
prim_path="{ENV_REGEX_NS}/Parcel",
spawn=sim_utils.CuboidCfg(
size=(PARCEL_SIZE, PARCEL_SIZE, PARCEL_SIZE),
rigid_props=sim_utils.UsdPhysicsRigidBodyCfg(),
mass_props=sim_utils.MassCfg(mass=0.05),
physics_material=BELT_CONTACT,
collision_props=sim_utils.UsdPhysicsCollisionCfg(),
visual_material=sim_utils.PreviewSurfaceCfg(diffuse_color=(0.66, 0.33, 0.12)),
),
init_state=RigidObjectCfg.InitialStateCfg(pos=(-0.25, 0.0, PARCEL_SIZE / 2)),
)
tool = RigidObjectCfg(
prim_path="{ENV_REGEX_NS}/Tool",
spawn=sim_utils.CuboidCfg(
size=(0.035, 0.035, 0.16),
rigid_props=sim_utils.UsdPhysicsRigidBodyCfg(kinematic_enabled=True),
collision_props=sim_utils.UsdPhysicsCollisionCfg(),
visual_material=sim_utils.PreviewSurfaceCfg(diffuse_color=(0.05, 0.54, 0.82)),
),
init_state=RigidObjectCfg.InitialStateCfg(pos=(0.20, 0.0, 0.23), rot=(0.0, 1.0, 0.0, 0.0)),
)
suction = SurfaceGripperCfg(
prim_path="{ENV_REGEX_NS}/Tool",
target_prim_path="{ENV_REGEX_NS}/Parcel",
tool_offset=(0.0, 0.0, TOOL_OFFSET),
)


def step_scene(sim: sim_utils.SimulationContext, scene: InteractiveScene, steps: int) -> None:
"""Apply staged commands and refresh the scene after each physics step."""
dt = sim.get_physics_dt()
for _ in range(steps):
scene.write_data_to_sim()
sim.step()
scene.update(dt)


def run_example(sim: sim_utils.SimulationContext) -> None:
"""Convey, pick up, and release the parcel."""
cfg = ConveyorCfg(
surface_specs=(ConveyorSurfaceCfg("{ENV_REGEX_NS}/Belt", velocity=0.20),),
body_pattern=r"/Parcel$",
body_count_per_env=1,
startup_duration_s=0.25,
)
with closing(InteractiveScene(ConveyorSceneCfg(num_envs=1, env_spacing=1.0))) as scene:
with closing(Conveyor(cfg, num_envs=scene.num_envs, sim=sim)) as conveyor:
sim.reset()
parcel, tool, suction = scene["parcel"], scene["tool"], scene["suction"]

start_x = parcel.data.root_pos_w.torch[0, 0].item()
conveyor.start()
step_scene(sim, scene, 120)
conveyor.stop()
step_scene(sim, scene, 12)
distance = parcel.data.root_pos_w.torch[0, 0].item() - start_x
if distance <= 0.03:
raise RuntimeError("The belt did not move the parcel.")
print(f"Conveyor moved the parcel {distance:.2f} m.")

# Keep the tool pointing down and place the pads just above the box.
pose = tool.data.default_root_pose.torch.clone()
pose[:, :3] = parcel.data.root_pos_w.torch
pose[:, 2] += PARCEL_SIZE / 2 + TOOL_OFFSET + 0.002
tool.write_root_pose_to_sim_index(root_pose=pose)
close = torch.ones(scene.num_envs, device=sim.device)
suction.set_grippers_command_index(close)
step_scene(sim, scene, 60)
if suction.state.numpy()[0] != 1:
raise RuntimeError("The suction pads did not seal.")

pickup_z = parcel.data.root_pos_w.torch[0, 2].item()
for _ in range(120):
pose[:, 2] += 0.0006
tool.write_root_pose_to_sim_index(root_pose=pose)
step_scene(sim, scene, 1)
lift = parcel.data.root_pos_w.torch[0, 2].item() - pickup_z
if lift <= 0.04:
raise RuntimeError("The sealed tool did not lift the parcel.")
print(f"Suction lifted the parcel {lift:.2f} m.")

suction.set_grippers_command_index(-close)
step_scene(sim, scene, 60)
if suction.state.numpy()[0] != -1 or parcel.data.root_pos_w.torch[0, 2].item() > pickup_z + 0.01:
raise RuntimeError("The suction tool did not release the parcel onto the belt.")
print("Suction released the parcel onto the belt.")


def main() -> None:
"""Run the example in Newton MJWarp."""
parser = argparse.ArgumentParser(description=__doc__)
add_launcher_args(parser)
args = parser.parse_args()
cfg = sim_utils.SimulationCfg(
device=args.device,
dt=1.0 / 120,
physics=NewtonCfg(
solver_cfg=MJWarpSolverCfg(use_mujoco_contacts=False, integrator="implicitfast", cone="elliptic"),
use_cuda_graph=False,
),
)
with launch_simulation(cfg, args), sim_utils.build_simulation_context(sim_cfg=cfg) as sim:
sim.set_camera_view(eye=(1.1, -0.9, 0.65), target=(0.0, 0.0, 0.06))
run_example(sim)


if __name__ == "__main__":
main()
Empty file.
20 changes: 17 additions & 3 deletions source/isaaclab/test/app/standalone_script_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class ScriptOverride:

args: tuple[str, ...] = ()
readiness_pattern: str | None = None
run_to_completion: bool = False
startup_timeout: float | None = None
skip_reason: str | None = None
fixed_physics_backend: str | None = None
Expand All @@ -79,6 +80,7 @@ class ScriptSpec:
options: dict[str, tuple[str, ...]]
args: tuple[str, ...]
readiness_pattern: str | None
run_to_completion: bool
startup_timeout: float | None
skip_reason: str | None
fixed_physics_backend: str | None
Expand All @@ -93,10 +95,15 @@ def program(self) -> tuple[str, str] | None:
return PROGRAMS_BY_PATH.get(self.path)

@property
def finite(self) -> bool:
"""Return whether CLI discovery or an explicit override bounds the script's steps."""
def has_step_limit(self) -> bool:
"""Return whether the launch supports a step limit."""
return "--max_steps" in self.options or "--max_steps" in self.args

@property
def finite(self) -> bool:
"""Return whether the launched script must run to completion."""
return self.run_to_completion or self.has_step_limit

@property
def relative_path(self) -> str:
"""Return the repository-relative POSIX path."""
Expand Down Expand Up @@ -161,7 +168,7 @@ def command(self) -> list[str]:
]
if "--num_envs" in self.spec.options and "--num_envs" not in self.spec.args:
command.extend(("--num_envs", str(DEFAULT_BATCHED_NUM_ENVS)))
if self.spec.finite and "--max_steps" not in self.spec.args:
if self.spec.has_step_limit and "--max_steps" not in self.spec.args:
command.extend(("--max_steps", str(DEFAULT_MAX_STEPS)))
if self.physics_option is not None:
command.extend((self.physics_option, self.physics_backend))
Expand Down Expand Up @@ -249,6 +256,12 @@ class SmokeResult:
fixed_physics_backend="newton_coupler",
visualizers=(None, "newton", "kit"),
),
"scripts/tutorials/01_assets/run_conveyor_suction.py": ScriptOverride(
args=("--viz", "none"),
run_to_completion=True,
fixed_physics_backend="newton_mjwarp",
visualizers=(None,),
),
"scripts/tutorials/08_mpm/material_parameters.py": ScriptOverride(
args=("--max_steps", "2", "--variant_index", "0", "--voxel_size", "0.1"),
fixed_physics_backend="newton_mpm",
Expand Down Expand Up @@ -375,6 +388,7 @@ def discover_specs() -> list[ScriptSpec]:
options=options,
args=override.args,
readiness_pattern=readiness_pattern,
run_to_completion=override.run_to_completion,
startup_timeout=override.startup_timeout,
skip_reason=override.skip_reason,
fixed_physics_backend=override.fixed_physics_backend,
Expand Down
10 changes: 5 additions & 5 deletions source/isaaclab/test/app/test_standalone_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"""Robustness smoke tests for packaged programs and standalone tutorial scripts.

Set ``ISAACLAB_RUN_STANDALONE_SCRIPT_TESTS=1`` to enable the simulator launch
matrix. Scripts with a ``--max_steps`` option run a few steps and must exit
cleanly; other scripts must print their readiness marker and survive a soak.
matrix. Scripts with a ``--max_steps`` option and naturally finite tutorials must
exit cleanly. Other scripts must print their readiness marker and survive a soak.
GUI cases additionally require ``DISPLAY`` or ``WAYLAND_DISPLAY``.
``ISAACLAB_STANDALONE_SOAK_TIME`` and ``ISAACLAB_STANDALONE_STARTUP_TIMEOUT``
may be used to tune the default five-second soak and five-minute time limit.
Expand Down Expand Up @@ -263,14 +263,14 @@ def test_mpm_demos_use_solver_contact_response(script_path):

def test_every_standalone_script_has_a_launch_contract_or_exemption():
"""Packaged programs must stop themselves; other scripts must be runnable or explicitly exempted."""
not_finite = [spec.relative_path for spec in SPECS if spec.program is not None and not spec.finite]
assert not not_finite, f"packaged programs need a --max_steps option: {not_finite}"
missing_step_limit = [spec.relative_path for spec in SPECS if spec.program is not None and not spec.has_step_limit]
assert not missing_step_limit, f"packaged programs need a --max_steps option: {missing_step_limit}"
missing = [
spec.relative_path
for spec in SPECS
if not spec.finite and spec.readiness_pattern is None and spec.skip_reason is None
]
assert not missing, f"standalone scripts need --max_steps, a readiness marker, or an OVERRIDES exemption: {missing}"
assert not missing, f"standalone scripts need a finite run, readiness marker, or exemption: {missing}"


def test_overrides_only_reference_discovered_standalone_scripts():
Expand Down
Loading