diff --git a/source/isaaclab/isaaclab/assets/articulation/articulation_data.py b/source/isaaclab/isaaclab/assets/articulation/articulation_data.py index 28e75a48431..c490c85b3cd 100644 --- a/source/isaaclab/isaaclab/assets/articulation/articulation_data.py +++ b/source/isaaclab/isaaclab/assets/articulation/articulation_data.py @@ -50,9 +50,7 @@ def __init__(self, root_newton_view, device: str): self._sim_timestamp = 0.0 # obtain global simulation view - gravity = NewtonManager.get_model().gravity - # Convert to direction vector - gravity_dir = torch.tensor((gravity[0], gravity[1], gravity[2]), device=self.device) + gravity_dir = wp.to_torch(NewtonManager.get_model().gravity) gravity_dir = math_utils.normalize(gravity_dir.unsqueeze(0)).squeeze(0) # Initialize constants diff --git a/source/isaaclab/isaaclab/sim/_impl/newton_manager.py b/source/isaaclab/isaaclab/sim/_impl/newton_manager.py index ed150b4c3bf..248d8161901 100644 --- a/source/isaaclab/isaaclab/sim/_impl/newton_manager.py +++ b/source/isaaclab/isaaclab/sim/_impl/newton_manager.py @@ -133,7 +133,7 @@ def start_simulation(cls) -> None: for callback in NewtonManager._on_init_callbacks: callback() print(f"[INFO] Finalizing model on device: {NewtonManager._device}") - NewtonManager._builder.gravity = np.array(NewtonManager._gravity_vector) + NewtonManager._builder.gravity = np.array(NewtonManager._gravity_vector)[-1] NewtonManager._builder.up_axis = Axis.from_string(NewtonManager._up_axis) with Timer(name="newton_finalize_builder", msg="Finalize builder took:", enable=True, format="ms"): NewtonManager._model = NewtonManager._builder.finalize(device=NewtonManager._device) diff --git a/source/isaaclab/isaaclab/sim/_impl/newton_viewer.py b/source/isaaclab/isaaclab/sim/_impl/newton_viewer.py index ddd72859fb0..00f13dc9202 100644 --- a/source/isaaclab/isaaclab/sim/_impl/newton_viewer.py +++ b/source/isaaclab/isaaclab/sim/_impl/newton_viewer.py @@ -16,6 +16,7 @@ from __future__ import annotations import newton as nt +import warp as wp from newton.viewer import ViewerGL @@ -150,7 +151,7 @@ def _render_left_panel(self): imgui.text(f"Environments: {self.model.num_envs}") axis_names = ["X", "Y", "Z"] imgui.text(f"Up Axis: {axis_names[self.model.up_axis]}") - gravity = self.model.gravity + gravity = wp.to_torch(self.model.gravity)[0] gravity_text = f"Gravity: ({gravity[0]:.2f}, {gravity[1]:.2f}, {gravity[2]:.2f})" imgui.text(gravity_text) diff --git a/source/isaaclab/setup.py b/source/isaaclab/setup.py index 4f2f4f53401..5b93f7bb494 100644 --- a/source/isaaclab/setup.py +++ b/source/isaaclab/setup.py @@ -48,9 +48,9 @@ "flatdict==4.0.1", # newton "usd-core==25.05.0", - "mujoco>=3.3.6.dev802089588", - "mujoco-warp @ git+https://github.com/google-deepmind/mujoco_warp.git@64bb938f87b6aaf840753ef9ddc198db655020c0", - "newton @ git+https://github.com/newton-physics/newton.git@beta-1-1", + "mujoco>=3.3.7.dev811775910", + "mujoco-warp @ git+https://github.com/google-deepmind/mujoco_warp.git@df3d9faac49bf004b26a85d71e339ddb8e6e94f3", + "newton @ git+https://github.com/newton-physics/newton.git@6461b0a7405d805a334bceb7834cf9abf3847f94", "imgui-bundle==1.92.0", "PyOpenGL-accelerate==3.1.10", ] diff --git a/source/isaaclab_tasks/test/benchmarking/configs.yaml b/source/isaaclab_tasks/test/benchmarking/configs.yaml index 0bd37aa6935..5e457461557 100644 --- a/source/isaaclab_tasks/test/benchmarking/configs.yaml +++ b/source/isaaclab_tasks/test/benchmarking/configs.yaml @@ -42,7 +42,7 @@ fast: rsl_rl:Isaac-Humanoid-Direct-v0: max_iterations: 500 lower_thresholds: - reward: 600 + reward: 6000 episode_length: 500 upper_thresholds: duration: 500 @@ -56,14 +56,14 @@ fast: rsl_rl:Isaac-Velocity-Flat-G1-v0: max_iterations: 500 lower_thresholds: - reward: 15 + reward: 20 episode_length: 700 upper_thresholds: duration: 3000 rsl_rl:Isaac-Velocity-Flat-H1-v0: max_iterations: 500 lower_thresholds: - reward: 15 + reward: 25 episode_length: 700 upper_thresholds: duration: 3000 diff --git a/source/isaaclab_tasks/test/benchmarking/conftest.py b/source/isaaclab_tasks/test/benchmarking/conftest.py index 4e5bab3d8bb..954c7abf22f 100644 --- a/source/isaaclab_tasks/test/benchmarking/conftest.py +++ b/source/isaaclab_tasks/test/benchmarking/conftest.py @@ -44,6 +44,11 @@ def pytest_addoption(parser): default="", help="Optional tag to add to the KPI payload for filtering on the Grafana dashboard.", ) + parser.addoption( + "--disable_duration_check", + action="store_true", + help="Disable the duration check for the test.", + ) @pytest.fixture @@ -71,6 +76,11 @@ def save_kpi_payload(request): return request.config.getoption("--save_kpi_payload") +@pytest.fixture +def disable_duration_check(request): + return request.config.getoption("--disable_duration_check") + + @pytest.fixture def tag(request): return request.config.getoption("--tag") diff --git a/source/isaaclab_tasks/test/benchmarking/test_environments_training.py b/source/isaaclab_tasks/test/benchmarking/test_environments_training.py index 7a6679060b1..9b01d4180ea 100644 --- a/source/isaaclab_tasks/test/benchmarking/test_environments_training.py +++ b/source/isaaclab_tasks/test/benchmarking/test_environments_training.py @@ -76,7 +76,7 @@ def train_job(workflow, task, env_config, num_gpus): @pytest.mark.parametrize("task_spec", setup_environment()) -def test_train_environments(workflow, task_spec, config_path, mode, num_gpus, kpi_store): +def test_train_environments(workflow, task_spec, config_path, mode, num_gpus, kpi_store, disable_duration_check): """Train environments provided in the config file, save KPIs, and evaluate against thresholds""" # Skip if workflow not supported for this task if workflow + "_cfg_entry_point" not in task_spec.kwargs: @@ -103,7 +103,7 @@ def test_train_environments(workflow, task_spec, config_path, mode, num_gpus, kp print(f">>> Evaluating trained: {job_name}") # Check if training logs were output and all thresholds passed - kpi_payload = utils.evaluate_job(workflow, task, env_config, duration) + kpi_payload = utils.evaluate_job(workflow, task, env_config, duration, disable_duration_check) success_flag = kpi_payload["success"] print(f">>> Trained {job_name} success flag: {success_flag}.") diff --git a/source/isaaclab_tasks/test/benchmarking/test_utils.py b/source/isaaclab_tasks/test/benchmarking/test_utils.py index 0c939ca0166..7e99bbf430d 100644 --- a/source/isaaclab_tasks/test/benchmarking/test_utils.py +++ b/source/isaaclab_tasks/test/benchmarking/test_utils.py @@ -51,7 +51,7 @@ def get_env_config(env_configs, mode, workflow, task): return None -def evaluate_job(workflow, task, env_config, duration): +def evaluate_job(workflow, task, env_config, duration, disable_duration_check=False): """Evaluate the job.""" log_data = _retrieve_logs(workflow, task) @@ -64,6 +64,8 @@ def evaluate_job(workflow, task, env_config, duration): return kpi_payload thresholds = {**env_config.get("lower_thresholds", {}), **env_config.get("upper_thresholds", {})} + if disable_duration_check: + thresholds.pop("duration", None) # evaluate all thresholds from the config for threshold_name, threshold_val in thresholds.items():