File size: 648 Bytes
8ca7ba0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from __future__ import annotations

import importlib.util

from packages.adapters.protocols import NotConfiguredError

ARENA_RELEASE = "release/0.2.1"
ISAAC_SIM_VERSION = "5.1"


def probe_arena() -> dict[str, str | bool]:
    available = importlib.util.find_spec("isaaclab_arena") is not None
    return {
        "available": available,
        "required_release": ARENA_RELEASE,
        "isaac_sim_version": ISAAC_SIM_VERSION,
    }


def require_arena() -> None:
    if not probe_arena()["available"]:
        raise NotConfiguredError(
            "Isaac Lab-Arena is unavailable; run this command in the pinned Isaac Sim 5.1 worker"
        )