diff --git a/source/isaaclab_tasks/changelog.d/esekkin-cloth-motion-vectors.skip b/source/isaaclab_tasks/changelog.d/esekkin-cloth-motion-vectors.skip new file mode 100644 index 000000000000..2840ca0664f8 --- /dev/null +++ b/source/isaaclab_tasks/changelog.d/esekkin-cloth-motion-vectors.skip @@ -0,0 +1 @@ +Test-only: captured Franka cloth motion vectors during a controlled fall. diff --git a/source/isaaclab_tasks/test/golden_images/franka_cloth/newton-ovrtx_renderer-motion_vectors.png b/source/isaaclab_tasks/test/golden_images/franka_cloth/newton-ovrtx_renderer-motion_vectors.png index c6121c9c7a46..1c89f9b626c1 100644 --- a/source/isaaclab_tasks/test/golden_images/franka_cloth/newton-ovrtx_renderer-motion_vectors.png +++ b/source/isaaclab_tasks/test/golden_images/franka_cloth/newton-ovrtx_renderer-motion_vectors.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:49503a4a0e7e79169712eda8421a9c52dd9c6b8abd903e45423e498f3819075d -size 2252 +oid sha256:f06fc15e5499564d032c5efef6486ddd4c860947a7c423cab98134186aa63344 +size 6025 diff --git a/source/isaaclab_tasks/test/rendering_test_utils.py b/source/isaaclab_tasks/test/rendering_test_utils.py index d2b134a7ba56..ddca8a135ea3 100644 --- a/source/isaaclab_tasks/test/rendering_test_utils.py +++ b/source/isaaclab_tasks/test/rendering_test_utils.py @@ -432,6 +432,18 @@ def make_kitless_rendering_params_lift() -> list[pytest.param]: def make_kitless_rendering_params_franka() -> list[pytest.param]: """Create kitless Franka rendering parameters.""" params = make_kitless_rendering_params(KITLESS_PHYSICS_RENDERER_AOV_COMBINATIONS) + params = [ + ( + pytest.param( + *param.values, + id=param.id, + marks=[mark for mark in param.marks if mark.name != "skip"], + ) + if tuple(param.values[1:]) == ("newton", "ovrtx_renderer", "motion_vectors") + else param + ) + for param in params + ] instance_segmentation_skips = { tuple(param.values): "instance_segmentation crashes with the OVRTX renderer on Franka tasks (NVBUG#6463802)." for param in params @@ -2123,8 +2135,12 @@ def rendering_test_franka_cloth( data_types: list[str], comparison_scores: list[dict], ) -> None: + is_newton_ovrtx_motion = ( + physics_backend == "newton" and renderer == "ovrtx_renderer" and "motion_vectors" in data_types + ) for data_type in data_types: - _skip_if_newton_motion_vectors(physics_backend, data_type) + if not (is_newton_ovrtx_motion and data_type == "motion_vectors"): + _skip_if_newton_motion_vectors(physics_backend, data_type) if renderer == "ovrtx_renderer" and "instance_segmentation" in data_types: pytest.skip("instance_segmentation crashes with the OVRTX renderer on franka_cloth (NVBUG#6463802).") @@ -2140,6 +2156,9 @@ def rendering_test_franka_cloth( env_cfg = _apply_overrides_to_env_cfg(env_cfg, [f"presets={physics_preset_name},{renderer}"]) _configure_franka_camera_test_env_cfg(env_cfg, data_types) + if is_newton_ovrtx_motion: + initial_pos = env_cfg.scene.deformable.init_state.pos + env_cfg.scene.deformable.init_state.pos = (initial_pos[0], initial_pos[1], initial_pos[2] + 0.01) _maybe_enable_physx_determinism_for_motion(env_cfg, physics_backend, _motion_data_type(data_types)) @@ -2155,6 +2174,9 @@ def rendering_test_franka_cloth( # Step once so the cloth begins settling between the supports while limiting solver-dependent nodal drift. zero_actions = torch.zeros(env.num_envs, env.action_manager.total_action_dim, device=env.device) env.step(zero_actions) + # TODO: Remove the extra step when NVBug 6565960 is fixed. + if is_newton_ovrtx_motion: + env.step(zero_actions) camera = env.scene.sensors["base_camera"] camera_outputs = camera.data.output diff --git a/source/isaaclab_tasks/test/test_parametrization_helpers.py b/source/isaaclab_tasks/test/test_parametrization_helpers.py index 1343bb56d0dd..bf862e0e610d 100644 --- a/source/isaaclab_tasks/test/test_parametrization_helpers.py +++ b/source/isaaclab_tasks/test/test_parametrization_helpers.py @@ -243,7 +243,7 @@ def test_franka_factory_marks_only_unsupported_instance_segmentation() -> None: for variant in ("legacy", "ovstage"): for physics_backend in ("newton", "ovphysx"): motion_id = f"{variant}-{physics_backend}-ovrtx-motion_vectors" - assert "xfail" not in [mark.name for mark in params[motion_id].marks] + assert [mark.name for mark in params[motion_id].marks] == ["flaky"] instance_id = f"{variant}-{physics_backend}-ovrtx-instance_segmentation" assert [mark.name for mark in params[instance_id].marks] == ["skip"]