Metadata-Version: 2.5
Name: urml-marine-runtime
Version: 0.5.4
Summary: Underwater-vehicle reference runtime for URML — BlueROV2 / ArduSub via MAVLink.
Project-URL: Homepage, https://github.com/urml-dev/URML
Project-URL: Repository, https://github.com/urml-dev/URML
Project-URL: Issues, https://github.com/urml-dev/URML/issues
Author: URML Maintainers
License: BUSL-1.1
License-File: LICENSE
Keywords: ardusub,bluerov,mavlink,robotics,rov,runtime,underwater,urml
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.11
Requires-Dist: pydantic<3,>=2.6
Requires-Dist: pyyaml<7,>=6.0
Requires-Dist: urml-ros2-runtime>=0.5.4
Requires-Dist: urml-validator>=0.5.4
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-cov>=5; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Provides-Extra: marine
Requires-Dist: pymavlink<3,>=2.4; extra == 'marine'
Description-Content-Type: text/markdown

<p align="center">
  <a href="https://urml.dev"><img src="https://urml.dev/favicon.svg" alt="URML" width="72" height="72"></a>
</p>

<p align="center">
  A small, opinionated, human-readable language for describing robot intent.
</p>

<p align="center">
  <a href="https://urml.dev"><b>urml.dev</b></a>
</p>

---

# urml-marine-runtime

**Underwater-vehicle reference runtime for URML** — `BlueRovAdapter` for **BlueROV2 / ArduSub**, via MAVLink.

ArduSub speaks MAVLink exactly like PX4, so this adapter mirrors `PX4Adapter`: lazy `pymavlink`, **no ROS 2 dependency**, a lazily-opened cached connection, failures returned not raised. It is the underwater analog of the PX4 no-ROS proof, and it activates the `underwater_thrusters` `mobility.drive_type` that already exists in the v0.1 manifest schema (so **no RFC is needed** — unlike legged/biped, which needed RFC-0009).

## Method coverage

| URML primitive | v0.1 |
|---|---|
| `move_to` / `hover` | `SET_POSITION_TARGET_LOCAL_NED` to a configured waypoint (location → north/east/depth) |
| `wait` | timed hold |
| `measure` | `SCALED_PRESSURE` (depth) / `BATTERY_STATUS` telemetry |
| `wait_for` | MAVLink message subscribe-once with predicate |
| `report` | structured record to a local sink (no cloud) |
| `scan` | documented not-supported result: no area-scan controller (a scan is waypoints plus a capture at each one) |

`grasp`/`release`, `dock`, `detect`, `capture`, `speak`, `listen` return `not_supported_on_bare_rov` (a manipulator/perception payload pairs via a companion). The drone trio `take_off`/`land`/`return_to_home` return `not_applicable_underwater` — honest: a submersible does not take off or land.

## Install / use

```bash
pip install -e reference/marine-runtime[marine]   # installs pymavlink
```

```python
from urml_marine_runtime import BlueRovAdapter, MarineConfig
with BlueRovAdapter(MarineConfig(connection_url="udp:127.0.0.1:14550")) as rov:
    assert rov.send_navigation_goal(pose={"north": 5.0, "east": 0.0, "depth": 3.0}).success
```

## Status

**v0.1 (this release):**
- `BlueRovAdapter` + `MarineConfig` (MAVLink, no ROS). `bluerov_marine` manifest exercises `drive_type: underwater_thrusters`; `conformance/fixtures/marine/` survey fixture verified through the runner.
- Hermetic unit tests: navigation (configured + unmapped), measure, scan (not supported), lifecycle, the not-supported / not-applicable-underwater sentinels, the missing-`[marine]`-extra error, the conformance hook; no pymavlink install required.
- Gated `.github/workflows/marine-integration.yml`: `marine-smoke` (real pymavlink), `marine-arm64-build` (the Jetson-class QEMU signal), and `marine-sitl-e2e` against ArduSub SITL (first run is a calibration run by design — the established px4/ros2 convention).

**Follow-ups (not yet):**
- Manipulator-payload companion (BlueROV + arm) wiring; a survey-pattern `scan` (waypoints with a capture at each one); until then `scan` returns not-supported.

## Core Commitment

This runtime is licensed under the Business Source License 1.1: free for non-production use, commercial license for production (see [`LICENSING.md`](https://github.com/urml-dev/URML/blob/main/LICENSING.md)). No vendor coupling, no cloud dependency.

## Related documents

- [`/reference/px4-runtime/`](https://github.com/urml-dev/URML/tree/main/reference/px4-runtime): the MAVLink sibling whose structure this mirrors.
- [`/conformance/`](https://github.com/urml-dev/URML/tree/main/conformance): the test suite that decides conformance.
