|
| np.ndarray | _descriptor (str spec, float level_value, cfg) |
| |
| PatrolTask | _task (str spec, cfg, float altitude) |
| |
| | _ring_position (rng, PatrolTask task, float|None r_lo=None, float|None r_hi=None) |
| |
| | _start_velocity (rng, p, v_max) |
| |
| | get_system (SystemName name, str spec="theta", bool nominal_predicates=False, **kw) |
| |
| dict | run_episode (system, PatrolSetup setup, sup, np.ndarray x0, float seconds, int seed, str|None disturbance=None) |
| |
The three patrol benchmarks behind one interface: double integrator, Skydio X2, blimp.
A :class:`PatrolSystem` provides
* ``build(level)``: the :class:`~rl_stl.evaluation.patrol.PatrolSetup` (``f_syn``, receding
I-STL problem with verified terminal set, tube, nominal patrol) for one uncertainty level;
* ``descriptor(level)``: what the policy observes about the uncertainty (the disturbance bound
``w_bar`` for the double integrator, the tracking-tube radius ``eps`` for the MuJoCo
vehicles), never the realised disturbance;
* ``make_sim(setup, seed)``: the closed loop below the planner. Each planning step it receives
the cached plan's nominal ``(x_hat_k, u_hat_k)`` and the supervisor command and returns the
next measured ``f_syn`` state.
Double integrator: ``f_sim = f_syn + B w`` with ``w`` inside ``W`` and feedback
``u = u_hat + K (x - x_hat)`` (tube from ``W`` and ``K``, the guarantee's assumption holds).
X2 and blimp: MuJoCo ``f_sim``; the low-level tracker follows the ZOH-interpolated nominal
between planning points, and the tube is a constant empirical box ``eps`` on the planar
position (NAHS's choice), so ``K = 0`` at the planning level. Whether the realised tracking
error stays inside ``eps`` is measured and reported, not assumed.
Cube specs (``theta_plus``, ``phi_plus``): the signal is the 3-D position, the patrol runs on x,
y and z through six waypoints, the tube box covers x, y and z, and the workspace is
``|p_i| <= 2.5`` m on every axis. The MuJoCo vehicles fly the cube centred at
``altitude_plus`` (2.75 m, so the lowest workspace point is 0.25 m above the floor). The X2's
z bounds are raised to its planar ones (z carries patrol legs); the blimp keeps its physical z
thrust bounds and z speed limit and patrols z with its altitude PD gains.
Uncertain-predicate specs (``*_u``): the same builds with interval face predicates (bounds
``pred_offset``, ``pred_rotation`` in each config, equal at every uncertainty level) and wider terminal
face sets. ``nominal_predicates`` (config field, or ``get_system(..., nominal_predicates=True)``) is the
ablation that plans and checks with the exact predicates. The descriptor of a ``_u`` spec appends
``(pred_offset, pred_rotation)`` to the tube/disturbance bound, so the policy observes every
uncertainty bound (constant across levels: the feature is 1 after the ``w / w_max`` scaling).