| # 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 | |
| """Launch Isaac Sim Simulator first.""" | |
| from isaaclab.app import AppLauncher | |
| # launch the simulator | |
| app_launcher = AppLauncher(headless=True, enable_cameras=True) | |
| simulation_app = app_launcher.app | |
| """Rest everything follows.""" | |
| import pytest | |
| import isaaclab_tasks # noqa: F401 | |
| # Local imports should be imported last | |
| from env_test_utils import _check_random_actions, setup_environment # isort: skip | |
| def test_environments(task_name, num_envs, device): | |
| """Run all environments with given parameters and check environments return valid signals.""" | |
| print(f">>> Running test for environment: {task_name} with num_envs={num_envs} and device={device}") | |
| # check environment | |
| _check_random_actions(task_name, device, num_envs, multi_agent=True) | |
| # close the environment | |
| print(f">>> Closing environment: {task_name}") | |
| print("-" * 80) | |