urml-legged-runtime 0.5.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- urml_legged_runtime-0.5.2/.gitignore +117 -0
- urml_legged_runtime-0.5.2/PKG-INFO +123 -0
- urml_legged_runtime-0.5.2/README.md +89 -0
- urml_legged_runtime-0.5.2/pyproject.toml +80 -0
- urml_legged_runtime-0.5.2/src/urml_legged_runtime/__init__.py +44 -0
- urml_legged_runtime-0.5.2/src/urml_legged_runtime/_version.py +3 -0
- urml_legged_runtime-0.5.2/src/urml_legged_runtime/anymal.py +244 -0
- urml_legged_runtime-0.5.2/src/urml_legged_runtime/py.typed +0 -0
- urml_legged_runtime-0.5.2/src/urml_legged_runtime/spot.py +450 -0
- urml_legged_runtime-0.5.2/tests/__init__.py +0 -0
- urml_legged_runtime-0.5.2/tests/test_legged_adapters.py +306 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# --- Python ---
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
build/
|
|
8
|
+
dist/
|
|
9
|
+
develop-eggs/
|
|
10
|
+
downloads/
|
|
11
|
+
eggs/
|
|
12
|
+
.eggs/
|
|
13
|
+
lib/
|
|
14
|
+
lib64/
|
|
15
|
+
parts/
|
|
16
|
+
sdist/
|
|
17
|
+
var/
|
|
18
|
+
wheels/
|
|
19
|
+
*.egg-info/
|
|
20
|
+
.installed.cfg
|
|
21
|
+
*.egg
|
|
22
|
+
MANIFEST
|
|
23
|
+
|
|
24
|
+
# Virtual envs
|
|
25
|
+
.venv/
|
|
26
|
+
venv/
|
|
27
|
+
env/
|
|
28
|
+
ENV/
|
|
29
|
+
.python-version
|
|
30
|
+
|
|
31
|
+
# Test / coverage / mypy / pyright
|
|
32
|
+
.coverage
|
|
33
|
+
.coverage.*
|
|
34
|
+
.cache
|
|
35
|
+
.pytest_cache/
|
|
36
|
+
.mypy_cache/
|
|
37
|
+
.dmypy.json
|
|
38
|
+
.pyre/
|
|
39
|
+
.pyright/
|
|
40
|
+
htmlcov/
|
|
41
|
+
nosetests.xml
|
|
42
|
+
coverage.xml
|
|
43
|
+
*.cover
|
|
44
|
+
.hypothesis/
|
|
45
|
+
.tox/
|
|
46
|
+
|
|
47
|
+
# --- Node / web tooling (kept out of core repo; here for safety) ---
|
|
48
|
+
node_modules/
|
|
49
|
+
.pnp.*
|
|
50
|
+
.yarn/cache/
|
|
51
|
+
.yarn/unplugged/
|
|
52
|
+
.yarn/build-state.yml
|
|
53
|
+
.yarn/install-state.gz
|
|
54
|
+
npm-debug.log*
|
|
55
|
+
yarn-debug.log*
|
|
56
|
+
yarn-error.log*
|
|
57
|
+
|
|
58
|
+
# --- C++ / Rust build artifacts (in case reference runtimes land here in early Phase 1) ---
|
|
59
|
+
target/
|
|
60
|
+
*.o
|
|
61
|
+
*.obj
|
|
62
|
+
*.a
|
|
63
|
+
*.lib
|
|
64
|
+
*.dll
|
|
65
|
+
*.dylib
|
|
66
|
+
*.exe
|
|
67
|
+
*.pdb
|
|
68
|
+
cmake-build-*/
|
|
69
|
+
CMakeCache.txt
|
|
70
|
+
CMakeFiles/
|
|
71
|
+
CMakeScripts/
|
|
72
|
+
Testing/
|
|
73
|
+
cmake_install.cmake
|
|
74
|
+
install_manifest.txt
|
|
75
|
+
compile_commands.json
|
|
76
|
+
|
|
77
|
+
# --- ROS 2 build dirs ---
|
|
78
|
+
build/
|
|
79
|
+
install/
|
|
80
|
+
log/
|
|
81
|
+
|
|
82
|
+
# --- Editor and OS junk ---
|
|
83
|
+
.vscode/
|
|
84
|
+
.idea/
|
|
85
|
+
*.swp
|
|
86
|
+
*.swo
|
|
87
|
+
*~
|
|
88
|
+
.DS_Store
|
|
89
|
+
Thumbs.db
|
|
90
|
+
desktop.ini
|
|
91
|
+
|
|
92
|
+
# --- Local-only artifacts ---
|
|
93
|
+
.env
|
|
94
|
+
.env.*
|
|
95
|
+
*.log
|
|
96
|
+
*.tmp
|
|
97
|
+
.local/
|
|
98
|
+
.scratch/
|
|
99
|
+
|
|
100
|
+
# --- Outreach campaign artifacts (operational, not part of the open standard) ---
|
|
101
|
+
# Target lists, message drafts, tracking data, and the launch-approval record
|
|
102
|
+
# stay local. They are private to the maintainer; committing them would
|
|
103
|
+
# telegraph the campaign before launch and could embarrass listed projects.
|
|
104
|
+
outreach/
|
|
105
|
+
|
|
106
|
+
# Outreach dashboard SQLite mirror (RFC-0275). Derived from
|
|
107
|
+
# examples/lighthouses/outreach*.yaml via tools/scripts/refresh_outreach_db.py.
|
|
108
|
+
# Regenerated on demand by `make outreach-refresh`.
|
|
109
|
+
tools/outreach.db
|
|
110
|
+
tools/.outreach.db
|
|
111
|
+
|
|
112
|
+
# Local Claude Code settings (per-machine; permission rules, etc.). Not committed.
|
|
113
|
+
.claude/settings.json
|
|
114
|
+
.claude/settings.local.json
|
|
115
|
+
|
|
116
|
+
# Claude Code session worktrees (`claude -w <name>`); see AGENTS.md "Parallel sessions".
|
|
117
|
+
.claude/worktrees/
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: urml-legged-runtime
|
|
3
|
+
Version: 0.5.2
|
|
4
|
+
Summary: Legged/quadruped reference runtime for URML — Boston Dynamics Spot, ANYbotics ANYmal.
|
|
5
|
+
Project-URL: Homepage, https://github.com/urml-dev/URML
|
|
6
|
+
Project-URL: Repository, https://github.com/urml-dev/URML
|
|
7
|
+
Project-URL: Issues, https://github.com/urml-dev/URML/issues
|
|
8
|
+
Author: URML Maintainers
|
|
9
|
+
License: BUSL-1.1
|
|
10
|
+
Keywords: anybotics,anymal,boston-dynamics,legged,quadruped,robotics,runtime,spot,urml
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: Other/Proprietary License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Requires-Dist: pydantic<3,>=2.6
|
|
21
|
+
Requires-Dist: pyyaml<7,>=6.0
|
|
22
|
+
Requires-Dist: urml-ros2-runtime>=0.5.2
|
|
23
|
+
Requires-Dist: urml-validator>=0.5.2
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
26
|
+
Requires-Dist: pytest-cov>=5; extra == 'dev'
|
|
27
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
28
|
+
Requires-Dist: ruff>=0.5; extra == 'dev'
|
|
29
|
+
Provides-Extra: spot
|
|
30
|
+
Requires-Dist: bosdyn-api>=4.0; extra == 'spot'
|
|
31
|
+
Requires-Dist: bosdyn-client>=4.0; extra == 'spot'
|
|
32
|
+
Requires-Dist: bosdyn-mission>=4.0; extra == 'spot'
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
|
|
35
|
+
<p align="center">
|
|
36
|
+
<a href="https://urml.dev"><img src="https://urml.dev/favicon.svg" alt="URML" width="72" height="72"></a>
|
|
37
|
+
</p>
|
|
38
|
+
|
|
39
|
+
<p align="center">
|
|
40
|
+
A small, opinionated, human-readable language for describing robot intent.
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
<p align="center">
|
|
44
|
+
<a href="https://urml.dev"><b>urml.dev</b></a>
|
|
45
|
+
</p>
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
# urml-legged-runtime
|
|
50
|
+
|
|
51
|
+
**Legged/quadruped reference runtime for URML** — first-class adapters for **Boston Dynamics Spot** and **ANYbotics ANYmal**.
|
|
52
|
+
|
|
53
|
+
Two vendors, two substrates, the same `ROSAdapter` Protocol:
|
|
54
|
+
|
|
55
|
+
- **`SpotAdapter`** talks the Boston Dynamics `bosdyn` gRPC SDK directly. **No ROS 2 dependency** — like `PX4Adapter` for MAVLink, it is a second proof that URML's spec carries no ROS assumptions. Spot's own companion computer is commonly a Jetson, so the offline, Jetson-class deployment story is native here.
|
|
56
|
+
- **`AnymalAdapter`** speaks ROS 2, so it composes the ROS 2 runtime's `RclpyAdapter` — the same single-sourced-substrate pattern the industrial-arm runtime uses. No duplicated ROS 2 plumbing.
|
|
57
|
+
|
|
58
|
+
## Method coverage
|
|
59
|
+
|
|
60
|
+
**SpotAdapter** (bosdyn):
|
|
61
|
+
|
|
62
|
+
| URML primitive | Mapping |
|
|
63
|
+
|---|---|
|
|
64
|
+
| `move_to` / `hover` | GraphNav navigate-to (location → waypoint via `SpotConfig`) |
|
|
65
|
+
| `dock` | `bosdyn.client.docking` blocking dock |
|
|
66
|
+
| `wait` | held stand command |
|
|
67
|
+
| `measure` | robot-state telemetry (battery / e-stop) — *partial* |
|
|
68
|
+
| `wait_for` | robot-state poll — *partial* |
|
|
69
|
+
| `report` | structured record to a local sink (no cloud) |
|
|
70
|
+
| `scan` | documented not-supported result: no area-scan controller (a scan is waypoints plus a capture at each one) |
|
|
71
|
+
|
|
72
|
+
Not supported on a bare Spot — `grasp`/`release` (needs the Spot Arm SDK), `detect`, `capture`, `speak`, `listen`, and the drone trio — return `not_supported_on_spot: ...` (returned, not raised).
|
|
73
|
+
|
|
74
|
+
**AnymalAdapter** (composes `RclpyAdapter`): `move_to`/`hover`, `wait`, `measure`, `wait_for`, `report` delegate to the ROS 2 substrate. `grasp`/`release` (no arm), `dock`, `detect`, `scan`, `capture`, `speak`, `listen`, and the drone trio return `not_supported_on_quadruped[anymal]: ...`. A payload-equipped ANYmal pairs with a companion adapter, exactly as the drone stack pairs flight with a ROS 2 companion.
|
|
75
|
+
|
|
76
|
+
## Install
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
pip install -e reference/legged-runtime # AnymalAdapter (needs a sourced ROS 2 env to construct)
|
|
80
|
+
pip install -e reference/legged-runtime[spot] # + SpotAdapter (bosdyn wheels)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
`bosdyn` and `rclpy` are imported lazily, so the package imports on every host; constructing an adapter needs that vendor's runtime.
|
|
84
|
+
|
|
85
|
+
## Use
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
from urml_legged_runtime import SpotAdapter, SpotConfig
|
|
89
|
+
|
|
90
|
+
cfg = SpotConfig(hostname="192.168.80.3", location_to_waypoint={"dock": "wp-12"})
|
|
91
|
+
with SpotAdapter(cfg) as spot: # credentials read from env-var NAMES in cfg
|
|
92
|
+
assert spot.send_navigation_goal(location="dock").success
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
```python
|
|
96
|
+
from urml_conformance import ConformanceRunner
|
|
97
|
+
from urml_legged_runtime import LEGGED_ADAPTERS
|
|
98
|
+
|
|
99
|
+
runner = ConformanceRunner(adapter_factory=lambda: LEGGED_ADAPTERS["spot"]())
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Status
|
|
103
|
+
|
|
104
|
+
**v0.1 (this release):**
|
|
105
|
+
- `SpotAdapter` (standalone bosdyn) + `AnymalAdapter` (composes `RclpyAdapter`) + `LEGGED_ADAPTERS` registry.
|
|
106
|
+
- Hermetic unit tests: Spot against an injected fake `bosdyn` (navigation, dock, wait, measure, scan (not supported), every not-supported sentinel, lifecycle power-off, the missing-`[spot]`-extra error); ANYmal against an injected fake inner (delegation + not-supported + conformance hook + `runtime_checkable`).
|
|
107
|
+
- Gated `.github/workflows/legged-integration.yml`: `spot-smoke` (real bosdyn wheels), `spot-arm64-build` (the bosdyn stack under `linux/arm64` QEMU — the Jetson-companion signal, mirroring `px4-arm64-build`), and a gated `legged-sim-e2e` matrix that skips cleanly without a sim/credential.
|
|
108
|
+
|
|
109
|
+
**Follow-ups (not yet):**
|
|
110
|
+
- US-compliant capability manifests (Boston Dynamics — US/Hyundai-owned; ANYbotics — Switzerland). Blocked on the `Mobility.drive_type` schema, which has no `legged`/`quadruped` value; that is the Phase-5 RFC fast-follow. Quadruped conformance fixtures land with the RFC, not before (correct sequencing, not a shortcut).
|
|
111
|
+
- Spot Arm SDK wiring for `grasp`/`release`; a vision/speech companion split.
|
|
112
|
+
- A real Spot sim path: Boston Dynamics' public sim is weaker than PX4 SITL and Isaac-Sim Spot needs an RTX host (never the Jetson). Until that or hardware exists, the Spot integration lane is honestly the hermetic fake-bosdyn path; the gated sim job skips cleanly.
|
|
113
|
+
|
|
114
|
+
## Core Commitment
|
|
115
|
+
|
|
116
|
+
This runtime is licensed under the Business Source License 1.1: free for non-production use, commercial license for production (see [`LICENSING.md`](../../LICENSING.md)). No vendor coupling, no cloud dependency.
|
|
117
|
+
|
|
118
|
+
## Related documents
|
|
119
|
+
|
|
120
|
+
- [`/spec/layer-1-hal/`](../../spec/layer-1-hal/) — manifest schema (the `drive_type` gap is tracked by the Phase-5 RFC).
|
|
121
|
+
- [`/reference/ros2-runtime/`](../ros2-runtime/) — the substrate engine `AnymalAdapter` composes.
|
|
122
|
+
- [`/reference/px4-runtime/`](../px4-runtime/) — the no-ROS sibling whose structure `SpotAdapter` mirrors.
|
|
123
|
+
- [`/conformance/`](../../conformance/) — the test suite that decides conformance.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://urml.dev"><img src="https://urml.dev/favicon.svg" alt="URML" width="72" height="72"></a>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
A small, opinionated, human-readable language for describing robot intent.
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://urml.dev"><b>urml.dev</b></a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# urml-legged-runtime
|
|
16
|
+
|
|
17
|
+
**Legged/quadruped reference runtime for URML** — first-class adapters for **Boston Dynamics Spot** and **ANYbotics ANYmal**.
|
|
18
|
+
|
|
19
|
+
Two vendors, two substrates, the same `ROSAdapter` Protocol:
|
|
20
|
+
|
|
21
|
+
- **`SpotAdapter`** talks the Boston Dynamics `bosdyn` gRPC SDK directly. **No ROS 2 dependency** — like `PX4Adapter` for MAVLink, it is a second proof that URML's spec carries no ROS assumptions. Spot's own companion computer is commonly a Jetson, so the offline, Jetson-class deployment story is native here.
|
|
22
|
+
- **`AnymalAdapter`** speaks ROS 2, so it composes the ROS 2 runtime's `RclpyAdapter` — the same single-sourced-substrate pattern the industrial-arm runtime uses. No duplicated ROS 2 plumbing.
|
|
23
|
+
|
|
24
|
+
## Method coverage
|
|
25
|
+
|
|
26
|
+
**SpotAdapter** (bosdyn):
|
|
27
|
+
|
|
28
|
+
| URML primitive | Mapping |
|
|
29
|
+
|---|---|
|
|
30
|
+
| `move_to` / `hover` | GraphNav navigate-to (location → waypoint via `SpotConfig`) |
|
|
31
|
+
| `dock` | `bosdyn.client.docking` blocking dock |
|
|
32
|
+
| `wait` | held stand command |
|
|
33
|
+
| `measure` | robot-state telemetry (battery / e-stop) — *partial* |
|
|
34
|
+
| `wait_for` | robot-state poll — *partial* |
|
|
35
|
+
| `report` | structured record to a local sink (no cloud) |
|
|
36
|
+
| `scan` | documented not-supported result: no area-scan controller (a scan is waypoints plus a capture at each one) |
|
|
37
|
+
|
|
38
|
+
Not supported on a bare Spot — `grasp`/`release` (needs the Spot Arm SDK), `detect`, `capture`, `speak`, `listen`, and the drone trio — return `not_supported_on_spot: ...` (returned, not raised).
|
|
39
|
+
|
|
40
|
+
**AnymalAdapter** (composes `RclpyAdapter`): `move_to`/`hover`, `wait`, `measure`, `wait_for`, `report` delegate to the ROS 2 substrate. `grasp`/`release` (no arm), `dock`, `detect`, `scan`, `capture`, `speak`, `listen`, and the drone trio return `not_supported_on_quadruped[anymal]: ...`. A payload-equipped ANYmal pairs with a companion adapter, exactly as the drone stack pairs flight with a ROS 2 companion.
|
|
41
|
+
|
|
42
|
+
## Install
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install -e reference/legged-runtime # AnymalAdapter (needs a sourced ROS 2 env to construct)
|
|
46
|
+
pip install -e reference/legged-runtime[spot] # + SpotAdapter (bosdyn wheels)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
`bosdyn` and `rclpy` are imported lazily, so the package imports on every host; constructing an adapter needs that vendor's runtime.
|
|
50
|
+
|
|
51
|
+
## Use
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
from urml_legged_runtime import SpotAdapter, SpotConfig
|
|
55
|
+
|
|
56
|
+
cfg = SpotConfig(hostname="192.168.80.3", location_to_waypoint={"dock": "wp-12"})
|
|
57
|
+
with SpotAdapter(cfg) as spot: # credentials read from env-var NAMES in cfg
|
|
58
|
+
assert spot.send_navigation_goal(location="dock").success
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
from urml_conformance import ConformanceRunner
|
|
63
|
+
from urml_legged_runtime import LEGGED_ADAPTERS
|
|
64
|
+
|
|
65
|
+
runner = ConformanceRunner(adapter_factory=lambda: LEGGED_ADAPTERS["spot"]())
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Status
|
|
69
|
+
|
|
70
|
+
**v0.1 (this release):**
|
|
71
|
+
- `SpotAdapter` (standalone bosdyn) + `AnymalAdapter` (composes `RclpyAdapter`) + `LEGGED_ADAPTERS` registry.
|
|
72
|
+
- Hermetic unit tests: Spot against an injected fake `bosdyn` (navigation, dock, wait, measure, scan (not supported), every not-supported sentinel, lifecycle power-off, the missing-`[spot]`-extra error); ANYmal against an injected fake inner (delegation + not-supported + conformance hook + `runtime_checkable`).
|
|
73
|
+
- Gated `.github/workflows/legged-integration.yml`: `spot-smoke` (real bosdyn wheels), `spot-arm64-build` (the bosdyn stack under `linux/arm64` QEMU — the Jetson-companion signal, mirroring `px4-arm64-build`), and a gated `legged-sim-e2e` matrix that skips cleanly without a sim/credential.
|
|
74
|
+
|
|
75
|
+
**Follow-ups (not yet):**
|
|
76
|
+
- US-compliant capability manifests (Boston Dynamics — US/Hyundai-owned; ANYbotics — Switzerland). Blocked on the `Mobility.drive_type` schema, which has no `legged`/`quadruped` value; that is the Phase-5 RFC fast-follow. Quadruped conformance fixtures land with the RFC, not before (correct sequencing, not a shortcut).
|
|
77
|
+
- Spot Arm SDK wiring for `grasp`/`release`; a vision/speech companion split.
|
|
78
|
+
- A real Spot sim path: Boston Dynamics' public sim is weaker than PX4 SITL and Isaac-Sim Spot needs an RTX host (never the Jetson). Until that or hardware exists, the Spot integration lane is honestly the hermetic fake-bosdyn path; the gated sim job skips cleanly.
|
|
79
|
+
|
|
80
|
+
## Core Commitment
|
|
81
|
+
|
|
82
|
+
This runtime is licensed under the Business Source License 1.1: free for non-production use, commercial license for production (see [`LICENSING.md`](../../LICENSING.md)). No vendor coupling, no cloud dependency.
|
|
83
|
+
|
|
84
|
+
## Related documents
|
|
85
|
+
|
|
86
|
+
- [`/spec/layer-1-hal/`](../../spec/layer-1-hal/) — manifest schema (the `drive_type` gap is tracked by the Phase-5 RFC).
|
|
87
|
+
- [`/reference/ros2-runtime/`](../ros2-runtime/) — the substrate engine `AnymalAdapter` composes.
|
|
88
|
+
- [`/reference/px4-runtime/`](../px4-runtime/) — the no-ROS sibling whose structure `SpotAdapter` mirrors.
|
|
89
|
+
- [`/conformance/`](../../conformance/) — the test suite that decides conformance.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.27"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "urml-legged-runtime"
|
|
7
|
+
version = "0.5.2"
|
|
8
|
+
description = "Legged/quadruped reference runtime for URML — Boston Dynamics Spot, ANYbotics ANYmal."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { text = "BUSL-1.1" }
|
|
11
|
+
requires-python = ">=3.11"
|
|
12
|
+
authors = [{ name = "URML Maintainers" }]
|
|
13
|
+
keywords = ["robotics", "quadruped", "legged", "boston-dynamics", "spot", "anybotics", "anymal", "urml", "runtime"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"License :: Other/Proprietary License",
|
|
18
|
+
"Operating System :: OS Independent",
|
|
19
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
20
|
+
"Programming Language :: Python :: 3.11",
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
22
|
+
"Topic :: Scientific/Engineering",
|
|
23
|
+
]
|
|
24
|
+
dependencies = [
|
|
25
|
+
"pydantic>=2.6,<3",
|
|
26
|
+
"PyYAML>=6.0,<7",
|
|
27
|
+
"urml-validator>=0.5.2",
|
|
28
|
+
"urml-ros2-runtime>=0.5.2",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
[project.optional-dependencies]
|
|
32
|
+
# Boston Dynamics' SDK is a normal set of PyPI wheels (gRPC stubs), unlike
|
|
33
|
+
# rclpy. Spot is therefore NOT ROS-coupled — installing `urml-legged-
|
|
34
|
+
# runtime[spot]` gives everything SpotAdapter needs. ANYmal speaks ROS 2,
|
|
35
|
+
# so AnymalAdapter composes RclpyAdapter (rclpy ships with the ROS 2
|
|
36
|
+
# distribution, no extra). Module import works on every host: bosdyn and
|
|
37
|
+
# rclpy are both imported lazily, only when an adapter is constructed.
|
|
38
|
+
spot = [
|
|
39
|
+
"bosdyn-client>=4.0",
|
|
40
|
+
"bosdyn-api>=4.0",
|
|
41
|
+
"bosdyn-mission>=4.0",
|
|
42
|
+
]
|
|
43
|
+
dev = [
|
|
44
|
+
"pytest>=8",
|
|
45
|
+
"pytest-cov>=5",
|
|
46
|
+
"ruff>=0.5",
|
|
47
|
+
"mypy>=1.10",
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
[project.urls]
|
|
51
|
+
Homepage = "https://github.com/urml-dev/URML"
|
|
52
|
+
Repository = "https://github.com/urml-dev/URML"
|
|
53
|
+
Issues = "https://github.com/urml-dev/URML/issues"
|
|
54
|
+
|
|
55
|
+
[tool.hatch.build.targets.wheel]
|
|
56
|
+
packages = ["src/urml_legged_runtime"]
|
|
57
|
+
|
|
58
|
+
[tool.ruff]
|
|
59
|
+
line-length = 120
|
|
60
|
+
target-version = "py311"
|
|
61
|
+
src = ["src", "tests"]
|
|
62
|
+
|
|
63
|
+
[tool.ruff.lint]
|
|
64
|
+
select = ["E", "F", "W", "I", "B", "UP", "N", "ANN", "RUF"]
|
|
65
|
+
ignore = ["ANN401"]
|
|
66
|
+
|
|
67
|
+
[tool.ruff.lint.per-file-ignores]
|
|
68
|
+
"tests/*" = ["ANN"]
|
|
69
|
+
|
|
70
|
+
[tool.mypy]
|
|
71
|
+
strict = true
|
|
72
|
+
python_version = "3.11"
|
|
73
|
+
plugins = ["pydantic.mypy"]
|
|
74
|
+
mypy_path = "src"
|
|
75
|
+
packages = ["urml_legged_runtime"]
|
|
76
|
+
|
|
77
|
+
[tool.pytest.ini_options]
|
|
78
|
+
minversion = "8.0"
|
|
79
|
+
testpaths = ["tests"]
|
|
80
|
+
addopts = ["-q", "--strict-markers"]
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""urml_legged_runtime — legged/quadruped reference runtime for URML.
|
|
2
|
+
|
|
3
|
+
One first-class adapter per vendor, both implementing the
|
|
4
|
+
substrate-neutral ``ROSAdapter`` Protocol:
|
|
5
|
+
|
|
6
|
+
SpotAdapter (+ SpotConfig, load_spot_config)
|
|
7
|
+
Boston Dynamics Spot via the ``bosdyn`` gRPC SDK. No ROS 2
|
|
8
|
+
dependency (the [spot] extra installs the bosdyn wheels). Like
|
|
9
|
+
PX4Adapter, a second proof the spec carries no ROS assumptions.
|
|
10
|
+
|
|
11
|
+
AnymalAdapter
|
|
12
|
+
ANYbotics ANYmal — a ROS 2 quadruped, so it composes the ROS 2
|
|
13
|
+
runtime's RclpyAdapter (the industrial-arm single-sourced-substrate
|
|
14
|
+
pattern). No duplicated ROS 2 plumbing.
|
|
15
|
+
|
|
16
|
+
LEGGED_ADAPTERS
|
|
17
|
+
Name → class registry ({"spot": SpotAdapter, "anymal":
|
|
18
|
+
AnymalAdapter}) for config-driven selection (CI matrices, the
|
|
19
|
+
conformance adapter_factory).
|
|
20
|
+
|
|
21
|
+
Both bosdyn and rclpy are imported lazily, so this module loads on
|
|
22
|
+
every host; constructing an adapter needs that vendor's runtime
|
|
23
|
+
(the [spot] extra, or a sourced ROS 2 environment).
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
from __future__ import annotations
|
|
27
|
+
|
|
28
|
+
from urml_legged_runtime._version import __version__
|
|
29
|
+
from urml_legged_runtime.anymal import AnymalAdapter
|
|
30
|
+
from urml_legged_runtime.spot import SpotAdapter, SpotConfig, load_spot_config
|
|
31
|
+
|
|
32
|
+
LEGGED_ADAPTERS: dict[str, type] = {
|
|
33
|
+
"spot": SpotAdapter,
|
|
34
|
+
"anymal": AnymalAdapter,
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
__all__ = [
|
|
38
|
+
"LEGGED_ADAPTERS",
|
|
39
|
+
"AnymalAdapter",
|
|
40
|
+
"SpotAdapter",
|
|
41
|
+
"SpotConfig",
|
|
42
|
+
"__version__",
|
|
43
|
+
"load_spot_config",
|
|
44
|
+
]
|