Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 8 additions & 1 deletion scripts/run_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,14 @@
help="Environment/task name.",
)
parser.add_argument("--workflow", type=str, default="pickup_beaker", help="Name of the workflow to run.")
parser.add_argument("--record_path", type=str, default=None, help="Optional unique HDF5 recorder path for this run.")
parser.add_argument("--episodes", type=int, default=0, help="Stop after this many episodes; 0 keeps the existing continuous behavior.")
AppLauncher.add_app_launcher_args(parser)
args_cli = parser.parse_args()

# Launch omniverse app
app_launcher = AppLauncher(headless=args_cli.headless)
# Forward the complete parsed launcher configuration so --livestream reaches WebRTC.
app_launcher = AppLauncher(args_cli)
simulation_app = app_launcher.app

"""Rest everything else."""
Expand All @@ -66,6 +69,8 @@ def main():
num_envs=args_cli.num_envs,
use_fabric=not args_cli.disable_fabric,
)
if args_cli.record_path is not None:
env_cfg.record_path = args_cli.record_path

# Validate workflow exists
if not hasattr(env_cfg, "workflows") or not env_cfg.workflows:
Expand Down Expand Up @@ -133,6 +138,8 @@ def main():
sm.print_status(step=step_count, episode=episode_count)

sm.print_status(step=step_count, episode=episode_count)
if args_cli.episodes > 0 and episode_count >= args_cli.episodes:
break

env.close()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def __init__(
timeout: float = None,
position_threshold: float = None,
orientation_threshold: float = None,
settling_time: float = 0.05,
action_space_info: ActionSpaceInfo | None = None,
):
"""
Expand All @@ -75,6 +76,7 @@ def __init__(
timeout=timeout,
position_threshold=position_threshold,
orientation_threshold=orientation_threshold,
settling_time=settling_time,
action_space_info=action_space_info,
)

Expand Down Expand Up @@ -176,5 +178,6 @@ def from_cfg(cls, cfg: MoveRelativeCfg):
timeout=cfg.timeout,
position_threshold=cfg.position_threshold,
orientation_threshold=cfg.orientation_threshold,
settling_time=cfg.settling_time,
action_space_info=cfg.action_space_info,
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
import gymnasium as gym
import os

from . import test_franka_beaker_lift, test_franka_beakers, test_particle_systems, test_semantics_heat_transfer
from . import (
test_franka_beaker_lift,
test_franka_beakers,
test_particle_systems,
test_semantics_heat_transfer,
test_ticket0c_small_vessel,
)

##
# Register Gym environments.
Expand Down Expand Up @@ -47,3 +53,12 @@
},
disable_env_checker=True,
)

gym.register(
id="Matterix-Ticket0c-Small-Vessel-Franka-v1",
entry_point="matterix.envs:MatterixBaseEnv",
kwargs={
"env_cfg_entry_point": test_ticket0c_small_vessel.Ticket0CSmallVesselEnvCfg,
},
disable_env_checker=True,
)
Loading