Skip to content

Commit e6fc1e0

Browse files
Skip OVPhysX contact-sensor tests when the wheel is unavailable
The CI ``isaaclab_ov*`` filter collects the OVPhysX contact-sensor tests in Docker images that do not yet bundle the ``ovphysx`` wheel, causing ``ModuleNotFoundError`` at collection time and a red required check. Match the precedent set by ``source/isaaclab_ovphysx/test/assets/test_articulation_helpers.py`` and ``test_rigid_object_helpers.py``: move the existing ``pytest.importorskip("ovphysx.types", ...)`` guard above the ``from isaaclab_ovphysx ...`` imports so the file is skipped before the missing wheel can break collection. Also add the missing ``isaaclab_tasks`` changelog fragment for the ``AnymalD Flat`` and ``LocomotionVelocityRoughEnvCfg`` ovphysx-preset wiring that PR 5422 ships.
1 parent f495912 commit e6fc1e0

2 files changed

Lines changed: 26 additions & 17 deletions

File tree

source/isaaclab_ovphysx/test/sensors/test_contact_sensor.py

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,25 @@
4444
import torch
4545
import warp as wp
4646
from flaky import flaky
47-
from isaaclab_ovphysx.assets import RigidObject
48-
from isaaclab_ovphysx.physics import OvPhysxCfg
49-
from isaaclab_ovphysx.sensors import ContactSensor
50-
51-
import isaaclab.sim as sim_utils
52-
from isaaclab.assets import RigidObjectCfg
53-
from isaaclab.scene import InteractiveScene, InteractiveSceneCfg
54-
from isaaclab.sim import SimulationCfg, SimulationContext, build_simulation_context
55-
from isaaclab.sim.utils.stage import get_current_stage
56-
from isaaclab.terrains import HfRandomUniformTerrainCfg, TerrainGeneratorCfg, TerrainImporterCfg
57-
from isaaclab.utils.configclass import configclass
5847

59-
wp.init()
60-
61-
# The CI isaaclab_ov* pattern may collect these tests in environments where the
62-
# ovphysx wheel is not installed. Skip gracefully so other pipelines are not
63-
# blocked by a missing dependency.
48+
# The CI isaaclab_ov* pattern unintentionally collects isaaclab_ovphysx tests,
49+
# but the ovphysx wheel is not installed in that environment. Skip gracefully
50+
# so the isaaclab_ov CI pipeline is not blocked by an unrelated dependency.
6451
pytest.importorskip("ovphysx.types", reason="ovphysx wheel not installed")
6552

66-
from isaaclab_ovphysx.sensors import ContactSensorCfg # noqa: E402
53+
from isaaclab_ovphysx.assets import RigidObject # noqa: E402
54+
from isaaclab_ovphysx.physics import OvPhysxCfg # noqa: E402
55+
from isaaclab_ovphysx.sensors import ContactSensor, ContactSensorCfg # noqa: E402
56+
57+
import isaaclab.sim as sim_utils # noqa: E402
58+
from isaaclab.assets import RigidObjectCfg # noqa: E402
59+
from isaaclab.scene import InteractiveScene, InteractiveSceneCfg # noqa: E402
60+
from isaaclab.sim import SimulationCfg, SimulationContext, build_simulation_context # noqa: E402
61+
from isaaclab.sim.utils.stage import get_current_stage # noqa: E402
62+
from isaaclab.terrains import HfRandomUniformTerrainCfg, TerrainGeneratorCfg, TerrainImporterCfg # noqa: E402
63+
from isaaclab.utils.configclass import configclass # noqa: E402
64+
65+
wp.init()
6766

6867
# ---------------------------------------------------------------------------
6968
# Device-lock autouse fixture
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Added
2+
^^^^^
3+
4+
* Added ``ovphysx`` preset to ``isaaclab_tasks.manager_based.locomotion.velocity``
5+
for use under the OVPhysX backend. ``AnymalDFlatPhysicsCfg`` now exposes
6+
an ``ovphysx`` member, and the shared ``LocomotionVelocityRoughEnvCfg``
7+
injects the OVPhysX :class:`~isaaclab_ovphysx.sensors.ContactSensorCfg`
8+
alongside the existing PhysX and Newton entries so the velocity task
9+
selects the right contact sensor backend when run with
10+
``presets=ovphysx``.

0 commit comments

Comments
 (0)