diff --git a/.gitmodules b/.gitmodules index 757499d..d085401 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "third_party/embodiinfer"] path = third_party/embodiinfer - url = https://github.com/BUAA-CI-LAB/EmbodiInfer.git - branch = main + url = https://github.com/yufoo1/EmbodiInfer.git + branch = feat/activevln-go2-serving diff --git a/README.md b/README.md index 9e10252..138364c 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,8 @@ lists robot, simulator, and model integrations. Recipes use the shared `embodirun example` CLI; `examples/run.sh` remains a compatible entrypoint for source checkouts. +[Go2 + ActiveVLN: single-chunk, continuous and RTC execution](docs/en/demos/go2-activevln.md) · [Deployment](docs/en/go2-activevln.md). + ## Why EmbodiRun | Feature | What you can do | diff --git a/README.zh-CN.md b/README.zh-CN.md index cca806b..e983f03 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -38,6 +38,8 @@ Recipe 使用统一的 `embodirun example` 命令行入口;源码 checkout 仍可使用 兼容的 `examples/run.sh`。 +[Go2 + ActiveVLN:单轮、连续与 RTC 真机执行](docs/zh/demos/go2-activevln.md) · [部署指南](docs/zh/go2-activevln.md)。 + ## 为什么选择 EmbodiRun | 特点 | 使用方式 | diff --git a/configs/activevln/go2-orin-nx-jp5-eager.json b/configs/activevln/go2-orin-nx-jp5-eager.json new file mode 100644 index 0000000..f2877ad --- /dev/null +++ b/configs/activevln/go2-orin-nx-jp5-eager.json @@ -0,0 +1,26 @@ +{ + "inference_url": "http://127.0.0.1:18767", + "robot_id": "go2", + "mode": "chunk", + "overlap": { + "lead_s": 1.5, + "max_capture_uncertainty_s": 0.15 + }, + "inference_token_env": "ACTIVEVLN_BENCHMARK_TOKEN", + "inference_timeout_s": 300.0, + "camera_timeout_s": 5.0, + "control_timeout_s": 0.5, + "session": { + "linear_speed_mps": 0.25, + "yaw_rate_rps": 0.5, + "control_hz": 10.0, + "max_chunk_s": 9.0, + "max_runtime_s": 120.0, + "max_chunks": 100, + "capture_timeout_s": 3.0, + "max_plan_age_s": 5.0, + "max_control_gap_s": 0.5 + }, + "robot_url": "http://127.0.0.1:8080", + "robot_token_env": "GO2_API_TOKEN" +} diff --git a/configs/activevln/go2-orin-nx-onboard.json b/configs/activevln/go2-orin-nx-onboard.json new file mode 100644 index 0000000..5d38e38 --- /dev/null +++ b/configs/activevln/go2-orin-nx-onboard.json @@ -0,0 +1,26 @@ +{ + "inference_url": "http://127.0.0.1:18767", + "robot_id": "go2", + "mode": "overlap", + "overlap": { + "lead_s": 1.5, + "max_capture_uncertainty_s": 0.15 + }, + "inference_token_env": "ACTIVEVLN_BENCHMARK_TOKEN", + "inference_timeout_s": 60.0, + "camera_timeout_s": 2.0, + "control_timeout_s": 0.5, + "session": { + "linear_speed_mps": 0.25, + "yaw_rate_rps": 0.5, + "control_hz": 10.0, + "max_chunk_s": 9.0, + "max_runtime_s": 120.0, + "max_chunks": 100, + "capture_timeout_s": 3.0, + "max_plan_age_s": 5.0, + "max_control_gap_s": 0.5 + }, + "robot_url": "http://127.0.0.1:8080", + "robot_token_env": "GO2_API_TOKEN" +} diff --git a/configs/activevln/go2-orin-nx.json b/configs/activevln/go2-orin-nx.json new file mode 100644 index 0000000..3adf015 --- /dev/null +++ b/configs/activevln/go2-orin-nx.json @@ -0,0 +1,26 @@ +{ + "inference_url": "", + "robot_id": "go2", + "mode": "overlap", + "overlap": { + "lead_s": 1.5, + "max_capture_uncertainty_s": 0.15 + }, + "inference_token_env": "ACTIVEVLN_BENCHMARK_TOKEN", + "inference_timeout_s": 60.0, + "camera_timeout_s": 2.0, + "control_timeout_s": 0.5, + "session": { + "linear_speed_mps": 0.25, + "yaw_rate_rps": 0.5, + "control_hz": 10.0, + "max_chunk_s": 9.0, + "max_runtime_s": 120.0, + "max_chunks": 100, + "capture_timeout_s": 3.0, + "max_plan_age_s": 5.0, + "max_control_gap_s": 0.5 + }, + "robot_url": "", + "robot_token_env": "GO2_API_TOKEN" +} diff --git a/configs/activevln/infer-jp5-eager.json b/configs/activevln/infer-jp5-eager.json new file mode 100644 index 0000000..854f0d3 --- /dev/null +++ b/configs/activevln/infer-jp5-eager.json @@ -0,0 +1,9 @@ +{ + "policy_kwargs": { + "attention": "eager", + "do_sample": false, + "max_new_tokens": 512, + "max_context": 32768, + "repetition_penalty": 1.05 + } +} diff --git a/configs/go2/owner-dry-run.json b/configs/go2/owner-dry-run.json new file mode 100644 index 0000000..04cda5c --- /dev/null +++ b/configs/go2/owner-dry-run.json @@ -0,0 +1,5 @@ +{ + "server": {"host": "127.0.0.1", "port": 8080, "token_env": "GO2_API_TOKEN"}, + "control": {"mode": "dry-run"}, + "camera": null +} diff --git a/docs/en/demos/go2-activevln.md b/docs/en/demos/go2-activevln.md new file mode 100644 index 0000000..7408760 --- /dev/null +++ b/docs/en/demos/go2-activevln.md @@ -0,0 +1,62 @@ +# ActiveVLN on a physical Go2 + +EmbodiRun connects the Go2 camera and hardware owner to EmbodiInfer's ActiveVLN +HTTP service. The same instruction can execute one chunk, continue through +multiple chunks, or overlap the next inference with current motion. + + + +[3× version (9 seconds)](https://raw.githubusercontent.com/BUAA-CI-LAB/misc/main/embodirun/v0.1/activevln_go2/go2_activevln_3x.mp4) · [Deployment guide](../go2-activevln.md) + +The demo is 9 seconds at 3× playback speed. The three cases use: + +| Case | CLI options | Behavior | +|---|---|---| +| Chunk 1 | `--mode chunk --max-chunks 1` | Observe, infer and execute once | +| Chunk 100 | `--mode chunk --max-chunks 100` | Repeat synchronous turns until STOP or a task bound | +| RTC + Chunk 100 | `--mode overlap --max-chunks 100 --overlap-lead-s 1.5` | Begin the next inference during the current motion chunk | + +Here 1 and 100 are the maximum number of **chunks per instruction**, not the +number of actions returned by a single inference. Each model response contains +at most three actions. The video re-typesets CLI options and log excerpts for +readability; they are not a live terminal or synchronized telemetry. + +## Recorded setup and limits + +The footage was recorded on 2026-10-29 with a Go2, onboard Orin NX, D435I RGB, +and ActiveVLN `Arvil/Qwen2.5-VL-3B_rl_r2r_4000` +(revision `160987313e3e869705f42400d1b8f28177044518`). The JP5 eager service +uses BF16-converted weights on JetPack 5.1.1 / CUDA 11.4. The deployment guide +separates this setup from the newer optimized benchmark environment. + +The RTC segment retains the first run's turn, forward motion, natural pause, +and following forward motion. It excludes the later manual head-return sequence. +The static timeline illustrates **1.493 seconds of overlap** and **1.861 seconds +of boundary waiting** from that run's log. This demonstrates execution modes; +it is not a controlled comparison of success rates or a general speedup claim. +The three clips are different tasks or takes, rather than matched trials. + +## Run the modes + +After preparing the owner and inference service with the deployment guide: + +```bash +CONFIG=configs/activevln/go2-orin-nx-jp5-eager.json +embodirun go2 activevln plan --config "$CONFIG" +embodirun go2 activevln check --config "$CONFIG" +embodirun go2 activevln interactive --config "$CONFIG" --mode chunk --max-chunks 1 --execute +embodirun go2 activevln interactive --config "$CONFIG" --mode chunk --max-chunks 100 --execute +embodirun go2 activevln interactive --config "$CONFIG" --mode overlap --max-chunks 100 \ + --overlap-lead-s 1.5 --execute +``` + +Run one mode at a time. The owner must be deliberately armed by the operator; +omitting `--execute` performs inference without motion. Overlap requires the +service's execution-prefix acknowledgement capability. STOP and the configured +runtime/chunk bounds end the task; exhausting a bound is not a success result. + +[Reproduce the demos](../examples.md) · [Support matrix](../support-matrix.md) diff --git a/docs/en/go2-activevln.md b/docs/en/go2-activevln.md new file mode 100644 index 0000000..5c083c2 --- /dev/null +++ b/docs/en/go2-activevln.md @@ -0,0 +1,176 @@ +# Go2 / ActiveVLN on Orin NX + +Use this Go2 integration with the pinned EmbodiInfer ActiveVLN serving adapter. +The entrypoint is `embodirun go2 activevln`. The [physical demo](demos/go2-activevln.md) +shows synchronous chunk execution and execution-prefix-aware overlap on Go2. + +Start with `configs/activevln/go2-orin-nx-jp5-eager.json` for the recorded JP5 +eager service. `go2-orin-nx-onboard.json` describes the separate optimized +service profile. Both use loopback inference (18767) and one hardware owner +(8080). `plan` is offline, `check` is read-only, and `run` without `--execute` +performs one inference without motion. + +The checkpoint revision remains `160987313e3e869705f42400d1b8f28177044518`. +The standalone download and BF16 conversion scripts preserve source weights +and write checksums. Preparation uses its own Python 3.10+ project and lock at +`scripts/activevln-preparation`; it installs neither Torch nor MicroDuck and +does not change the Host or inference environments. With uv 0.12.x, run these +commands from the repository root: + +```bash +uv sync --project scripts/activevln-preparation --frozen +uv run --project scripts/activevln-preparation --frozen hf auth login +uv run --project scripts/activevln-preparation --frozen \ + python scripts/download_navigation_models.py \ + --repo Arvil/Qwen2.5-VL-3B_rl_r2r_4000 \ + --revision 160987313e3e869705f42400d1b8f28177044518 \ + --output ../models/activevln-r2r --workers 4 --authenticated +uv run --project scripts/activevln-preparation --frozen \ + python scripts/prepare_activevln_bf16.py \ + ../models/activevln-r2r ../models/activevln-r2r-bf16 +``` + +Conversion requires verified checksums for the config and every indexed shard. +It excludes unverified files, preserves integer tensors and records nearest-even +BF16 conversion. A final `SHA256SUMS` is written only after complete conversion. + +The optimized benchmark NX launcher also requires its pinned recorded R2R warmup assets and +256-episode selection manifest. Prepare these assets separately; the JP5 eager profile does not use them. INT8 needs +an additional matching calibration file. The reference NX environment is L4T +R36.4.7 / CUDA 12.6, while the inspected robot uses R35.3.1 / CUDA 11.4; deployment targets the existing JetPack 5.1.1 system. The fresh compute environment +at `/home/unitree/embodirun-envs/compute-jp5` now uses checksummed ARM64/cp310 +PyTorch 2.2.0 and torchvision 0.17.2+c1d70fe wheels. CUDA 11.4 / cuDNN 8.6, BF16 +GPU operations and camera inference have passed. Source compilation +was stopped. This eager path does not enable the optimized benchmark profile. + +## Unified hardware owner + +`integrations/go2_owner` is an independently installed Python 3.8+ package. It +owns SDK2 control and camera capture with one lifecycle, HTTP endpoint and token. +Host clients remain in `robots/unitree/go2`; shared mobile-base contracts live in +`robots/mobile_base`; execution loops live in `application/navigation`. Neither +hardware nor client code imports the model service. + +The deployed control environment is a fresh uv environment at +`/home/unitree/embodirun-envs/control-jp5`, using Python 3.10.20, privately built +CycloneDDS 0.10.5 and device-built `pyrealsense2==2.55.1+go2.jp5`. The inspected +PyPI ARM64 RealSense wheels require newer glibc despite their manylinux2014 tags. +The environment's `python` wrapper selects its private native libraries and can +serve as both `EDGE_PYTHON` and `HOST_PYTHON`; no Conda/container environment is reused. +CLI install/start/status/stop, live SDK state and D435I RGB/RGB-D observations +have been checked on the Orin with motion readiness disabled. Camera-to-model CLI inference and the physical execution modes shown in the linked demo have been recorded. + +Generate configuration on the Orin with its vendor Python, without streaming: + +```bash +/usr/bin/python3 scripts/inspect_go2_onboard.py --camera --write-owner-config go2-owner.local.json +export PYTHONPATH="$PWD/integrations/go2_owner/src:$HOME/unitree_sdk2_python" +/usr/bin/python3 -m embodirun_go2_owner --config go2-owner.local.json --validate +/usr/bin/python3 -m embodirun_go2_owner --config go2-owner.local.json +``` + +Check the generated DDS interface/library paths. The file uses measured camera +serial and depth scale; multiple cameras require `--serial`. Existing files are +never overwritten. Motion readiness is an explicit `--operator-ready` startup +flag; it is never inherited from environment or configuration. + +ActiveVLN uses fresh RGB at `/observation/rgb.json` without requiring depth. +`/observation.json` retains matched RGB-D validation. All camera and control routes +share one credential. Capture/HTTP workers do not hold the motor control lock; +shutdown stops motion before joining capture workers. + +Remote deployment is model-independent: + +```bash +embodirun go2 edge --host "$GO2_HOST" --username "$GO2_USER" --ask-password install +embodirun go2 edge --host "$GO2_HOST" --username "$GO2_USER" --ask-password start \ + --config /path/to/go2-owner.local.json --python "$EDGE_PYTHON" \ + --sdk-pythonpath /home/unitree/unitree_sdk2_python --supervisor-python "$HOST_PYTHON" +``` + +`EDGE_PYTHON` is the remote vendor SDK Python (3.8+); `HOST_PYTHON` is the remote +supervisor Python (3.10+). `status` and `stop` take the same `--supervisor-python`. +Install uploads only the owner and standalone supervisor. One service ID, `go2`, +replaces independent camera/control services. A running PID does not imply camera +or DDS readiness; use `activevln check` after starting the inference service. + +The old `go2 activevln edge` and `embodirun-go2-streamvln` commands forward to this +CLI, but old `--service camera/control` flags and the two agent module entrypoints +are removed. Stop old processes before migrating. A non-loopback bind requires a +32-character-or-longer `GO2_API_TOKEN`. Navigation's `robot_url` supplies both +camera/control endpoints; explicit legacy URLs must agree when `robot_url` is set. +Single-shot `run` still disarms at the end of attempted motion. Use `interactive` +below to accept successive tasks without restarting a healthy owner. Emergency +stop and motion faults still require an intentional restart with operator readiness. +The model service remains separate. + +## Repeated instructions and longer tasks + +The inference service already keeps model weights loaded. The `interactive` CLI +keeps the terminal open, creates a fresh recurrent session for each instruction, +and closes that session before accepting the next instruction. Steps within one +instruction retain navigation history. This requires updated EmbodiRun **and** +`integrations/go2_owner`; the CLI rejects an old owner before enabling motion. + +With the model and owner services running, use the control environment: + +```bash +source /home/unitree/embodirun-envs/control-jp5/environment.sh +embodirun go2 activevln interactive \ + --config configs/activevln/go2-orin-nx-jp5-eager.json \ + --max-chunks 100 --max-runtime-s 600 --execute +``` + +```text +activevln> Move to the open area to the right of the yellow pillar. +... observation / inference / execution repeats ... +Task ended: stop (... chunks). Enter the next instruction. +activevln> Go to the door and stop. +activevln> /quit +``` + +Each model chunk contains at most three actions. `max_chunks=1` in the initial +first-motion configuration limited the whole instruction to one chunk; the CLI +overrides above allow up to 100 chunks or 600 seconds per instruction. Model STOP +ends the task earlier; reaching a bound does not mean the destination was reached. +Runtime bounds prevent further motion; an in-flight inference/cleanup may delay +returning to the prompt. Model context limits still apply. The 9-second chunk, +speed, heartbeat, and 5-second plan-freshness bounds remain enforced. + +Ctrl+C **during a task** stops its lease, drains pending inference, clears that +task's model history and returns to the prompt. Ctrl+C at the prompt, EOF, or +`/quit` exits the CLI. Services remain running. Commands are read between tasks; +use Ctrl+C to interrupt an executing task. Omitting `--execute` makes each entered +instruction perform one inference with no motion writes. + +Normal completion and Ctrl+C use an authenticated, action-ID-scoped lease release. +It stops only this task's stream and preserves already-enabled readiness after a +confirmed healthy stop. It cannot re-arm, cancel someone else's action, or hide a +failed lease. `/v1/stop`, SIGTERM during motion, and task faults after motion still +use disarming stop. Operational failures exit the CLI without retrying or re-arming. +The linked demo records physical chunk and overlap execution; it does not +establish navigation reliability. + +## Verified JP5 eager service + +From the repository directory on the Orin: + +```bash +/home/unitree/embodirun-envs/compute-jp5/run embodiinfer-http-serve \ + --policy activevln --checkpoint /home/unitree/models/activevln-r2r-bf16 \ + --adapter-config configs/activevln/infer-jp5-eager.json \ + --device cuda:0 --dtype auto --no-cuda-graph --max-batch 1 \ + --host 127.0.0.1 --port 18767 --max-sessions 1 --max-images 1 +``` + +Use the control environment for `embodirun go2 activevln check/run` with +`configs/activevln/go2-orin-nx-jp5-eager.json`. This synchronous chunk profile +allows a 300-second inference request timeout while retaining the five-second +execution freshness limit. Leave `ACTIVEVLN_BENCHMARK_TOKEN` unset for the +local server above, which has no token configured. + +The 2026-10-29 stationary D435I RGB test completed one CLI inference with about +7.72 seconds first-request round-trip latency and three proposed 15-degree right +turns. `executed_actions=0`; no motion was enabled. This does not establish +steady-state performance or closed-loop navigation. Its first-request latency +exceeds the default execution freshness limit. diff --git a/docs/en/support-matrix.md b/docs/en/support-matrix.md index 734d26c..c809b27 100644 --- a/docs/en/support-matrix.md +++ b/docs/en/support-matrix.md @@ -53,7 +53,7 @@ service. **✓ Franka FR3** — adapter and π0.5 binding. **◐ ARX5** — DM0.5 binding.
- **◐ Unitree Go2** — StreamVLN navigation.
+ **◐ Unitree Go2** — StreamVLN; ActiveVLN async/chunk CLI for onboard Orin NX (recorded physical execution).
**◐ XLeRobot** — external hardware owner; dual-arm π0.5 recipe. [Explore robot adapters](https://github.com/BUAA-CI-LAB/EmbodiRun/tree/main/src/embodirun/robots) @@ -99,10 +99,16 @@ service. | Bi-SO-101 | π0.5, 12-dimensional dual-arm policy | [Dual-arm guide](pi05-bi-so101.md) | | Franka FR3 | π0.5 binding | [Adapter](https://github.com/BUAA-CI-LAB/EmbodiRun/tree/main/src/embodirun/robots/franka/fr3) | | ARX5 | DM0.5 binding | [Binding](https://github.com/BUAA-CI-LAB/EmbodiRun/tree/main/src/embodirun/bindings/arx/x5/dm05) | - | Unitree Go2 | StreamVLN navigation | [Robot integration](https://github.com/BUAA-CI-LAB/EmbodiRun/tree/main/src/embodirun/robots/unitree/go2) | + | Unitree Go2 | StreamVLN; ActiveVLN / Orin NX, RealSense, batch=1 | [CLI and configuration](https://github.com/BUAA-CI-LAB/EmbodiRun/blob/main/examples/README.md#go2--onboard-orin-nx-activevln) | | XLeRobot | External hardware owner; `lerobot.xlerobot.pi05` for two arms | [Recipe](xlerobot-snack-delivery.md) / [owner package](https://github.com/BUAA-CI-LAB/EmbodiRun/blob/main/integrations/xlerobot_owner/README.md) | | SO-101 (wired teleoperation) | Multi-leader UDP fan-out, follower-side episode collection | [Integration package](https://github.com/BUAA-CI-LAB/EmbodiRun/blob/main/integrations/so101_wired_teleop/README.md) | + The Go2 ActiveVLN CLI targets the frozen optimized R2R checkpoint service + (`Arvil/Qwen2.5-VL-3B_rl_r2r_4000`, revision `160987313e3e869705f42400d1b8f28177044518`). + `embodirun go2 activevln run --config LOCAL_CONFIG --instruction TEXT` is + observation/inference only; `--execute` enables the bounded motion path. + Python 3.10+; [recorded physical chunk/overlap execution](demos/go2-activevln.md) on JP5 Orin NX. See the linked recipe for service setup. + SO-101 deployments need calibrated arms, camera mappings, and a checkpoint trained for the selected binding. FR3 needs its robot SDK; ARX5 needs the vendor motor driver. Source links are starting points for custom integration. diff --git a/docs/zh/demos/go2-activevln.md b/docs/zh/demos/go2-activevln.md new file mode 100644 index 0000000..c003ed5 --- /dev/null +++ b/docs/zh/demos/go2-activevln.md @@ -0,0 +1,58 @@ +# ActiveVLN 驱动 Go2 真机 + +EmbodiRun 将 Go2 相机与硬件 owner 接到 EmbodiInfer 的 ActiveVLN HTTP 服务。 +同一条指令可以只执行一轮、连续执行多轮,或让下一轮推理与当前运动重叠。 + + + +[3× 版本(9 秒)](https://raw.githubusercontent.com/BUAA-CI-LAB/misc/main/embodirun/v0.1/activevln_go2/go2_activevln_3x.mp4) · [部署指南](../go2-activevln.md) + +演示以 3 倍速播放,时长 9 秒,包含三种模式: + +| 模式 | CLI 参数 | 行为 | +|---|---|---| +| Chunk 1 | `--mode chunk --max-chunks 1` | 观测、推理并执行一轮 | +| Chunk 100 | `--mode chunk --max-chunks 100` | 同步循环,直到 STOP 或任务上限 | +| RTC + Chunk 100 | `--mode overlap --max-chunks 100 --overlap-lead-s 1.5` | 当前动作块执行时开始下一轮推理 | + +这里的 1 和 100 是**每条指令最多执行的 chunk 数**,不是单次推理输出的动作数。 +每次模型响应最多包含三个动作。视频中的参数与日志经过重新排版, +不是实时终端或逐帧同步的遥测。 + +## 录制配置与范围 + +视频录于 2026-10-29,使用 Go2、机载 Orin NX、D435I RGB,以及 +ActiveVLN `Arvil/Qwen2.5-VL-3B_rl_r2r_4000` +(revision `160987313e3e869705f42400d1b8f28177044518`)。 +JP5 eager 服务在 JetPack 5.1.1 / CUDA 11.4 上加载 BF16 转换权重。 +部署指南区分了此配置与较新平台上的优化 benchmark 环境。 + +RTC 片段保留第一次回合的转向、前进、自然停顿及下一轮前进, +排除了后一次回合中人工将头转回去的镜头。 +静态时序图对应该次日志中的 **1.493 秒重叠**和 **1.861 秒轮间等待**。 +这展示了执行模式,不是成功率的严格对照实验,也不代表普遍加速比例。 +三个片段来自不同任务或回合,不是配对测试。 + +## 运行三种模式 + +按部署指南准备好 owner 与推理服务后: + +```bash +CONFIG=configs/activevln/go2-orin-nx-jp5-eager.json +embodirun go2 activevln plan --config "$CONFIG" +embodirun go2 activevln check --config "$CONFIG" +embodirun go2 activevln interactive --config "$CONFIG" --mode chunk --max-chunks 1 --execute +embodirun go2 activevln interactive --config "$CONFIG" --mode chunk --max-chunks 100 --execute +embodirun go2 activevln interactive --config "$CONFIG" --mode overlap --max-chunks 100 \ + --overlap-lead-s 1.5 --execute +``` + +每次运行一种模式。owner 需由操作者显式启用运动;省略 `--execute` 时只推理、不运动。 +overlap 要求推理服务支持已执行动作前缀的确认协议。 +STOP、运行时限或 chunk 上限均可结束任务;达到上限不表示任务成功。 + +[复现演示](../examples.md) · [支持矩阵](../support-matrix.md) diff --git a/docs/zh/go2-activevln.md b/docs/zh/go2-activevln.md new file mode 100644 index 0000000..fd75b74 --- /dev/null +++ b/docs/zh/go2-activevln.md @@ -0,0 +1,238 @@ +# Go2 + ActiveVLN:Orin NX 本体推理 + +使用这两条开发分支: + +- EmbodiRun:`feat/go2-activevln-demo`。 +- EmbodiInfer 子模块:`feat/activevln-go2-serving`,以仓库固定的子模块提交为准。 + +运行入口是 **`embodirun go2 activevln`**,支持 eager 服务的同步导航,以及带执行前缀确认的 overlap;优化的 resident-KV +benchmark 服务是另一个可选部署配置。`configs/activevln/go2-orin-nx-onboard.json` 使用一个 `robot_url` 指向 Orin +本机的 Go2 owner(8080),推理服务独立使用 18767。相机与控制共用一个进程、 +HTTP 地址和 `GO2_API_TOKEN`。默认 `mode=overlap`, +可改为 `chunk` 做同步对照。完整行为说明见 [examples](https://github.com/BUAA-CI-LAB/EmbodiRun/blob/main/examples/README.md)。 + +## Mac:下载与精度转换 + +在仓库根目录使用 uv 0.12.x。`scripts/activevln-preparation` 是独立的 Python 3.10+ +准备环境,有自己的依赖锁文件,不安装 Torch 或 MicroDuck,也不改变 Host/模型环境。 +以下命令均从仓库根目录执行: + +```bash +uv sync --project scripts/activevln-preparation --frozen +uv run --project scripts/activevln-preparation --frozen hf auth login +uv run --project scripts/activevln-preparation --frozen \ + python scripts/download_navigation_models.py \ + --repo Arvil/Qwen2.5-VL-3B_rl_r2r_4000 \ + --revision 160987313e3e869705f42400d1b8f28177044518 \ + --output ../models/activevln-r2r --workers 4 --authenticated + +# 等下载生成 SHA256SUMS 后再转换;原始文件保持不变。 +uv run --project scripts/activevln-preparation --frozen \ + python scripts/prepare_activevln_bf16.py \ + ../models/activevln-r2r ../models/activevln-r2r-bf16 +``` + +该 revision 与 NX benchmark 配置一致。FP32 原始快照约 16.28 GB,BF16 副本约 +8.14 GB。下载逐文件核对上游哈希;转换要求配置和索引中的每个分片均通过校验, +使用 nearest-even,并只为完整输出生成独立校验文件。额外的未校验文件不会带入副本。 +这不等同于已经在设备上验证模型输出。HF 凭证只保存在标准凭证目录。 + +## 网线传输 + +本次确认的 Orin 地址是 `"$GO2_HOST"`,SSH 用户为 `unitree`。在 Mac 执行: + +```bash +rsync -av --partial --progress \ + --exclude '.venv' --exclude '__pycache__' --exclude '.pytest_cache' \ + ./ unitree@"$GO2_HOST":/home/unitree/EmbodiRun/ +rsync -av --partial --progress ../models/activevln-r2r-bf16/ \ + unitree@"$GO2_HOST":/home/unitree/models/activevln-r2r-bf16/ +``` + +在 Orin 的权重目录执行 `sha256sum -c SHA256SUMS`。Mac 的 `.venv` 不用于 Linux ARM64。 + +## Orin:运行前提 + +当前设备检查记录是 L4T R35.3.1、CUDA 11.4、Python 3.8、NX 16GB;分支的 +[NX 参考配置](https://github.com/yufoo1/EmbodiInfer/blob/fix/activevln-resident-kv/benchmarks/activevln-benchmark/orin-nx/config.json) +记录的是 **L4T R36.4.7、CUDA 12.6、Python 3.10.20、Torch 2.10.0、Triton 3.4.0**。 +部署以设备现有的 JetPack 5.1.1 / CUDA 11.4 为目标。控制环境已经使用 uv 新建在 +`/home/unitree/embodirun-envs/control-jp5`,不复用 Conda 或容器。计算环境位于 +`/home/unitree/embodirun-envs/compute-jp5`,使用已通过 SHA256 校验的 ARM64 / cp310 +预编译 PyTorch 2.2.0、torchvision 0.17.2+c1d70fe wheel。CUDA 11.4 / cuDNN 8.6、 +BF16 GPU 运算和一次真实相机推理已验证;源码编译已停止。该 eager 路径不使用 +参考开分配置。普通 CUDA 13.0 锁文件也不是 Jetson 安装方案;本次没有升级系统或刷机。 + +控制环境使用 Python 3.10.20、独立编译的 CycloneDDS 0.10.5,以及在设备编译的 +`pyrealsense2==2.55.1+go2.jp5`。已检查的 PyPI ARM64 RealSense wheel 虽标记为 +manylinux2014,实际依赖较新 glibc,不能在本机 Ubuntu 20.04 直接导入。 +该环境的 `python` 包装器会加载私有原生库路径,可同时用于 owner 和 supervisor: + +```bash +# 在 Mac 的仓库环境执行;Wi-Fi 地址由 DHCP 分配,需按当前地址设置。 +GO2_HOST=192.168.8.6 +CONTROL_PY=/home/unitree/embodirun-envs/control-jp5/python +embodirun go2 edge --host "$GO2_HOST" --username unitree --ask-password status \ + --supervisor-python "$CONTROL_PY" +``` + +已验证 CLI 的 `install/start/status/stop`、真实 SDK 状态读取和 D435I 的 RGB/RGB-D +观测读取。该次静态检查的 owner 未启用 `--operator-ready`,模型输出未发送给机器人执行;后续运动见真机演示。 + +用厂商 Python 读取相机序列号、深度单位和可用 profile,生成一份 owner 配置。 +此步骤不启动视频流或运动;已有文件不会覆盖。多相机时加 `--serial`: + +```bash +cd /home/unitree/EmbodiRun +/usr/bin/python3 scripts/inspect_go2_onboard.py --camera --write-owner-config go2-owner.local.json +``` + +检查生成配置中的 `control.interface`(当前为 `eth0`)和 `cyclonedds_lib_dir`。 +`camera` 使用实测序列号、深度单位和 640x480@15 profile,不能直接猜深度单位。 +`server` 管理唯一地址和凭证。若只检查控制,可将 `camera` 设为 `null`。 + +统一硬件进程支持厂商 Python 3.8,与 Host、模型环境独立。在仓库中直接运行: + +```bash +export PYTHONPATH="$PWD/integrations/go2_owner/src:$HOME/unitree_sdk2_python" +/usr/bin/python3 -m embodirun_go2_owner --config go2-owner.local.json --validate +/usr/bin/python3 -m embodirun_go2_owner --config go2-owner.local.json +``` + +也可在已有 SDK 环境安装 `integrations/go2_owner` 后使用 `embodirun-go2-owner`。 +owner 包不安装 Host、Torch 或模型依赖;相机的 numpy/Pillow/pyrealsense2 使用厂商兼容版本。 +默认没有运动权限,环境变量不能自动启用权限。 + +`/v1/state`、`/v1/actions`、`/v1/stop` 与相机接口共用 8080。 +ActiveVLN 读取 `/observation/rgb.json`,仅要求新鲜 RGB;其他策略仍可读取严格匹配的 +RGB-D `/observation.json`。`/health` 返回各组件状态;`/health/camera` 检查 RGB 并附带 +深度就绪信息。相机请求独立调度,关闭 owner 时先停止运动,再等待相机退出。 + +远程部署入口已从模型绑定移到 **`embodirun go2 edge`**,由 Mac 上传上述配置: + +```bash +embodirun go2 edge --host "$GO2_HOST" --username unitree --ask-password install +embodirun go2 edge --host "$GO2_HOST" --username unitree --ask-password start \ + --config /path/to/go2-owner.local.json --python /usr/bin/python3 \ + --sdk-pythonpath /home/unitree/unitree_sdk2_python --supervisor-python /path/to/host/python3 +embodirun go2 edge --host "$GO2_HOST" --username unitree --ask-password status \ + --supervisor-python /path/to/host/python3 +embodirun go2 edge --host "$GO2_HOST" --username unitree --ask-password stop \ + --supervisor-python /path/to/host/python3 +``` + +`--supervisor-python` 是远端 Python 3.10+,`--python` 是拥有 SDK 的远端 Python 3.8+; +两者可以不同。远端只有一个 `go2` 服务。`install` 仅上传 owner 和独立 supervisor, +不会上传整套 Host。旧 `go2 activevln edge` 和 `embodirun-go2-streamvln` 命令保留转发, +旧的 `--service camera/control` 和两个 agent 模块入口已移除,请先停止旧进程再迁移。 +绑定非回环地址时必须提供至少 32 字符的 `GO2_API_TOKEN`;相机与控制使用同一凭证。 +本体推理推荐保留回环绑定。PID 状态不代表硬件已就绪,随后还需运行 `activevln check`。 + +模型环境确定后,用该环境的 Python 执行 `scripts/inspect_go2_onboard.py --torch` +检查版本和 CUDA。 + +## 本机已验证的 eager 推理服务 + +在 Orin 的仓库目录中,使用独立计算环境启动: + +```bash +/home/unitree/embodirun-envs/compute-jp5/run embodiinfer-http-serve \ + --policy activevln --checkpoint /home/unitree/models/activevln-r2r-bf16 \ + --adapter-config configs/activevln/infer-jp5-eager.json \ + --device cuda:0 --dtype auto --no-cuda-graph --max-batch 1 \ + --host 127.0.0.1 --port 18767 --max-sessions 1 --max-images 1 +``` + +另一终端使用控制环境执行 `embodirun go2 activevln check/run`,配置选择 +`configs/activevln/go2-orin-nx-jp5-eager.json`。此配置为同步 chunk 模式,推理请求 +超时 300 秒;执行时的计划时效限制仍为 5 秒。模型服务绑定本机,无 token 时 +不要设置 `ACTIVEVLN_BENCHMARK_TOKEN`。 + +2026-10-29 已通过 CLI 完成一次 D435I RGB → ActiveVLN → 动作建议。首次请求 +往返约 7.72 秒,建议连续右转 15° 三次,`executed_actions=0`。这不是持续性能或 +运动闭环验证;首帧时延超过默认执行时效,不能据此直接启用运动。 + +## 优化的 resident-KV 参考服务 + +使用 [Infer 的 NX 启动器](https://github.com/yufoo1/EmbodiInfer/blob/fix/activevln-resident-kv/benchmarks/activevln-benchmark/orin-nx/README.md), +从 BF16 开始。该启动器需要其固定的 R2R warmup 数据和 256 集选择 manifest, +不仅是模型权重;请另行准备这些资源,JP5 eager 配置无需它们。Orin 不需要启动 Habitat。 + +所需参数为: + +```bash +# INFER_PY:已验证的 NX 推理 Python;WARMUP_R2R / MANIFEST:固定的预热资产。 +"$INFER_PY" third_party/embodiinfer/benchmarks/activevln-benchmark/orin-nx/run.py bf16 \ + --dataset r2r --checkpoint /home/unitree/models/activevln-r2r-bf16 \ + --data-root "$WARMUP_R2R" --manifest "$MANIFEST" \ + --output "$MODEL_RUN" --port 18767 +``` + +`MODEL_RUN` 必须是新的输出目录;等其 `service-ready.json` 生成后再连接。 +启动器校验预热资产和 manifest 哈希。INT8 另需匹配的校准文件,不在本次默认路径内。 + +## 检查和运行 + +Host 使用单独的 Python 3.10+ 环境安装 EmbodiRun。服务均启动后,在 Orin 执行: + +```bash +CONFIG=configs/activevln/go2-orin-nx-onboard.json +export ACTIVEVLN_BENCHMARK_TOKEN="$(cat "$MODEL_RUN/service-token")" +embodirun go2 activevln plan --config "$CONFIG" +embodirun go2 activevln check --config "$CONFIG" +embodirun go2 activevln run --config "$CONFIG" \ + --instruction "Go to the door and stop." +``` + +`plan` 完全离线;`check` 只读服务;上面的 `run` 只推理一次,不写运动命令。 +真实运行前,操作员确认场地和停止手段,停止 owner 后,添加 `--operator-ready` 重新启动,再给 `run` 添加 `--execute`。 +单次 `run` 在尝试运动后结束时仍会停止并撤销运动许可;相机继续可读。 +需要连续输入指令时,使用下面的 `interactive` 模式。急停和运动故障后的重新授权仍需操作员重启 owner。 + +## 常驻交互和长程任务 + +模型服务原本就会保持权重加载;新增的 `interactive` 让终端也持续接收指令。 +同一条指令内保留逐轮导航历史,每条新指令新建推理 session;结束时释放上一条的 +session 和历史,不重载权重。需要同时更新 EmbodiRun CLI 和 `integrations/go2_owner`; +如果 owner 不支持任务级停止,CLI 会在运动前报错要求更新。 + +启动模型与 owner 服务后,在控制环境执行: + +```bash +source /home/unitree/embodirun-envs/control-jp5/environment.sh +embodirun go2 activevln interactive \ + --config configs/activevln/go2-orin-nx-jp5-eager.json \ + --max-chunks 100 --max-runtime-s 600 --execute +``` + +使用已部署的目录时,也可以把 `--config` 换成 +本地验证记录(保留在实验归档中)。 + +```text +activevln> Move to the open area to the right of the yellow pillar. +……持续进行多轮观测、推理、执行…… +Task ended: stop (... chunks). Enter the next instruction. +activevln> Go to the door and stop. +activevln> /quit +``` + +每轮模型最多给出三个动作。首测文件中的 `max_chunks=1` 把整条指令限制成了一轮; +上述参数覆盖配置,允许每条指令最多 100 轮、600 秒。模型返回 STOP 会提前结束; +达到上限不代表已经到达目标。时间上限限制继续运动,正在进行的推理和清理可能延迟 +回到输入提示。模型自身的上下文长度限制仍然存在。单轮 9 秒、速度、心跳和 5 秒计划 +时效等限制保持有效。 + +- 任务执行中按 **Ctrl+C**:停止当前任务的运动,等待正在进行的推理清理,再接收下一条指令。 +- 输入提示处按 Ctrl+C、EOF 或输入 `/quit`:退出交互终端,模型和 owner 服务继续运行。 +- 不加 `--execute`:每条输入只做一次推理,不写运动命令。 +- 普通文本命令在任务之间读取;正在执行时用 Ctrl+C 中止。 + +正常结束和 Ctrl+C 使用携带 action_id 的任务级停止,只释放自己的 stream lease。 +确认停止且状态正常后,保留已经开启的运动许可;不能重新授权,也不能停止其他控制器的任务。 +`/v1/stop`、运动中的 SIGTERM 和运动后的任务故障仍走撤销许可的停止路径。 +操作失败会退出 CLI,不自动重试或重新授权。 + +[真机演示](demos/go2-activevln.md)已记录 chunk 与 overlap 的实际运动。 + +真机视频展示了有限的执行片段,不代表导航成功率验证。 +overlap 使用运动中的图像和已承诺动作前缀;视频保留实际轮间停顿,深度不是避障控制器。 diff --git a/docs/zh/support-matrix.md b/docs/zh/support-matrix.md index f403b21..6a3a86b 100644 --- a/docs/zh/support-matrix.md +++ b/docs/zh/support-matrix.md @@ -50,7 +50,7 @@ DM0.5 与 StreamVLN 当前逐请求执行。MicroDuck 使用其专用集成中 **✓ Franka FR3** — 适配器与 π0.5 绑定。 **◐ ARX5** — DM0.5 绑定。
- **◐ Unitree Go2** — StreamVLN 导航。
+ **◐ Unitree Go2** — StreamVLN;机载 Orin NX 的 ActiveVLN 异步/完整动作块 CLI(已有有限真机执行片段)。
**◐ XLeRobot** — 独立硬件服务;双臂 π0.5 Recipe。 [查看机器人适配器](https://github.com/BUAA-CI-LAB/EmbodiRun/tree/main/src/embodirun/robots) @@ -96,10 +96,16 @@ DM0.5 与 StreamVLN 当前逐请求执行。MicroDuck 使用其专用集成中 | Bi-SO-101 | π0.5,12 维双臂策略 | [双臂指南](pi05-bi-so101.md) | | Franka FR3 | π0.5 绑定 | [适配器](https://github.com/BUAA-CI-LAB/EmbodiRun/tree/main/src/embodirun/robots/franka/fr3) | | ARX5 | DM0.5 绑定 | [绑定](https://github.com/BUAA-CI-LAB/EmbodiRun/tree/main/src/embodirun/bindings/arx/x5/dm05) | - | Unitree Go2 | StreamVLN 导航 | [机器人集成](https://github.com/BUAA-CI-LAB/EmbodiRun/tree/main/src/embodirun/robots/unitree/go2) | + | Unitree Go2 | StreamVLN;ActiveVLN / Orin NX、RealSense、batch=1 | [CLI 与配置](https://github.com/BUAA-CI-LAB/EmbodiRun/blob/main/examples/README.md#go2--onboard-orin-nx-activevln) | | XLeRobot | 独立硬件服务;双臂使用 `lerobot.xlerobot.pi05` | [Recipe](xlerobot-snack-delivery.md) / [owner 集成包](https://github.com/BUAA-CI-LAB/EmbodiRun/blob/main/integrations/xlerobot_owner/README.md) | | SO-101(有线遥操作) | 多主臂 UDP 分发,从臂侧 episode 采集 | [集成包](https://github.com/BUAA-CI-LAB/EmbodiRun/blob/main/integrations/so101_wired_teleop/README.md) | + Go2 ActiveVLN CLI 对接已冻结的优化 R2R 检查点服务 + (`Arvil/Qwen2.5-VL-3B_rl_r2r_4000`,revision `160987313e3e869705f42400d1b8f28177044518`)。 + `embodirun go2 activevln run --config LOCAL_CONFIG --instruction TEXT` + 只取图和推理;加 `--execute` 才启用有时限的运动。 + 要求 Python 3.10+;已有 [JP5 Orin NX 上的 chunk/overlap 真机录像](demos/go2-activevln.md)。服务准备方式见链接中的说明。 + SO-101 部署需要已标定的机械臂、相机映射,以及针对所选绑定 训练的检查点。FR3 需要其机器人 SDK;ARX5 需要厂商电机 驱动。源码链接是自定义集成的起点。 @@ -239,3 +245,5 @@ Linux ARM64 依赖与可选集成需在目标机器检查;仅有容器镜像 演示通过[统一启动脚本](examples.md)准备环境、启动服务和执行任务。 服务使用的节点与 GPU 在部署 YAML 中指定。 + +Go2 ActiveVLN 新增[真机演示](demos/go2-activevln.md):JP5 / Orin NX、D435I RGB、BF16,展示单轮、连续和 overlap 执行;这是录制片段,不是导航成功率测评。 diff --git a/examples/README.md b/examples/README.md index c886493..508f781 100644 --- a/examples/README.md +++ b/examples/README.md @@ -191,6 +191,76 @@ Recipe lock; the software container already has its environment. See the commands, and the [installation guide](../docs/en/installation.md) for opt-in hardware/GPU profiles. Building an image does not enable robot motion. +## Go2 / onboard Orin NX ActiveVLN + +For checkpoint preparation, transfer, vendor Python entrypoints and environment +requirements, see the [deployment guide](../docs/en/go2-activevln.md) +([中文](../docs/zh/go2-activevln.md)). Preparation has a separate CPU-only uv +environment; it does not install the model service or alter the Host environment. + +`embodirun go2 activevln` connects the unified Go2 hardware owner to the +optimized batch-one ActiveVLN HTTP service on onboard Orin NX. Copy +[go2-orin-nx.json](../configs/activevln/go2-orin-nx.json), fill the two blank +service URLs, and export the tokens named in the config. Camera/control normally +share `robot_url` on port 8080; inference on the same NX can use `http://127.0.0.1:18767`. + +```bash +CONFIG=/path/to/go2-orin-nx.local.json +embodirun go2 activevln plan --config "$CONFIG" +embodirun go2 activevln check --config "$CONFIG" +embodirun go2 activevln run --config "$CONFIG" --instruction "Go to the door and stop." +embodirun go2 activevln run --config "$CONFIG" --instruction "Go to the door and stop." \ + --execute --output-jsonl artifacts/go2-demo.jsonl +``` + +`plan` is offline. `check` reads services without a model step or motion. +`run` without `--execute` infers once without control writes; use it to warm new +image/instruction shapes. Host Python is 3.10+; SDK/camera/model dependencies stay +in their service environments. No driver or system changes are needed. + +Start inference using the updated +[Orin NX BF16/INT8 launcher](https://github.com/yufoo1/EmbodiInfer/tree/fix/activevln-resident-kv/benchmarks/activevln-benchmark/orin-nx). +Use that branch's updated source as well as its launcher: overlap requires the +`activevln.execution_prefix.v1` capability. Keep batch=1 and existing optimization +switches. The launcher needs its warmup assets/selection file, but no Habitat +process. Export its `service-token` as `ACTIVEVLN_BENCHMARK_TOKEN`. Both current +and frozen pre-rename v1 HTTP namespaces are supported. + +The config selects `overlap`: one background worker captures and infers during +the current chunk's tail, while the control thread continues its heartbeat. The +request describes the actions still committed at capture; the model is prompted +to generate only their continuation, and the server acknowledges that context. +A ready continuation reuses the motion lease without an intermediate zero command. +If late, the base stops at the known chunk end and waits. STOP finishes after the +committed tail; cancellation/failure stops immediately. Only one model step is in +flight, and shutdown drains it before closing the recurrent session. The JSONL +records capture/inference time, observation age, boundary readiness and waiting time. + +This borrows RTC's committed-prefix scheduling idea, **not** its flow-model +numerical guidance. Prompt conditioning and moving observations change the policy +inputs; navigation accuracy and smoothness still need Go2 + NX validation. Timed +motion and camera exposure/encoding delay need hardware calibration; depth is not +an obstacle controller. Set `mode` to `chunk` for the synchronous full-chunk baseline. + +The optional [Go2 owner](../integrations/go2_owner/README.md) owns control and +capture with one configuration and endpoint. ActiveVLN reads RGB only; depth is +optional for this policy. Generate the owner configuration with the vendor Python +as described in the deployment guide, then install/start from the Mac: + +```bash +embodirun go2 edge --host "$GO2_HOST" --username "$GO2_USER" --ask-password install +embodirun go2 edge --host "$GO2_HOST" --username "$GO2_USER" --ask-password start \ + --config /path/to/go2-owner.local.json --python "$EDGE_PYTHON" \ + --supervisor-python "$HOST_PYTHON" --operator-ready +``` + +Both Python paths are remote: the owner uses the SDK environment (3.8+), while +supervision needs 3.10+. Add `--sdk-pythonpath` if the vendor SDK is not installed. +`status` and `stop` manage the single `go2` service and accept `--supervisor-python`. +Motion completion disarms control; stop/restart the owner with `--operator-ready` +for the next live run. Camera remains readable until owner shutdown. Inference +runs independently. Software tests do not establish real-robot navigation quality. + ## Smaller software examples - [Simulated device and public Control API](shared-device-fake.md) diff --git a/integrations/README.md b/integrations/README.md index c3c4a5a..3e43f46 100644 --- a/integrations/README.md +++ b/integrations/README.md @@ -5,6 +5,7 @@ Deploy's core does not install model runtimes, camera libraries, or robot SDKs. | Package | Responsibility | Core boundary | | --- | --- | --- | +| [go2_owner](go2_owner/README.md) | Unified Go2 SDK2 control and camera owner | Authenticated hardware HTTP API | | [sglang_pi05](sglang_pi05/README.md) | SGLang-backed policy service | Versioned inference API through a model provider | | [xlerobot_owner](xlerobot_owner/README.md) | XLeRobot hardware owner, teleoperation and collection | Robot owner HTTP API through the XLeRobot adapter | | [microduck_vln](microduck_vln/README.md) | Optional MicroDuck simulation SDK and ActiveVLN service process | Existing EmbodiRun HTTP client; episode loop in `examples/microduck_vln` | diff --git a/integrations/go2_owner/LICENSE b/integrations/go2_owner/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/integrations/go2_owner/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/integrations/go2_owner/NOTICE b/integrations/go2_owner/NOTICE new file mode 100644 index 0000000..c5c4f18 --- /dev/null +++ b/integrations/go2_owner/NOTICE @@ -0,0 +1,16 @@ +EmbodiRun +Copyright 2026 EmbodiRun contributors + +This product includes software developed by the EmbodiRun project +(https://github.com/BUAA-CI-LAB/EmbodiRun). + +EmbodiRun is licensed under the Apache License, Version 2.0. See LICENSE for +the full terms. + +The project was previously distributed under the MIT License and is now +distributed under the Apache License, Version 2.0; the copyright holders retain +their copyright. The rationale for the change and the contributor-consent +process are documented in docs/en/license.md. + +Third-party dependencies and their licenses are listed in +THIRD_PARTY_NOTICES.md. diff --git a/integrations/go2_owner/README.md b/integrations/go2_owner/README.md new file mode 100644 index 0000000..ac789c4 --- /dev/null +++ b/integrations/go2_owner/README.md @@ -0,0 +1,70 @@ +# Go2 hardware owner + +One process owns SDK2 control, camera capture, the shared HTTP endpoint and shutdown. +Motor leases and SDK calls keep their own workers; camera response/encoding work +cannot hold the motor lifecycle lock. Shutdown stops motion before joining capture. + +This package supports Python 3.8+ independently of the Host (3.10+) and inference. +It has no base dependencies. Use the vendor-compatible Unitree SDK2, CycloneDDS, +numpy, Pillow and pyrealsense2 in the robot environment. The optional `camera` +extra is for environments where compatible wheels are available; installing the +owner alone never replaces vendor SDKs. + +From the repository root, without installing the Host: + +```bash +PYTHONPATH=integrations/go2_owner/src python3 -m embodirun_go2_owner \ + --config configs/go2/owner-dry-run.json +``` + +The dry-run config has no camera and cannot control hardware. `--validate` checks +configuration without opening devices or loading SDKs. A real Orin config can be +created by `scripts/inspect_go2_onboard.py --camera --write-owner-config owner.local.json`. +Check the generated DDS interface and library directory before use. The script +reads the camera serial/depth scale and refuses to overwrite existing files. + +Configuration has three sections: + +- `server`: one `host`, `port`, and `token_env` (default `GO2_API_TOKEN`). +- `control`: `mode`, DDS `interface`, `cyclonedds_lib_dir`, optional `state_topic` + and `rpc_timeout_s`. +- `camera`: `null`, or capture options (`backend`, `serial`, `profile`, + `depth_scale`, `depth_calibrated`, capture timeouts and encoding settings). + +Motion requires explicit `--operator-ready`. Configuration and old readiness +variables cannot arm it. Stop disarms until an intentional process restart. +`POST /v1/actions` with `{"action":"release_move","action_id":"..."}` +releases only the named current (or most recently finished) stream lease. After +a confirmed stop with fresh, healthy state it preserves existing readiness for +the next interactive task. It never re-arms or cancels a different lease. Failed +leases, including heartbeat and SDK stop failures, revoke readiness. Clients can +check the `stream_lease_release` capability in `/v1/state` before using this mode. +The existing bounds, fresh-state/tilt checks, 2-second heartbeat watchdog and +10-second motion lease limit remain enforced. Non-loopback listeners require a +32-character-or-longer bearer token shared by every route. + +| Route | Purpose | +| --- | --- | +| `GET /health` | Component state and configured capabilities | +| `GET /v1/state` | Robot state and active motion lease | +| `POST /v1/actions` | Bounded actions and lease heartbeats | +| `POST /v1/stop` | Stop and revoke motion readiness | +| `GET /observation/rgb.json` | Fresh RGB with monotonic frame age; no depth requirement | +| `GET /observation.json` | Fresh, registered, sequence-matched RGB-D | +| `GET /health/camera` | RGB health and depth readiness details | +| `GET /frame.jpg`, `/depth.json`, `/depth.png` | Diagnostic camera data | + +ActiveVLN uses the RGB endpoint; RGB-D consumers retain strict registration and +freshness checks. Neither path is an obstacle avoidance controller. + +Deployment is `embodirun go2 edge` (`deployment/go2`), independent of policy. +It uploads this package plus the shared standalone supervisor, and manages one +service named `go2`. The supervisor requires Python 3.10+; pass +`--supervisor-python` separately from the vendor owner's `--python` when needed. +Stop old camera/control processes before migration. The old two-agent module +entrypoints and `--service camera/control` switches have been removed. + +Host clients live in `robots/unitree/go2`; shared contracts in `robots/mobile_base`; +navigation loops in `application/navigation`. There are no Host/model imports here. + +For on-device SDK, camera and motion setup, see the [Orin deployment guide](../../docs/en/go2-activevln.md). diff --git a/integrations/go2_owner/pyproject.toml b/integrations/go2_owner/pyproject.toml new file mode 100644 index 0000000..b6c69d3 --- /dev/null +++ b/integrations/go2_owner/pyproject.toml @@ -0,0 +1,21 @@ +[build-system] +requires = ["setuptools>=68", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "embodirun-go2-owner" +version = "0.1.0" +description = "Optional unified Go2 hardware owner with isolated SDK and camera dependencies" +readme = "README.md" +license = {file = "LICENSE"} +requires-python = ">=3.8" +dependencies = [] + +[project.optional-dependencies] +camera = ["numpy>=1.24", "Pillow>=10", "pyrealsense2>=2.54,<3"] + +[project.scripts] +embodirun-go2-owner = "embodirun_go2_owner.cli:main" + +[tool.setuptools.packages.find] +where = ["src"] diff --git a/integrations/go2_owner/src/embodirun_go2_owner/__init__.py b/integrations/go2_owner/src/embodirun_go2_owner/__init__.py new file mode 100644 index 0000000..01a9170 --- /dev/null +++ b/integrations/go2_owner/src/embodirun_go2_owner/__init__.py @@ -0,0 +1 @@ +"""Optional Go2 hardware owner; independent of the Host and model runtime.""" diff --git a/integrations/go2_owner/src/embodirun_go2_owner/__main__.py b/integrations/go2_owner/src/embodirun_go2_owner/__main__.py new file mode 100644 index 0000000..d676efa --- /dev/null +++ b/integrations/go2_owner/src/embodirun_go2_owner/__main__.py @@ -0,0 +1,5 @@ +"""Run the single robot-resident hardware service.""" + +from .cli import main + +raise SystemExit(main()) diff --git a/integrations/go2_owner/src/embodirun_go2_owner/camera/__init__.py b/integrations/go2_owner/src/embodirun_go2_owner/camera/__init__.py new file mode 100644 index 0000000..6c7cf7e --- /dev/null +++ b/integrations/go2_owner/src/embodirun_go2_owner/camera/__init__.py @@ -0,0 +1 @@ +"""RGB/RGB-D capture components for the unified hardware owner.""" diff --git a/integrations/go2_owner/src/embodirun_go2_owner/camera/capture.py b/integrations/go2_owner/src/embodirun_go2_owner/camera/capture.py new file mode 100644 index 0000000..79049e7 --- /dev/null +++ b/integrations/go2_owner/src/embodirun_go2_owner/camera/capture.py @@ -0,0 +1,140 @@ +"""Own camera capture workers and snapshots independently of HTTP serving.""" + +from __future__ import annotations + +from typing import Optional + +from .depth_store import DepthStore +from .frame_store import FrameStore +from .observation import CameraObservationService +from .realsense import RealSenseWorker +from .settings import CameraServiceConfig +from .v4l2 import V4L2YUYVSource, V4L2Z16Source +from .workers import CameraWorker, DepthWorker + + +class CameraCapture: + """Camera resources with explicit startup/cleanup, without a listening socket.""" + + def __init__(self, config, frame_store, depth_store, rgb_worker, depth_worker): + self.frame_store, self.depth_store = frame_store, depth_store + self.max_frame_age, self.max_depth_age = config.max_frame_age, config.max_depth_age + self.calibration_confirmed = config.depth_calibrated + self.rgb_depth_alignment_claimed = config.rgb_depth_alignment_claimed + self.backend = config.backend + self.registration_verified = False + self.depth_scale_m = config.depth_scale + self.depth_device = config.initial_device if config.backend == "realsense" else config.depth_device + self.observations = CameraObservationService(self) + self.workers = [rgb_worker] + ([depth_worker] if depth_worker is not None else []) + self._started = [] + + def start(self) -> None: + """Start capture only after the owner has bound its HTTP socket.""" + for worker in self.workers: + worker.start() + self._started.append(worker) + + def close(self) -> None: + """Stop all capture workers; report any worker that cannot be joined.""" + errors = [] + for worker in self._started: + try: + worker.stop() + except Exception as error: + errors.append(str(error)) + for worker in self._started: + try: + worker.join(timeout=3.0) + if worker.is_alive(): + errors.append("camera worker did not terminate") + except Exception as error: + errors.append(str(error)) + self._started.clear() + if errors: + raise RuntimeError("; ".join(errors)) + + +def build_capture(config: CameraServiceConfig) -> CameraCapture: + """Construct capture workers without importing SDKs or opening devices.""" + + config.validate() + frame_store = FrameStore(device=config.initial_device) + depth_store: Optional[DepthStore] = None # noqa: UP045 + depth_worker: Optional[object] = None # noqa: UP045 + + if config.backend == "realsense": + assert config.depth_scale is not None + depth_store = DepthStore( + config.width, + config.height, + device=config.initial_device, + backend="realsense", + ) + rgb_worker = RealSenseWorker( + frame_store=frame_store, + depth_store=depth_store, + width=config.width, + height=config.height, + fps=config.fps, + expected_depth_scale=config.depth_scale, + jpeg_quality=config.jpeg_quality, + jpeg_fps=config.jpeg_fps, + frame_timeout=config.frame_timeout, + retry_delay=config.retry_delay, + serial=config.serial, + max_depth_m=config.max_depth_m, + ) + else: + + def rgb_source_factory() -> V4L2YUYVSource: + return V4L2YUYVSource( + device=config.device, + width=config.width, + height=config.height, + warmup_frames=config.warmup_frames, + frame_timeout=config.frame_timeout, + format_timeout=config.format_timeout, + ) + + rgb_worker = CameraWorker( + store=frame_store, + source_factory=rgb_source_factory, + width=config.width, + height=config.height, + jpeg_quality=config.jpeg_quality, + jpeg_fps=config.jpeg_fps, + retry_delay=config.retry_delay, + ) + if config.depth_calibrated: + assert config.depth_scale is not None + depth_store = DepthStore( + config.depth_width, + config.depth_height, + device=config.depth_device, + backend="v4l2", + ) + depth_store.set_registration(False, False, config.depth_scale) + + def depth_source_factory() -> V4L2Z16Source: + return V4L2Z16Source( + device=config.depth_device, + width=config.depth_width, + height=config.depth_height, + warmup_frames=config.depth_warmup_frames, + frame_timeout=config.frame_timeout, + format_timeout=config.format_timeout, + ) + + depth_worker = DepthWorker( + store=depth_store, + source_factory=depth_source_factory, + width=config.depth_width, + height=config.depth_height, + depth_scale=config.depth_scale, + sample_fps=config.depth_fps, + retry_delay=config.retry_delay, + max_depth_m=config.max_depth_m, + ) + + return CameraCapture(config, frame_store, depth_store, rgb_worker, depth_worker) diff --git a/src/embodirun/robots/unitree/go2/agent/camera/depth_store.py b/integrations/go2_owner/src/embodirun_go2_owner/camera/depth_store.py similarity index 100% rename from src/embodirun/robots/unitree/go2/agent/camera/depth_store.py rename to integrations/go2_owner/src/embodirun_go2_owner/camera/depth_store.py diff --git a/src/embodirun/robots/unitree/go2/agent/camera/encoding.py b/integrations/go2_owner/src/embodirun_go2_owner/camera/encoding.py similarity index 100% rename from src/embodirun/robots/unitree/go2/agent/camera/encoding.py rename to integrations/go2_owner/src/embodirun_go2_owner/camera/encoding.py diff --git a/src/embodirun/robots/unitree/go2/agent/camera/frame_store.py b/integrations/go2_owner/src/embodirun_go2_owner/camera/frame_store.py similarity index 100% rename from src/embodirun/robots/unitree/go2/agent/camera/frame_store.py rename to integrations/go2_owner/src/embodirun_go2_owner/camera/frame_store.py diff --git a/src/embodirun/robots/unitree/go2/agent/camera/http_handler.py b/integrations/go2_owner/src/embodirun_go2_owner/camera/http_handler.py similarity index 78% rename from src/embodirun/robots/unitree/go2/agent/camera/http_handler.py rename to integrations/go2_owner/src/embodirun_go2_owner/camera/http_handler.py index 1a7b27f..aa01c33 100644 --- a/src/embodirun/robots/unitree/go2/agent/camera/http_handler.py +++ b/integrations/go2_owner/src/embodirun_go2_owner/camera/http_handler.py @@ -2,50 +2,24 @@ from __future__ import annotations -import hmac -import json from http import HTTPStatus -from http.server import BaseHTTPRequestHandler -from typing import TYPE_CHECKING, Any, Dict # noqa: UP035 +from typing import TYPE_CHECKING from urllib.parse import urlsplit from .types import CameraStreamError if TYPE_CHECKING: - from .server import CameraHTTPServer + from .capture import CameraCapture -class CameraRequestHandler(BaseHTTPRequestHandler): - server_version = "Go2Camera/2" +class CameraRoutes: + """Camera routes mixed into the unified HTTP handler; owns no server/auth.""" @property - def camera_server(self) -> CameraHTTPServer: + def camera_server(self) -> CameraCapture: return self.server # type: ignore[return-value] - def _send_json( - self, - status: HTTPStatus, - payload: Dict[str, object], # noqa: UP006 - ) -> None: - body = json.dumps(payload, ensure_ascii=False, sort_keys=True).encode("utf-8") - self.send_response(status) - self.send_header("Content-Type", "application/json; charset=utf-8") - self.send_header("Content-Length", str(len(body))) - self.send_header("Cache-Control", "no-store") - self.end_headers() - self.wfile.write(body) - - def _authorized(self) -> bool: - token = self.camera_server.api_token - if not token: - return True - expected = f"Bearer {token}" - return hmac.compare_digest(self.headers.get("Authorization", ""), expected) - - def do_GET(self) -> None: - if not self._authorized(): - self._send_json(HTTPStatus.UNAUTHORIZED, {"error": "unauthorized"}) - return + def serve_camera_get(self) -> None: path = urlsplit(self.path).path routes = { "/health": self._get_health, @@ -53,6 +27,8 @@ def do_GET(self) -> None: "/depth.json": self._get_depth_metadata, "/depth.png": self._get_depth_image, "/observation.json": self._get_observation, + "/observation/rgb.json": self._get_rgb_observation, + "/health/camera": self._get_health, } route = routes.get(path) if route is None: @@ -79,8 +55,7 @@ def _get_health(self) -> None: "observation_ready": depth["observation_ready"], } ) - if not depth["navigation_ready"]: - health["status"] = "degraded" + health["rgb_observation_ready"] = health["status"] == "ok" status = HTTPStatus.OK if health["status"] == "ok" else HTTPStatus.SERVICE_UNAVAILABLE self._send_json(status, health) @@ -149,6 +124,14 @@ def _get_depth_image(self) -> None: self.end_headers() self.wfile.write(depth.depth_png) + def _get_rgb_observation(self) -> None: + try: + observation = self.camera_server.observations.rgb_observation_payload() + except CameraStreamError as error: + self._send_json(HTTPStatus.SERVICE_UNAVAILABLE, {"error": str(error), "available": False}) + return + self._send_json(HTTPStatus.OK, observation) + def _get_observation(self) -> None: try: observation = self.camera_server.observations.observation_payload() @@ -160,9 +143,5 @@ def _get_observation(self) -> None: return self._send_json(HTTPStatus.OK, observation) - def log_message(self, format_string: str, *args: Any) -> None: - if self.camera_server.access_log: - super().log_message(format_string, *args) - -__all__ = ["CameraRequestHandler"] +__all__ = ["CameraRoutes"] diff --git a/src/embodirun/robots/unitree/go2/agent/camera/observation.py b/integrations/go2_owner/src/embodirun_go2_owner/camera/observation.py similarity index 87% rename from src/embodirun/robots/unitree/go2/agent/camera/observation.py rename to integrations/go2_owner/src/embodirun_go2_owner/camera/observation.py index 09d399d..db31fef 100644 --- a/src/embodirun/robots/unitree/go2/agent/camera/observation.py +++ b/integrations/go2_owner/src/embodirun_go2_owner/camera/observation.py @@ -30,6 +30,35 @@ class CameraObservationService: def __init__(self, source: ObservationSource) -> None: self.source = source + def rgb_observation_payload(self) -> Dict[str, object]: # noqa: UP006 + """Return a fresh RGB snapshot without requiring a depth stream.""" + store = self.source.frame_store + frame = store.latest() + health = store.health(self.source.max_frame_age) + profile = health.get("rgb_profile") + if frame is None or health["status"] != "ok" or not isinstance(profile, dict): + raise CameraStreamError("RGB capture is not ready") + age = store.frame_age(frame) + if age > self.source.max_frame_age: + raise CameraStreamError("RGB frame is stale") + if not (frame.jpeg.startswith(b"\xff\xd8") and frame.jpeg.endswith(b"\xff\xd9")): + raise CameraStreamError("RGB payload is not a complete JPEG") + if any(type(profile.get(key)) is not int or profile[key] <= 0 for key in ("width", "height")): + raise CameraStreamError("RGB dimensions are invalid") + return { + "sequence": frame.sequence, + "captured_at_unix": frame.captured_at_unix, + "frame_age_s": age, + "observation_ready": True, + "rgb": { + "sequence": frame.sequence, + "media_type": "image/jpeg", + "width": profile["width"], + "height": profile["height"], + "data_url": "data:image/jpeg;base64," + base64.b64encode(frame.jpeg).decode("ascii"), + }, + } + def depth_payload(self) -> Dict[str, object]: # noqa: UP006 source = self.source rgb_health = source.frame_store.health(source.max_frame_age) @@ -210,6 +239,7 @@ def observation_payload(self) -> Dict[str, object]: # noqa: UP006 return { "sequence": sequence, "captured_at_unix": frame.captured_at_unix, + "frame_age_s": self.source.frame_store.frame_age(frame), "source_frame_number": frame.source_frame_number, "source_timestamp_ms": frame.source_timestamp_ms, "pair_sequence_matched": True, diff --git a/src/embodirun/robots/unitree/go2/agent/camera/pipe_io.py b/integrations/go2_owner/src/embodirun_go2_owner/camera/pipe_io.py similarity index 100% rename from src/embodirun/robots/unitree/go2/agent/camera/pipe_io.py rename to integrations/go2_owner/src/embodirun_go2_owner/camera/pipe_io.py diff --git a/src/embodirun/robots/unitree/go2/agent/camera/realsense.py b/integrations/go2_owner/src/embodirun_go2_owner/camera/realsense.py similarity index 98% rename from src/embodirun/robots/unitree/go2/agent/camera/realsense.py rename to integrations/go2_owner/src/embodirun_go2_owner/camera/realsense.py index b9e8add..32c3ce1 100644 --- a/src/embodirun/robots/unitree/go2/agent/camera/realsense.py +++ b/integrations/go2_owner/src/embodirun_go2_owner/camera/realsense.py @@ -96,6 +96,10 @@ def stop(self) -> None: pipeline = self._pipeline self._stop_pipeline(pipeline) + def is_alive(self) -> bool: + """Allow the owner to detect incomplete worker shutdown.""" + return self._thread is not None and self._thread.is_alive() + def join(self, timeout: Optional[float] = None) -> None: # noqa: UP045 if self._thread is not None: self._thread.join(timeout=timeout) diff --git a/src/embodirun/robots/unitree/go2/agent/camera/realsense_pipeline.py b/integrations/go2_owner/src/embodirun_go2_owner/camera/realsense_pipeline.py similarity index 100% rename from src/embodirun/robots/unitree/go2/agent/camera/realsense_pipeline.py rename to integrations/go2_owner/src/embodirun_go2_owner/camera/realsense_pipeline.py diff --git a/src/embodirun/robots/unitree/go2/agent/camera/realsense_validation.py b/integrations/go2_owner/src/embodirun_go2_owner/camera/realsense_validation.py similarity index 100% rename from src/embodirun/robots/unitree/go2/agent/camera/realsense_validation.py rename to integrations/go2_owner/src/embodirun_go2_owner/camera/realsense_validation.py diff --git a/integrations/go2_owner/src/embodirun_go2_owner/camera/settings.py b/integrations/go2_owner/src/embodirun_go2_owner/camera/settings.py new file mode 100644 index 0000000..a63ec84 --- /dev/null +++ b/integrations/go2_owner/src/embodirun_go2_owner/camera/settings.py @@ -0,0 +1,124 @@ +"""Validated settings for the Go2 camera service.""" + +from __future__ import annotations + +import math +import re +from dataclasses import dataclass, fields +from typing import Optional + + +@dataclass(frozen=True) +class CameraServiceConfig: + backend: str = "v4l2" + serial: Optional[str] = None # noqa: UP045 + width: int = 640 + height: int = 480 + fps: int = 15 + device: str = "/dev/video4" + warmup_frames: int = 10 + jpeg_quality: int = 85 + jpeg_fps: float = 5.0 + retry_delay: float = 2.0 + frame_timeout: float = 2.0 + format_timeout: float = 5.0 + max_frame_age: float = 2.0 + depth_device: str = "/dev/video0" + depth_width: int = 640 + depth_height: int = 480 + depth_warmup_frames: int = 10 + depth_scale: Optional[float] = None # noqa: UP045 + depth_calibrated: bool = False + rgb_depth_alignment_claimed: bool = False + depth_fps: float = 10.0 + max_depth_age: float = 0.5 + max_depth_m: float = 10.0 + + @classmethod + def from_mapping(cls, value: dict) -> CameraServiceConfig: + """Read component settings without a second server or environment parser.""" + if not isinstance(value, dict): + raise ValueError("camera must be an object or null") + options = dict(value) + profile = options.pop("profile", "640x480@15") + match = re.fullmatch(r"(\d+)x(\d+)@(\d+)", profile) if isinstance(profile, str) else None + if match is None: + raise ValueError("camera.profile must have the form WIDTHxHEIGHT@FPS") + width, height, fps = map(int, match.groups()) + for key, number in ( + ("width", width), + ("height", height), + ("fps", fps), + ("depth_width", width), + ("depth_height", height), + ): + options.setdefault(key, number) + if set(options) - {field.name for field in fields(cls)}: + raise ValueError("unknown camera option; configure the shared endpoint in server") + config = cls(**options) + config.validate() + return config + + @property + def profile(self) -> str: + return f"{self.width}x{self.height}@{self.fps}" + + @property + def initial_device(self) -> str: + if self.backend != "realsense": + return self.device + return "realsense" if not self.serial else f"realsense:{self.serial}" + + def validate(self) -> None: + if self.backend not in {"v4l2", "realsense"}: + raise ValueError("backend must be v4l2 or realsense") + for name in ("width", "height", "fps", "depth_width", "depth_height", "jpeg_quality"): + number = getattr(self, name) + if type(number) is not int or number <= 0: + raise ValueError(f"camera.{name} must be a positive integer") + for name in ("warmup_frames", "depth_warmup_frames"): + if type(getattr(self, name)) is not int or getattr(self, name) < 0: + raise ValueError(f"camera.{name} must be a non-negative integer") + for name in ( + "jpeg_fps", + "retry_delay", + "frame_timeout", + "format_timeout", + "max_frame_age", + "depth_fps", + "max_depth_age", + "max_depth_m", + "depth_scale", + ): + number = getattr(self, name) + if name == "depth_scale" and number is None: + continue + if type(number) not in (int, float) or not math.isfinite(number) or number <= 0: + raise ValueError(f"camera.{name} must be finite and positive") + for name in ("depth_calibrated", "rgb_depth_alignment_claimed"): + if type(getattr(self, name)) is not bool: + raise ValueError(f"camera.{name} must be boolean") + for name in ("device", "depth_device"): + if not isinstance(getattr(self, name), str) or not getattr(self, name): + raise ValueError(f"camera.{name} must be a device path") + if self.serial is not None and (not isinstance(self.serial, str) or not self.serial): + raise ValueError("camera.serial must be a non-empty string") + if self.width % 2: + raise ValueError("width must be even for packed YUYV diagnostics") + if self.warmup_frames < 0 or self.depth_warmup_frames < 0: + raise ValueError("warmup frame counts must be non-negative") + if not 1 <= self.jpeg_quality <= 100: + raise ValueError("jpeg quality must be between 1 and 100") + if self.depth_calibrated and self.depth_scale is None: + raise ValueError("depth calibration requires an explicit depth scale") + if self.depth_scale is not None and not self.depth_calibrated: + raise ValueError("depth scale requires explicit depth calibration") + if self.rgb_depth_alignment_claimed and not self.depth_calibrated: + raise ValueError("RGB-depth alignment claim requires depth calibration") + if self.backend == "realsense" and not self.depth_calibrated: + raise ValueError("realsense backend requires explicit depth calibration") + if self.backend == "realsense" and (self.width != self.depth_width or self.height != self.depth_height): + raise ValueError("realsense backend requires matching RGB/depth dimensions") + + +__all__ = ["CameraServiceConfig"] diff --git a/src/embodirun/robots/unitree/go2/agent/camera/store_validation.py b/integrations/go2_owner/src/embodirun_go2_owner/camera/store_validation.py similarity index 100% rename from src/embodirun/robots/unitree/go2/agent/camera/store_validation.py rename to integrations/go2_owner/src/embodirun_go2_owner/camera/store_validation.py diff --git a/src/embodirun/robots/unitree/go2/agent/camera/types.py b/integrations/go2_owner/src/embodirun_go2_owner/camera/types.py similarity index 100% rename from src/embodirun/robots/unitree/go2/agent/camera/types.py rename to integrations/go2_owner/src/embodirun_go2_owner/camera/types.py diff --git a/src/embodirun/robots/unitree/go2/agent/camera/v4l2.py b/integrations/go2_owner/src/embodirun_go2_owner/camera/v4l2.py similarity index 100% rename from src/embodirun/robots/unitree/go2/agent/camera/v4l2.py rename to integrations/go2_owner/src/embodirun_go2_owner/camera/v4l2.py diff --git a/src/embodirun/robots/unitree/go2/agent/camera/v4l2_format.py b/integrations/go2_owner/src/embodirun_go2_owner/camera/v4l2_format.py similarity index 100% rename from src/embodirun/robots/unitree/go2/agent/camera/v4l2_format.py rename to integrations/go2_owner/src/embodirun_go2_owner/camera/v4l2_format.py diff --git a/src/embodirun/robots/unitree/go2/agent/camera/workers.py b/integrations/go2_owner/src/embodirun_go2_owner/camera/workers.py similarity index 95% rename from src/embodirun/robots/unitree/go2/agent/camera/workers.py rename to integrations/go2_owner/src/embodirun_go2_owner/camera/workers.py index 114ca2e..9cd9d62 100644 --- a/src/embodirun/robots/unitree/go2/agent/camera/workers.py +++ b/integrations/go2_owner/src/embodirun_go2_owner/camera/workers.py @@ -59,6 +59,10 @@ def stop(self) -> None: if source is not None: source.close() + def is_alive(self) -> bool: + """Allow the owner to detect incomplete worker shutdown.""" + return self._thread is not None and self._thread.is_alive() + def join(self, timeout: Optional[float] = None) -> None: # noqa: UP045 if self._thread is not None: self._thread.join(timeout=timeout) @@ -152,6 +156,10 @@ def stop(self) -> None: if source is not None: source.close() + def is_alive(self) -> bool: + """Allow the owner to detect incomplete worker shutdown.""" + return self._thread is not None and self._thread.is_alive() + def join(self, timeout: Optional[float] = None) -> None: # noqa: UP045 if self._thread is not None: self._thread.join(timeout=timeout) diff --git a/integrations/go2_owner/src/embodirun_go2_owner/cli.py b/integrations/go2_owner/src/embodirun_go2_owner/cli.py new file mode 100644 index 0000000..f15f8eb --- /dev/null +++ b/integrations/go2_owner/src/embodirun_go2_owner/cli.py @@ -0,0 +1,45 @@ +"""Start the Go2 hardware owner from one configuration file.""" + +from __future__ import annotations + +import argparse +import json +import sys +from pathlib import Path + +from .config import OwnerConfig +from .control.sdk_loader import ensure_cyclonedds_library_dir +from .runtime import Go2Owner +from .server import serve + + +def main(argv=None) -> int: + """Validate before loading native libraries; never infer motion readiness.""" + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--config", type=Path, required=True) + parser.add_argument("--operator-ready", action="store_true") + parser.add_argument("--validate", action="store_true", help="check configuration without hardware access") + args = parser.parse_args(argv) + try: + config = OwnerConfig.load(args.config, operator_ready=args.operator_ready) + if args.validate: + print( + json.dumps( + { + "valid": True, + "endpoint": f"http://{config.host}:{config.port}", + "camera": config.camera is not None, + "motion_enabled": False, + } + ) + ) + return 0 + if config.control.mode == "live": + ensure_cyclonedds_library_dir(config.control.cyclonedds_lib_dir, reexec_args=argv) + serve(Go2Owner(config)) + except KeyboardInterrupt: + return 130 + except (OSError, RuntimeError, ValueError, TypeError) as error: + print(f"Go2 owner failed: {error}", file=sys.stderr) + return 1 + return 0 diff --git a/integrations/go2_owner/src/embodirun_go2_owner/config.py b/integrations/go2_owner/src/embodirun_go2_owner/config.py new file mode 100644 index 0000000..4024967 --- /dev/null +++ b/integrations/go2_owner/src/embodirun_go2_owner/config.py @@ -0,0 +1,91 @@ +"""Strict JSON configuration shared by the owner's control and camera components.""" + +from __future__ import annotations + +import ipaddress +import json +import os +from dataclasses import dataclass +from pathlib import Path +from typing import Optional + +from .camera.settings import CameraServiceConfig +from .control.config import ControlConfig + + +def is_loopback_bind(host: str) -> bool: + candidate = host.strip().lower() + if candidate == "localhost": + return True + if candidate.startswith("[") and candidate.endswith("]"): + candidate = candidate[1:-1] + try: + return ipaddress.ip_address(candidate).is_loopback + except ValueError: + return False + + +def validate_bind_token(host: str, token: Optional[str]) -> None: # noqa: UP045 + """Require a strong bearer token when exposing the service off-host.""" + + if token is not None: + try: + token.encode("ascii") + except UnicodeEncodeError as error: + raise ValueError("owner token must contain only ASCII characters") from error + if len(token) < 32: + raise ValueError("owner token must contain at least 32 characters") + if token.strip() != token or any(character.isspace() for character in token): + raise ValueError("owner token must not contain whitespace") + if not is_loopback_bind(host) and token is None: + raise ValueError("owner token is required when binding beyond localhost") + + +@dataclass(frozen=True) +class OwnerConfig: + """One endpoint and credential; operator readiness is a process flag only.""" + + host: str + port: int + token: str | None + control: ControlConfig + camera: CameraServiceConfig | None + + @classmethod + def load(cls, path: Path, *, operator_ready: bool = False) -> OwnerConfig: + """Resolve configuration without opening SDKs, sockets or camera devices.""" + value = json.loads(path.read_text()) + if not isinstance(value, dict) or set(value) - {"server", "control", "camera"}: + raise ValueError("owner configuration accepts only server, control and camera") + if not isinstance(value.get("server", {}), dict) or not isinstance(value.get("control", {}), dict): + raise ValueError("server and control must be objects") + server = dict(value.get("server", {})) + if set(server) - {"host", "port", "token_env"}: + raise ValueError("unknown owner server option") + host, port = server.get("host", "127.0.0.1"), server.get("port", 8080) + if not isinstance(host, str) or not host.strip(): + raise ValueError("server.host must be a non-empty string") + if type(port) is not int or not 1 <= port <= 65535: + raise ValueError("server.port must be an integer between 1 and 65535") + token_name = server.get("token_env", "GO2_API_TOKEN") + if not isinstance(token_name, str) or not token_name: + raise ValueError("server.token_env must name an environment variable") + token = os.environ.get(token_name) + validate_bind_token(host, token) + control = dict(value.get("control", {})) + allowed = {"mode", "interface", "state_topic", "cyclonedds_lib_dir", "rpc_timeout_s"} + if set(control) - allowed: + raise ValueError("unknown control option; readiness must be supplied as --operator-ready") + control_config = ControlConfig( + mode=control.get("mode", "dry-run"), + interface=control.get("interface"), + state_topic=control.get("state_topic", "rt/lf/sportmodestate"), + cyclonedds_lib_dir=control.get("cyclonedds_lib_dir"), + rpc_timeout_s=control.get("rpc_timeout_s", 2.0), + operator_ready=operator_ready, + ) + camera = value.get("camera") + camera_config = None + if camera is not None: + camera_config = CameraServiceConfig.from_mapping(camera) + return cls(host, port, token, control_config, camera_config) diff --git a/integrations/go2_owner/src/embodirun_go2_owner/control/__init__.py b/integrations/go2_owner/src/embodirun_go2_owner/control/__init__.py new file mode 100644 index 0000000..3db68b7 --- /dev/null +++ b/integrations/go2_owner/src/embodirun_go2_owner/control/__init__.py @@ -0,0 +1 @@ +"""SDK2 ownership, admission and bounded motion execution.""" diff --git a/src/embodirun/robots/unitree/go2/agent/control/admission.py b/integrations/go2_owner/src/embodirun_go2_owner/control/admission.py similarity index 93% rename from src/embodirun/robots/unitree/go2/agent/control/admission.py rename to integrations/go2_owner/src/embodirun_go2_owner/control/admission.py index 2ffb2b3..43a2c43 100644 --- a/src/embodirun/robots/unitree/go2/agent/control/admission.py +++ b/integrations/go2_owner/src/embodirun_go2_owner/control/admission.py @@ -35,6 +35,7 @@ class MotionUpdate: vx: float vy: float yaw_rate: float + remaining_s: float | None = None def require_action(payload: dict[str, Any]) -> str: @@ -120,7 +121,11 @@ def admit_motion_update(payload: dict[str, Any]) -> MotionUpdate: _check_range("vx", vx, -MAX_LINEAR_SPEED_MPS, MAX_LINEAR_SPEED_MPS) _check_range("vy", vy, -MAX_LINEAR_SPEED_MPS, MAX_LINEAR_SPEED_MPS) _check_range("yaw_rate", yaw_rate, -MAX_YAW_RATE_RPS, MAX_YAW_RATE_RPS) - return MotionUpdate(action_id, vx, vy, yaw_rate) + remaining = None + if "remaining_s" in payload: + remaining = require_number(payload, "remaining_s") + _check_range("remaining_s", remaining, 0.05, MAX_MOTION_DURATION_S) + return MotionUpdate(action_id, vx, vy, yaw_rate, remaining) __all__ = [ diff --git a/src/embodirun/robots/unitree/go2/agent/control/config.py b/integrations/go2_owner/src/embodirun_go2_owner/control/config.py similarity index 73% rename from src/embodirun/robots/unitree/go2/agent/control/config.py rename to integrations/go2_owner/src/embodirun_go2_owner/control/config.py index 132fed6..9119ea0 100644 --- a/src/embodirun/robots/unitree/go2/agent/control/config.py +++ b/integrations/go2_owner/src/embodirun_go2_owner/control/config.py @@ -6,7 +6,7 @@ from dataclasses import dataclass from typing import Literal -from ...profile import MAX_LINEAR_SPEED_MPS, MAX_YAW_RATE_RPS +from ..profile import MAX_LINEAR_SPEED_MPS, MAX_YAW_RATE_RPS MAX_MOVE_DISTANCE_M = 1.0 MAX_TURN_ANGLE_RAD = math.pi / 2 @@ -24,8 +24,8 @@ @dataclass(frozen=True) -class ControlServerConfig: - """Fully resolved process configuration. +class ControlConfig: + """Validated motor component configuration. Deployment-specific values are supplied by the CLI/environment. This object intentionally contains no SSH credentials: it runs on the robot @@ -33,29 +33,26 @@ class ControlServerConfig: """ mode: Literal["dry-run", "live"] - host: str - port: int interface: str | None state_topic: str cyclonedds_lib_dir: str | None - token: str | None operator_ready: bool rpc_timeout_s: float = 2.0 def __post_init__(self) -> None: if self.mode not in {"dry-run", "live"}: raise ValueError("mode must be 'dry-run' or 'live'") - if not self.host: - raise ValueError("host must not be empty") - if isinstance(self.port, bool) or not 1 <= self.port <= 65535: - raise ValueError("port must be between 1 and 65535") - if not self.state_topic: + if not isinstance(self.state_topic, str) or not self.state_topic: raise ValueError("state_topic must not be empty") - if not math.isfinite(self.rpc_timeout_s) or self.rpc_timeout_s <= 0.0: + if ( + type(self.rpc_timeout_s) not in (int, float) + or not math.isfinite(self.rpc_timeout_s) + or self.rpc_timeout_s <= 0.0 + ): raise ValueError("rpc_timeout_s must be finite and positive") - if self.mode == "live" and not self.interface: + if self.mode == "live" and (not isinstance(self.interface, str) or not self.interface): raise ValueError("live mode requires a DDS network interface") - if self.mode == "live" and not self.cyclonedds_lib_dir: + if self.mode == "live" and (not isinstance(self.cyclonedds_lib_dir, str) or not self.cyclonedds_lib_dir): raise ValueError("live mode requires a CycloneDDS library directory") @@ -75,5 +72,5 @@ def __post_init__(self) -> None: "STATE_MAX_AGE_S", "STREAM_HEARTBEAT_TIMEOUT_S", "WORKER_STOP_JOIN_TIMEOUT_S", - "ControlServerConfig", + "ControlConfig", ] diff --git a/src/embodirun/robots/unitree/go2/agent/control/executor.py b/integrations/go2_owner/src/embodirun_go2_owner/control/executor.py similarity index 81% rename from src/embodirun/robots/unitree/go2/agent/control/executor.py rename to integrations/go2_owner/src/embodirun_go2_owner/control/executor.py index 7be9825..5a87a5e 100644 --- a/src/embodirun/robots/unitree/go2/agent/control/executor.py +++ b/integrations/go2_owner/src/embodirun_go2_owner/control/executor.py @@ -72,6 +72,7 @@ def snapshot(self) -> dict[str, Any]: return { "transport": self.transport.name, "operator_motion_ready": operator_motion_ready, + "capabilities": {"stream_lease_renewal": True, "stream_lease_release": True}, "closing": closing, "robot_state_available": state is not None, "robot_state_fresh": state_age_s is not None and state_age_s <= STATE_MAX_AGE_S, @@ -93,6 +94,11 @@ def execute(self, payload: dict[str, Any]) -> tuple[int, dict[str, Any]]: action = require_action(payload) if action == "stop": return HTTPStatus.OK, self.stop("api_stop") + if action == "release_move": + action_id = payload.get("action_id") + if not isinstance(action_id, str) or not action_id.strip(): + raise ApiError(HTTPStatus.BAD_REQUEST, "release_move requires action_id") + return HTTPStatus.OK, self.release_move(action_id) if action in self.POSTURE_ACTIONS: return HTTPStatus.OK, self._execute_posture(action) if action == "update_move": @@ -190,9 +196,40 @@ def _motion_worker(self, lease: MotionLease) -> None: ) with self._lock: self._last_result = result + if result["status"] == "failed": + self.operator_motion_ready = False if self._active is lease: self._active = None + def release_move(self, action_id: str) -> dict[str, Any]: + """Stop this stream lease while preserving an existing healthy attestation. + + This cannot re-arm the owner or interrupt another controller's action. + The last completed lease is accepted so a client can release after its + bounded lease has already expired normally. + """ + with self._lifecycle_lock: + self._require_not_closing() + with self._lock: + lease = self._active + target = lease.snapshot() if lease is not None else self._last_result + if not target or target["id"] != action_id or target["action"] != "stream_move": + raise ApiError(HTTPStatus.CONFLICT, "action_id does not own the current stream lease") + result = self._cancel_and_stop_locked("lease_release") + try: + if not result["stopped"]: + raise ApiError(HTTPStatus.SERVICE_UNAVAILABLE, "could not confirm stream lease stop") + with self._lock: + finished = self._last_result + if not finished or finished["id"] != action_id or finished["status"] == "failed": + raise ApiError(HTTPStatus.SERVICE_UNAVAILABLE, "stream lease did not finish safely") + self._require_motion_ready() + except Exception: + with self._lock: + self.operator_motion_ready = False + raise + return {**result, "accepted": True, "action_id": action_id, "operator_motion_ready": True} + def _cancel_and_stop_locked(self, reason: str) -> dict[str, Any]: with self._lock: active_id = self._active.id if self._active else None diff --git a/src/embodirun/robots/unitree/go2/agent/control/http.py b/integrations/go2_owner/src/embodirun_go2_owner/control/http.py similarity index 79% rename from src/embodirun/robots/unitree/go2/agent/control/http.py rename to integrations/go2_owner/src/embodirun_go2_owner/control/http.py index 279e212..d20516f 100644 --- a/src/embodirun/robots/unitree/go2/agent/control/http.py +++ b/integrations/go2_owner/src/embodirun_go2_owner/control/http.py @@ -8,26 +8,13 @@ from http.server import BaseHTTPRequestHandler from typing import Any, ClassVar -from .config import MAX_REQUEST_BYTES, MIN_EXTERNAL_TOKEN_CHARS +from .config import MAX_REQUEST_BYTES from .executor import ActionExecutor from .types import ApiError -def valid_api_token_for_bind(host: str, token: str | None) -> bool: - """Require a non-trivial bearer token on every non-loopback bind.""" - - if host in {"127.0.0.1", "::1", "localhost"}: - return True - return ( - token is not None - and len(token) >= MIN_EXTERNAL_TOKEN_CHARS - and token.strip() == token - and not any(character.isspace() for character in token) - ) - - class Go2RequestHandler(BaseHTTPRequestHandler): - """Request handler configured per server via :func:`make_request_handler`.""" + """Control protocol routes; the owner supplies executor and authentication.""" executor: ClassVar[ActionExecutor] api_token: ClassVar[str | None] = None @@ -117,18 +104,4 @@ def do_POST(self) -> None: self._send_json(HTTPStatus.INTERNAL_SERVER_ERROR, {"error": str(exc)}) -def make_request_handler( - executor: ActionExecutor, - token: str | None, -) -> type[Go2RequestHandler]: - """Bind executor/token without sharing mutable globals across servers.""" - - class BoundGo2RequestHandler(Go2RequestHandler): - pass - - BoundGo2RequestHandler.executor = executor - BoundGo2RequestHandler.api_token = token - return BoundGo2RequestHandler - - -__all__ = ["Go2RequestHandler", "make_request_handler", "valid_api_token_for_bind"] +__all__ = ["Go2RequestHandler"] diff --git a/src/embodirun/robots/unitree/go2/agent/control/lease.py b/integrations/go2_owner/src/embodirun_go2_owner/control/lease.py similarity index 85% rename from src/embodirun/robots/unitree/go2/agent/control/lease.py rename to integrations/go2_owner/src/embodirun_go2_owner/control/lease.py index 6535106..b0c8dab 100644 --- a/src/embodirun/robots/unitree/go2/agent/control/lease.py +++ b/integrations/go2_owner/src/embodirun_go2_owner/control/lease.py @@ -29,6 +29,8 @@ def __init__(self, admission: MotionAdmission) -> None: self.started_at_unix = time.time() self.updated_at_unix: float | None = None self.heartbeat_at_monotonic: float | None = time.monotonic() if self.action == "stream_move" else None + self._deadline: float | None = None + self._finished = False def snapshot(self) -> dict[str, Any]: with self._lock: @@ -50,6 +52,15 @@ def update(self, update: MotionUpdate) -> dict[str, Any]: raise ApiError(HTTPStatus.CONFLICT, "action_id is not active") if self.action not in {"move", "stream_move"}: raise ApiError(HTTPStatus.CONFLICT, "only a timed move can be updated") + now = time.monotonic() + if self._finished or self.stop_event.is_set() or (self._deadline is not None and now >= self._deadline): + raise ApiError(HTTPStatus.CONFLICT, "motion lease has expired or stopped") + if self.action == "stream_move" and self._heartbeat_expired(): + raise ApiError(HTTPStatus.CONFLICT, "stream heartbeat expired") + if update.remaining_s is not None: + if self.action != "stream_move": + raise ApiError(HTTPStatus.CONFLICT, "only stream_move permits deadline renewal") + self._deadline = now + update.remaining_s self._parameters.update( vx=update.vx, vy=update.vy, @@ -102,6 +113,9 @@ def run( status = "completed" detail = "target reached" started = time.monotonic() + with self._lock: + if self._deadline is None: + self._deadline = started + self._parameter("duration_s") start_state: RobotState | None = None previous_yaw = 0.0 accumulated_yaw = 0.0 @@ -111,8 +125,11 @@ def run( start_state = require_ready() previous_yaw = start_state.yaw while not self.stop_event.is_set(): - elapsed = time.monotonic() - started - if elapsed >= self._parameter("duration_s"): + with self._lock: + expired = time.monotonic() >= self._deadline + if expired: + self._finished = True + if expired: if self.action in {"move_distance", "turn"}: status, detail = "failed", "safety timeout before target" else: @@ -150,15 +167,17 @@ def run( status, detail = "failed", f"SDK Move returned code {code}" break self.stop_event.wait(CONTROL_PERIOD_S) - if self.stop_event.is_set(): + if self.stop_event.is_set() and status == "completed": status, detail = "cancelled", "stop requested" except Exception as exc: # noqa: BLE001 - lease must always reach StopMove status, detail = "failed", str(exc) finally: + with self._lock: + self._finished = True try: with command_lock: code = transport.stop() - if code != 0 and status == "completed": + if code != 0: status, detail = "failed", f"SDK StopMove returned code {code}" except Exception as exc: # noqa: BLE001 - report final safety-stop failure status, detail = "failed", f"stop failed: {exc}" diff --git a/src/embodirun/robots/unitree/go2/agent/control/sdk2.py b/integrations/go2_owner/src/embodirun_go2_owner/control/sdk2.py similarity index 100% rename from src/embodirun/robots/unitree/go2/agent/control/sdk2.py rename to integrations/go2_owner/src/embodirun_go2_owner/control/sdk2.py diff --git a/src/embodirun/robots/unitree/go2/agent/control/sdk_loader.py b/integrations/go2_owner/src/embodirun_go2_owner/control/sdk_loader.py similarity index 98% rename from src/embodirun/robots/unitree/go2/agent/control/sdk_loader.py rename to integrations/go2_owner/src/embodirun_go2_owner/control/sdk_loader.py index 560c720..91ef907 100644 --- a/src/embodirun/robots/unitree/go2/agent/control/sdk_loader.py +++ b/integrations/go2_owner/src/embodirun_go2_owner/control/sdk_loader.py @@ -7,7 +7,7 @@ from typing import Any UNSAFE_ICEORYX_PUBLISH_SYMBOL = b"iox_pub_publish_chunk" -CONTROL_MODULE = "embodirun.robots.unitree.go2.agent.control" +CONTROL_MODULE = "embodirun_go2_owner" def loaded_dds_library_path() -> str | None: diff --git a/src/embodirun/robots/unitree/go2/agent/control/sdk_owner.py b/integrations/go2_owner/src/embodirun_go2_owner/control/sdk_owner.py similarity index 100% rename from src/embodirun/robots/unitree/go2/agent/control/sdk_owner.py rename to integrations/go2_owner/src/embodirun_go2_owner/control/sdk_owner.py diff --git a/src/embodirun/robots/unitree/go2/agent/control/sdk_state.py b/integrations/go2_owner/src/embodirun_go2_owner/control/sdk_state.py similarity index 100% rename from src/embodirun/robots/unitree/go2/agent/control/sdk_state.py rename to integrations/go2_owner/src/embodirun_go2_owner/control/sdk_state.py diff --git a/src/embodirun/robots/unitree/go2/agent/control/state_guard.py b/integrations/go2_owner/src/embodirun_go2_owner/control/state_guard.py similarity index 100% rename from src/embodirun/robots/unitree/go2/agent/control/state_guard.py rename to integrations/go2_owner/src/embodirun_go2_owner/control/state_guard.py diff --git a/src/embodirun/robots/unitree/go2/agent/control/transport.py b/integrations/go2_owner/src/embodirun_go2_owner/control/transport.py similarity index 100% rename from src/embodirun/robots/unitree/go2/agent/control/transport.py rename to integrations/go2_owner/src/embodirun_go2_owner/control/transport.py diff --git a/src/embodirun/robots/unitree/go2/agent/control/types.py b/integrations/go2_owner/src/embodirun_go2_owner/control/types.py similarity index 100% rename from src/embodirun/robots/unitree/go2/agent/control/types.py rename to integrations/go2_owner/src/embodirun_go2_owner/control/types.py diff --git a/integrations/go2_owner/src/embodirun_go2_owner/profile.py b/integrations/go2_owner/src/embodirun_go2_owner/profile.py new file mode 100644 index 0000000..609d0ca --- /dev/null +++ b/integrations/go2_owner/src/embodirun_go2_owner/profile.py @@ -0,0 +1,6 @@ +"""Unitree Go2 hardware motion bounds shared by host and resident control code.""" + +MAX_LINEAR_SPEED_MPS = 0.35 +MAX_YAW_RATE_RPS = 0.7 + +__all__ = ["MAX_LINEAR_SPEED_MPS", "MAX_YAW_RATE_RPS"] diff --git a/integrations/go2_owner/src/embodirun_go2_owner/runtime.py b/integrations/go2_owner/src/embodirun_go2_owner/runtime.py new file mode 100644 index 0000000..7f98d30 --- /dev/null +++ b/integrations/go2_owner/src/embodirun_go2_owner/runtime.py @@ -0,0 +1,74 @@ +"""One lifecycle owner for motor control and independently scheduled capture.""" + +from __future__ import annotations + +import threading + +from .camera.capture import build_capture +from .config import OwnerConfig +from .control.executor import ActionExecutor +from .control.sdk2 import UnitreeTransport +from .control.transport import DryRunTransport + + +class Go2Owner: + """Keep StopMove independent of camera capture, encoding and HTTP readers.""" + + def __init__(self, config: OwnerConfig, *, transport=None, camera=None) -> None: + self.config = config + self._close_lock = threading.Lock() + self._closed = False + control = config.control + if transport is None: + transport = ( + UnitreeTransport( + control.interface, + control.state_topic, + rpc_timeout_s=control.rpc_timeout_s, + required_dds_lib_dir=control.cyclonedds_lib_dir, + ) + if control.mode == "live" + else DryRunTransport() + ) + self.executor = ActionExecutor(transport, operator_motion_ready=control.operator_ready) + try: + self.camera = camera if camera is not None else (build_capture(config.camera) if config.camera else None) + except BaseException: + self.executor.close() + raise + + def start(self) -> None: + """Start camera workers; motor authority remains unchanged.""" + try: + if self.camera is not None: + self.camera.start() + except BaseException: + self.close() + raise + + def health(self) -> dict: + """Expose component health without conflating RGB readiness with depth.""" + control = self.executor.snapshot() + camera = self.camera.frame_store.health(self.camera.max_frame_age) if self.camera else None + return { + "ok": not self._closed and control["robot_state_fresh"] and (camera is None or camera["status"] == "ok"), + "control": control, + "camera": camera, + "capabilities": { + "control": True, + "rgb": self.camera is not None, + "rgbd": self.camera is not None and self.camera.depth_store is not None, + }, + } + + def close(self) -> None: + """Revoke motion and stop the SDK before waiting for camera shutdown.""" + with self._close_lock: + if self._closed: + return + self._closed = True + try: + self.executor.close() + finally: + if self.camera is not None: + self.camera.close() diff --git a/integrations/go2_owner/src/embodirun_go2_owner/server.py b/integrations/go2_owner/src/embodirun_go2_owner/server.py new file mode 100644 index 0000000..49c1725 --- /dev/null +++ b/integrations/go2_owner/src/embodirun_go2_owner/server.py @@ -0,0 +1,91 @@ +"""Single authenticated HTTP endpoint for the Go2 owner's components.""" + +from __future__ import annotations + +import signal +import threading +from http.server import ThreadingHTTPServer +from urllib.parse import urlsplit + +from .camera.http_handler import CameraRoutes +from .control.http import Go2RequestHandler + + +class OwnerRequestHandler(Go2RequestHandler, CameraRoutes): + """Compose existing wire protocols behind one endpoint and credential.""" + + @property + def executor(self): + return self.server.owner.executor + + @property + def api_token(self): + return self.server.owner.config.token + + @property + def camera_server(self): + return self.server.owner.camera + + def do_GET(self) -> None: + if not self._check_auth(): + return + path = urlsplit(self.path).path + if path == "/health": + payload = self.server.owner.health() + self._send_json(200 if payload["ok"] else 503, payload) + elif path == "/v1/state": + self._send_json(200, self.executor.snapshot()) + elif self.camera_server is None: + self._send_json(404, {"error": "camera is not configured"}) + else: + self.serve_camera_get() + + def log_message(self, fmt, *args) -> None: + """Do not log every heartbeat or encoded frame request.""" + + +class OwnerHTTPServer(ThreadingHTTPServer): + """Keep camera response work separate from bounded control requests.""" + + daemon_threads = True + + def __init__(self, owner): + self.owner = owner + super().__init__((owner.config.host, owner.config.port), OwnerRequestHandler) + + +def serve(owner, *, install_signal_handlers: bool = True) -> None: + """Bind first, start capture, and stop motors before closing camera workers.""" + server = None + stopping = threading.Event() + previous = {} + + def shutdown(signum, frame): + if stopping.is_set(): + return + stopping.set() + + def stop_and_shutdown(): + try: + owner.executor.stop("signal") + finally: + server.shutdown() + + threading.Thread(target=stop_and_shutdown, daemon=True, name="go2-stop").start() + + try: + server = OwnerHTTPServer(owner) + owner.start() + if install_signal_handlers: + for signum in (signal.SIGINT, signal.SIGTERM): + previous[signum] = signal.signal(signum, shutdown) + print(f"Go2 owner listening on http://{owner.config.host}:{owner.config.port}", flush=True) + server.serve_forever(poll_interval=0.2) + finally: + try: + owner.close() + finally: + if server is not None: + server.server_close() + for signum, handler in previous.items(): + signal.signal(signum, handler) diff --git a/mkdocs.yml b/mkdocs.yml index f294a91..d352b66 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -57,6 +57,7 @@ nav: - Agent execution workflow: agent-workflow.md - RPent integration: rpent-integration.md - π0.5 with two SO-101: pi05-bi-so101.md + - Go2 ActiveVLN deployment: go2-activevln.md - Concepts: - Architecture: architecture.md - Runtime responsibilities and costs: runtime-value.md @@ -74,6 +75,7 @@ nav: - Scenarios: - VLA — SO-101 grasping: demos/so101-grasping.md - VLN — MicroDuck navigation: demos/microduck-vln.md + - VLN — Go2 ActiveVLN: demos/go2-activevln.md - Agent — XLeRobot delivery: demos/xlerobot-snack-delivery.md - Multi-robot Recipe: demos/multi-robot-serving.md - Project: diff --git a/mkdocs.zh.yml b/mkdocs.zh.yml index f76a37c..6dabe94 100644 --- a/mkdocs.zh.yml +++ b/mkdocs.zh.yml @@ -70,6 +70,7 @@ nav: - Agent 执行流程: agent-workflow.md - RPent 集成: rpent-integration.md - π0.5 双臂控制: pi05-bi-so101.md + - Go2 ActiveVLN 部署: go2-activevln.md - 系统设计: - 系统架构: architecture.md - Runtime 职责与成本: runtime-value.md @@ -87,6 +88,7 @@ nav: - 场景: - VLA — SO-101 抓取: demos/so101-grasping.md - VLN — MicroDuck 导航: demos/microduck-vln.md + - VLN — Go2 真机导航: demos/go2-activevln.md - Agent — XLeRobot 递送: demos/xlerobot-snack-delivery.md - 多机器人 Recipe: demos/multi-robot-serving.md - 项目: diff --git a/scripts/activevln-preparation/pyproject.toml b/scripts/activevln-preparation/pyproject.toml new file mode 100644 index 0000000..71a944a --- /dev/null +++ b/scripts/activevln-preparation/pyproject.toml @@ -0,0 +1,15 @@ +[project] +name = "embodirun-activevln-preparation" +version = "0.1.0" +description = "Isolated CPU environment for downloading and preparing ActiveVLN artifacts" +requires-python = ">=3.10" +dependencies = [ + "numpy>=1.26,<3", + "ml-dtypes>=0.5,<1", + "safetensors>=0.8,<1", + "huggingface-hub==0.36.0", +] + +[tool.uv] +package = false +required-version = ">=0.12.0,<0.13" diff --git a/scripts/activevln-preparation/uv.lock b/scripts/activevln-preparation/uv.lock new file mode 100644 index 0000000..3602ccc --- /dev/null +++ b/scripts/activevln-preparation/uv.lock @@ -0,0 +1,720 @@ +version = 1 +revision = 3 +requires-python = ">=3.10" +resolution-markers = [ + "python_full_version >= '3.14'", + "python_full_version == '3.13.*'", + "python_full_version == '3.12.*'", + "python_full_version == '3.11.*'", + "python_full_version < '3.11'", +] + +[[package]] +name = "certifi" +version = "2026.10.23" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/fd/11/b524cbd9bbdaca58608e4cf4053fd463417549e1959fa8d3aa18319f9555/certifi-2026.10.23.tar.gz", hash = "sha256:a9895e6e2758b371e0545e321a3a8fd1fcfd9829ada8824a936dfb16aaaf36cd", size = 136225, upload-time = "2026-10-23T11:36:16.478Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/32/d1/a3652fe2c19134d0d15922177821d863cbd7e842d53a21bbe7e8e3a1b5ac/certifi-2026.10.23-py3-none-any.whl", hash = "sha256:e9b54de76e530bb6cf0ccd036787103acb58fd42ba930ea8bf948ddbaa2f61d1", size = 135082, upload-time = "2026-10-23T11:36:14.763Z" }, +] + +[[package]] +name = "charset-normalizer" +version = "3.5.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/33/1c/f41d4e74c28ab327ff3acd36053f7ea506c55872d7a90b0fa71aa3ab0c89/charset_normalizer-3.5.2.tar.gz", hash = "sha256:39de2a259fc954455c57274dc94c79d5842774e1247a016aff30bc0efed0f4ef", size = 172659, upload-time = "2026-09-30T04:39:23.398Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/98/77/46e87bcfc45d25ab4db7cfc9bb544bfa3ffd302289ed31ae93f5433eb899/charset_normalizer-3.5.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:195c26fb65950f8fce54e26349852b7bdd7c5f120aeefbcc440b8a20faaed4a3", size = 373348, upload-time = "2026-09-30T04:34:42.843Z" }, + { url = "https://files.pythonhosted.org/packages/52/fc/e518013affcc43c9f919c3ba41bffe9b4ee4aceb0a6462a6243efcca5f2d/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9373ad13ef0d2c0fb761e04e55bfdee5a08b52cef2c882c8fbe9935b1517152e", size = 260860, upload-time = "2026-09-30T04:34:44.817Z" }, + { url = "https://files.pythonhosted.org/packages/d5/ad/2a895c945ee61988dfd9ccee64f0b78dc09f29c9b34d1dd545246d78e0ad/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:ddf19c062bea7a0cc80f519243d2c01dd091be0cf952a0750d4ad576709559f5", size = 246491, upload-time = "2026-09-30T04:34:46.227Z" }, + { url = "https://files.pythonhosted.org/packages/c9/05/5d958bc8ea503e26be25ada5430fd409cfb45dc22ff33f9f96e649613c99/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3d14b50de6bf4d0edf857a9386836846f982b8f524e188e2e68b96d702bcf4aa", size = 290875, upload-time = "2026-09-30T04:34:47.691Z" }, + { url = "https://files.pythonhosted.org/packages/55/e2/06bad57dfdb49cad92c0ba85b6b4fa5827a67df37897287cfef0553843c2/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:28a15fdad492a99b6eccfaaed66ef3f74050680545ea61ec8b2f4c538f1f1320", size = 286987, upload-time = "2026-09-30T04:34:49.356Z" }, + { url = "https://files.pythonhosted.org/packages/c4/9f/9f52d2886d52645987d603425482c63c5045a3005db1354a7097e5ed1ae9/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8a893cc101149f80a653f82062ebc95b34525a2614382e1da5458fe7c6997249", size = 271105, upload-time = "2026-09-30T04:34:50.957Z" }, + { url = "https://files.pythonhosted.org/packages/4a/41/e05e19578b7b87e7db2c3ecb884bd09d065274ab41e1f535542e8bae9b06/charset_normalizer-3.5.2-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:619799369eeef6366ed3e8755a5670f4f2f0fb6b30a0fd7264dc0fdc2357058e", size = 269833, upload-time = "2026-09-30T04:34:52.623Z" }, + { url = "https://files.pythonhosted.org/packages/c2/cd/fc7152414561ff78f9c61a4a627025f65fd244abaefc99ac4e75c6169b33/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:447441e76ec720b15e64418d32e092297340387053047c7c694f579efb0ee1d9", size = 263048, upload-time = "2026-09-30T04:34:54.013Z" }, + { url = "https://files.pythonhosted.org/packages/71/71/fb379e399b1013962716a059d551e03bd80b3e02f05d81246886af6c0958/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:62588a277bfb59def052abd940703fa35107152bf479781a878617d60faf8fb5", size = 249237, upload-time = "2026-09-30T04:34:55.373Z" }, + { url = "https://files.pythonhosted.org/packages/33/4f/aeadccd6d20882909eb2597ec40eccc05d505e2262f14dc76d7620700657/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:44bd4fbb29dfbeba60e7d2bd000c59e4b21ddb3cc53912b14048d37092706d7c", size = 290756, upload-time = "2026-09-30T04:34:56.867Z" }, + { url = "https://files.pythonhosted.org/packages/b9/7b/e8a92613236b257d3b75d532496eb21f68ad8231d7d56df94497e460112e/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:30fcd120b732aa79317f08dee04d7de0847822e4cf7ee0e9f445bb958832252c", size = 269026, upload-time = "2026-09-30T04:34:58.278Z" }, + { url = "https://files.pythonhosted.org/packages/ff/ac/21d5c6b972285c5f095ff78afdc99f3539e3985dfcf7ff1cfbe9e772f529/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:50e3adfb96fc189eb27b1cf62d3b598b89b4bb0420d93a3d3e42e137409011be", size = 287601, upload-time = "2026-09-30T04:34:59.703Z" }, + { url = "https://files.pythonhosted.org/packages/59/72/263491ec1494a194b16fcbff88a0220f2af633738c79e92b4d7189226322/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b736353c0a625bbd5fcec108576e2385db3496f4f771f785ff32e108d3c3bc45", size = 272660, upload-time = "2026-09-30T04:35:01.26Z" }, + { url = "https://files.pythonhosted.org/packages/38/7a/81f1186c57e406233969ae96b5fd0c907254ab8b6e47da8ae24cd20fb9d7/charset_normalizer-3.5.2-cp310-cp310-win32.whl", hash = "sha256:f5833ad231be5eb6553de524a70f48d71b2c8563101750531e0b80184e175cd4", size = 187301, upload-time = "2026-09-30T04:35:02.659Z" }, + { url = "https://files.pythonhosted.org/packages/ae/ab/fb8b5178fdf7bf68efa61cbe892286bc9f73846f26147d4725fb89388475/charset_normalizer-3.5.2-cp310-cp310-win_amd64.whl", hash = "sha256:1461ac396c4fdb983a675f20aa555624f0ee18ac83d832b9244ffff3d8055275", size = 215446, upload-time = "2026-09-30T04:35:04.011Z" }, + { url = "https://files.pythonhosted.org/packages/36/40/e270b74e0d3f583d78d902960845a149e80eb7c737ee5613ccc6efc7264b/charset_normalizer-3.5.2-cp310-cp310-win_arm64.whl", hash = "sha256:c6708715abcf3c73b99508253e961a9967f02fe536532834149574eda6de0d1c", size = 203389, upload-time = "2026-09-30T04:35:05.577Z" }, + { url = "https://files.pythonhosted.org/packages/22/67/6a0b94a7960d5e1b5eacd2fb529f3fccc47db4644f7f0a7cfdcfc3be578a/charset_normalizer-3.5.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3d21b8b13c7592db2ac5e544a6d83187b995257472b0c9e8351b6d507ae37ed6", size = 370642, upload-time = "2026-09-30T04:35:06.91Z" }, + { url = "https://files.pythonhosted.org/packages/fb/94/01009e13b94041599004edf32e56e382c24e570f60f79bab8efe45cfe1eb/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d760fe2a4d7c3b226cb9026d6a842868d52a7901bd98420e1baf14e80da85cf5", size = 259280, upload-time = "2026-09-30T04:35:08.448Z" }, + { url = "https://files.pythonhosted.org/packages/66/85/3b5358f60a13210f0b67d3755c168ef758701b021e655d88d4da28554467/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c9790464842f85f437dbbb54417eda1e0e6bfc52dd8d22d6fd1c994b73b2dc74", size = 245335, upload-time = "2026-09-30T04:35:10.104Z" }, + { url = "https://files.pythonhosted.org/packages/74/75/77c1c479b09ecd751d1e767b251ea5c14d4d50ff757bf404afab2692f600/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4685902cf26edf013ed7a3da0f426ebba7a00ebb9541386d835afbf002c11cab", size = 291707, upload-time = "2026-09-30T04:35:11.575Z" }, + { url = "https://files.pythonhosted.org/packages/0b/0d/363f78cacb70f58f15f4b083961bbd9d292f335d3f5c66fc4f1cfe69cb90/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4495c5002a7b28557e7e222e77e0b661183e432b7d6d2e788101e3f240e05b8c", size = 286747, upload-time = "2026-09-30T04:35:13.022Z" }, + { url = "https://files.pythonhosted.org/packages/e4/ed/cf505d3011ffceb12c2067a7a5d3cfe92b875d4d44bb0ff0d69375e2c184/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:211d5a3eb6af8f513b8d4ca19a8c1b7accab1b5f0d3175f9826b03c1a920dc1f", size = 269972, upload-time = "2026-09-30T04:35:14.606Z" }, + { url = "https://files.pythonhosted.org/packages/15/d8/f0a93a431d170e7ca681d4f6650fee3de934d18560e474e7267eb4b0f987/charset_normalizer-3.5.2-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ef4fcbf3327382cd4c9f540babd61248208af7b93eec4de397b4d5f58a09e288", size = 269339, upload-time = "2026-09-30T04:35:16.087Z" }, + { url = "https://files.pythonhosted.org/packages/86/bd/9b2bd1c5b7af02462c9752d33994834ff972a96b4c483eefde9e594488e2/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:bd16aabe4a02a297c23417aa17ac6299dbd8c49f673bcd645b4929b11f5a4400", size = 261683, upload-time = "2026-09-30T04:35:17.488Z" }, + { url = "https://files.pythonhosted.org/packages/76/a5/cac540ab0fd61f3fec88ad3dbb64509e71424593d73cfdfff5ab3e4db279/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:fb9e68df06293761f9fe66ade60a9bc6d0f5e42b8acf2939a9158af86ab0e5bd", size = 248143, upload-time = "2026-09-30T04:35:18.849Z" }, + { url = "https://files.pythonhosted.org/packages/71/7a/ff467301deef2089fad87f72df9e000a26a78fec7acbb18e1999371b8369/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:59f63901b0031c3136cf64704dcb21de0bbae62ce2c9529bc39d27665463de37", size = 292358, upload-time = "2026-09-30T04:35:20.326Z" }, + { url = "https://files.pythonhosted.org/packages/ad/77/22d7e785d1e210afc2e2f58600dd1799d17a35665faf84383f002826c5f8/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:304d5463e65a35d7bb0850550e0780395395f6fcf452f04db7d5ca7cecc425ac", size = 268766, upload-time = "2026-09-30T04:35:21.72Z" }, + { url = "https://files.pythonhosted.org/packages/ae/91/e8e946267f1c2d9e2bd651726e2fbd2addf02c4d36cea5069e32ca9d7bb5/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9cf9b1a857e25c4baceeb3624e92a56df3668f398c4acba74e174d81fb4d1d3a", size = 287432, upload-time = "2026-09-30T04:35:23.273Z" }, + { url = "https://files.pythonhosted.org/packages/4e/88/7561d8a88d555e7df6623abe7c0070b4baf47549b9408783a2ae0a1a6cf7/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:114e4d0c92d618409ed82a99e22b5c5e768fe995f2973f78265f4524f49d4640", size = 272470, upload-time = "2026-09-30T04:35:24.655Z" }, + { url = "https://files.pythonhosted.org/packages/35/7e/578c702301ec036f01455f30744a08d2b42f6ab35b9b2d4bf8cae0ef2a80/charset_normalizer-3.5.2-cp311-cp311-win32.whl", hash = "sha256:2625388c6c754520c37abaf3b41eb34d1cc4a373f457898f08606c8e362b891d", size = 186688, upload-time = "2026-09-30T04:35:26.225Z" }, + { url = "https://files.pythonhosted.org/packages/e8/fc/fdf8cf52ff21cd5bf158f20978991cf985325842f74283eb6df26c8a39d8/charset_normalizer-3.5.2-cp311-cp311-win_amd64.whl", hash = "sha256:87e50a3e7cb90af586b6c5faf23e302a970415ac73bd7bd90a515a04b427ef96", size = 214932, upload-time = "2026-09-30T04:35:27.796Z" }, + { url = "https://files.pythonhosted.org/packages/97/66/3e45a506d8110b632541faf9a9470185aa9878f1ed44020f31346c1c5e5b/charset_normalizer-3.5.2-cp311-cp311-win_arm64.whl", hash = "sha256:254eb48b9fa5ee9898a3c445825a1f340fe53712a098904b39b0bddba8ea3cb1", size = 202828, upload-time = "2026-09-30T04:35:29.259Z" }, + { url = "https://files.pythonhosted.org/packages/e7/c8/693809898870237d82785a03f3b2b58fe4c9f14669f84a7d4e623c92a59e/charset_normalizer-3.5.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ed2a239c0ea213acc1908150a3037257083c7c083128f1a4cec2ec4b97dca491", size = 367780, upload-time = "2026-09-30T04:35:30.888Z" }, + { url = "https://files.pythonhosted.org/packages/c9/87/2fea8c13dc24b3ca9c6f803a5b2dfdeae73eb4f9e12c7885ed908ff0433c/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b91363207bd9dc966a691e959bb47f64b30f7ac4b072be9968b366982f7db77c", size = 246730, upload-time = "2026-09-30T04:35:32.286Z" }, + { url = "https://files.pythonhosted.org/packages/a8/9e/09efac30b937722f46d3110ba30b875b24b2e3a266ed746cc4e376a94d80/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:38a873987f3be698494da8b2e3085e29da02da7b633dce73e79c699a113d7bf0", size = 237707, upload-time = "2026-09-30T04:35:33.709Z" }, + { url = "https://files.pythonhosted.org/packages/9e/18/70d76670b13686237863a379928d60bd10e021f17d243ab3d7014c4a5f4e/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:355ad8011081dec5412240c087a9a0c9d4d5039f3ed11a3f13e18c2b29b56c51", size = 273050, upload-time = "2026-09-30T04:35:35.138Z" }, + { url = "https://files.pythonhosted.org/packages/54/e2/77a8b09d5adc013ed07b95b01b8b8fa5441c4e810e83ee7e4aae2fa4d91a/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ee21e28f0430bd6dc9086c6e525d5e818a44a5ad19720c8a0ef766792f3eb5e5", size = 270345, upload-time = "2026-09-30T04:35:36.502Z" }, + { url = "https://files.pythonhosted.org/packages/7f/c5/38806a25ab5e65fc178f39affeda20858efafede2fce1ffc2556cfc9fe73/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3d31298449090ab8d47b7b1b2a555ff73cac7ed438a08b7ac160980c7ebed649", size = 257601, upload-time = "2026-09-30T04:35:37.919Z" }, + { url = "https://files.pythonhosted.org/packages/ae/8d/213565184708fdb263ae55e2c04ee1ff748129dd65d48ed0e3502da9c85a/charset_normalizer-3.5.2-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:5cde776b7cc66e4f6c99612cea4aa7269aa65863f7a15841b2c264f103822f4e", size = 252222, upload-time = "2026-09-30T04:35:39.544Z" }, + { url = "https://files.pythonhosted.org/packages/7e/24/76d2cefc25472531e4c5c7dfff68865eb1c39b78482f0fdc15b46f047830/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ae4f5fea5b8b8ccff88238cc8569303e5ee95efae67fa62922a311397a71f346", size = 248482, upload-time = "2026-09-30T04:35:41.088Z" }, + { url = "https://files.pythonhosted.org/packages/7d/dc/65a801b66ab4c197e22c433ab25e7ac24324ac6f45a2269aca42cce309bf/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:f7d486c83842422badd511868fd8a9a20e9407ace71564b6af47ce7e60a336c1", size = 241206, upload-time = "2026-09-30T04:35:42.59Z" }, + { url = "https://files.pythonhosted.org/packages/a7/95/ca9b5eabde673002c6f1e7ada1b223916fe18f6d661da7aabd4d643718f1/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:11a4d68a6ecda3292cb1e50239e111543ba5d709bb62a6b4ea1afcfa729d8875", size = 273190, upload-time = "2026-09-30T04:35:44.347Z" }, + { url = "https://files.pythonhosted.org/packages/2d/8b/803b4d2a3f6e1740f63f1e87b04d14b42f3d4fdfe6ed7d4db2d34102b14f/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:d6734d2ef8a50fbf8445c139477da401f50d62a0606bf00e20ec6d87773fefb1", size = 253527, upload-time = "2026-09-30T04:35:45.915Z" }, + { url = "https://files.pythonhosted.org/packages/a9/55/93c0e5dbd085ae0471346026abbe7e0db9ea2d6fea74e51f0b5a46f233a7/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:a815775b6c38d4e0ff7bcffbeba67feded90202bb6a226b8dd35f1c855217413", size = 271285, upload-time = "2026-09-30T04:35:47.49Z" }, + { url = "https://files.pythonhosted.org/packages/95/69/0dbd0e0b9b16cfa816cdfcb3e2e3854a1f680dc07fb1245ea125e7448060/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:23851fb4e1b85ed3f6c2a27b777cdfe2e19fb5b38429a8faf38c7542b7665869", size = 260010, upload-time = "2026-09-30T04:35:48.996Z" }, + { url = "https://files.pythonhosted.org/packages/58/9d/e7b88e7b1bf403590c3b573277b5e1e488c68c7a6fbacca310a2c324e90c/charset_normalizer-3.5.2-cp312-cp312-win32.whl", hash = "sha256:db19d07e2e0129e974a0e65d0064fc222a446cd5122c2fd4184d2af9fc734a9e", size = 184125, upload-time = "2026-09-30T04:35:50.777Z" }, + { url = "https://files.pythonhosted.org/packages/eb/e6/e6e083884cbcfd49c64865af05027fe7011be7b2d9179524f099a1b611f3/charset_normalizer-3.5.2-cp312-cp312-win_amd64.whl", hash = "sha256:780fbe7cab297b81dad9fb8dc5eb003c0468ffb0d9e5f65068c53a34661a96bc", size = 207486, upload-time = "2026-09-30T04:35:52.194Z" }, + { url = "https://files.pythonhosted.org/packages/c4/e3/017aea0911ada7405a825c7d937eb3a13009664e2f5b38e8c4bbf2abf894/charset_normalizer-3.5.2-cp312-cp312-win_arm64.whl", hash = "sha256:e2af3aad578aa6bd1384bcf4750fc285e5a9de53f40b7d41e5a0bf748edeb2b3", size = 196734, upload-time = "2026-09-30T04:35:53.636Z" }, + { url = "https://files.pythonhosted.org/packages/c5/34/68292d68512768591aaff07c59bb53ee31341c87759433a859c4641a50c2/charset_normalizer-3.5.2-cp313-cp313-android_24_arm64_v8a.whl", hash = "sha256:ed905975ab14056a2e5eb1c376cb2e1ebc5396baf84163939c518556fccde9f5", size = 225946, upload-time = "2026-09-30T04:35:55.313Z" }, + { url = "https://files.pythonhosted.org/packages/e3/80/bee0b01b90ccd5322ae1d0abb33fab1bd95b7c2eadaf02aeccf22e04ee83/charset_normalizer-3.5.2-cp313-cp313-android_24_x86_64.whl", hash = "sha256:a66c3bc5ab1f0ff2164fc9965ddd611ff0802173f4b9d24554c563f6ab7e1d6e", size = 238619, upload-time = "2026-09-30T04:35:56.863Z" }, + { url = "https://files.pythonhosted.org/packages/78/6e/60ce52a85a7fd631ae8482ae6d74521014ca2f255892679484dc04d7ef56/charset_normalizer-3.5.2-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:d2374b62878abb00cd8309b32af6c0b715cd02dec0ca74ef12e5069bdc64144a", size = 206701, upload-time = "2026-09-30T04:35:58.639Z" }, + { url = "https://files.pythonhosted.org/packages/36/8c/71aafad23f971afc84c2b295bc0c560739ce1dac558aad9fec22e39f3639/charset_normalizer-3.5.2-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:d376bbd28b3a8999db1a103b3b388aee6f1ddeb3e51bc2172993efdcd86e064d", size = 210506, upload-time = "2026-09-30T04:36:00.147Z" }, + { url = "https://files.pythonhosted.org/packages/91/da/3c5a7798c046df7d2d68ad653cf5b6c5a8bfee225055a843c6f2f42aac1a/charset_normalizer-3.5.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:6045373d5a89a5ec71afde535db987ca28e76dfa276c2d4c818265b375d4b055", size = 366626, upload-time = "2026-09-30T04:36:01.77Z" }, + { url = "https://files.pythonhosted.org/packages/e1/16/710ac3de2ee354e2bd1a9c94efe45a2d27b5c6ad39b2d6a905be2c094b6c/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:849df64e889b2e17230d58410a03dba311a65b163508fd33679b2b737d4b7858", size = 244624, upload-time = "2026-09-30T04:36:03.389Z" }, + { url = "https://files.pythonhosted.org/packages/d6/39/45c7439f5b63d24f7d5b2a1d760f34af7628782d7144b4cc8ded45c2d4bc/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:15c44f7edfd477b06f517a5cc317fc1707edb9de2c865f43d4b6513907473234", size = 235731, upload-time = "2026-09-30T04:36:04.987Z" }, + { url = "https://files.pythonhosted.org/packages/4d/34/38f3154785ce92e9f56eb226f4d35bdfae6b008480dd055f58837a89c810/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a89012d6d5476ee112d20d998570ed58df2260a852afb1758809cd6900411d21", size = 270352, upload-time = "2026-09-30T04:36:06.412Z" }, + { url = "https://files.pythonhosted.org/packages/04/f3/859f74e7babc977705026b30593b3be04049632a522fb7000f83c033d747/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0c951d5e6dd9c2ff60609476752bee49da4206adde960ebc247766937f72e718", size = 267393, upload-time = "2026-09-30T04:36:07.865Z" }, + { url = "https://files.pythonhosted.org/packages/4b/85/41d27f234b82e47c167a5f6c0f62501dc0c640585ff4aba79e08a390336a/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7218e8f32b0956cfcd048fd42d9d5779809745ca1d86113ca56f66e7ae1549c4", size = 254660, upload-time = "2026-09-30T04:36:09.248Z" }, + { url = "https://files.pythonhosted.org/packages/58/ca/5d1a997587febe5b26d8daffe363b5c1a091cece19828eec6502fd09c5ef/charset_normalizer-3.5.2-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a19a731138fc27d5682277d3b9df22855cea1239bce7fcec5f78f42ef2d1f3c3", size = 249996, upload-time = "2026-09-30T04:36:10.73Z" }, + { url = "https://files.pythonhosted.org/packages/b3/1f/d1e78246f7ed60c8c8d606b4ac27f66ce49cc3e95f24893ccbeba9f77302/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:62603db9a7caa0802eaa28c1c46fecd7b3a263a774069c24c3c28c302448721c", size = 247028, upload-time = "2026-09-30T04:36:12.294Z" }, + { url = "https://files.pythonhosted.org/packages/8e/37/eba316edd4f0c4d3a5d945924c4eeeae59abac4056aa815d8a4268f863a2/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:b6856554c4f44d79fc2307d5768854310a8f0096e501c75637542c82292b0429", size = 240562, upload-time = "2026-09-30T04:36:13.887Z" }, + { url = "https://files.pythonhosted.org/packages/c8/8e/aaa037d40ca9ef045977f1a661048b1aa33f223adfce3452fe9be9f79d14/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:1bc0baf5ef96b6ede57d47f4b8fe4d9d84019c3bfcbeb20a41edc6a6ee341f1f", size = 271699, upload-time = "2026-09-30T04:36:15.41Z" }, + { url = "https://files.pythonhosted.org/packages/26/19/1c1c9f75974adf523b87f34b8a2adc5a435cd65916812bcbd0dfa45f9a29/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:56bc200a365efb37383b7852e4cc5898d3b2da5987289b543956cf8cad71018a", size = 252030, upload-time = "2026-09-30T04:36:16.839Z" }, + { url = "https://files.pythonhosted.org/packages/bc/90/0660ef18e18df0a4d2a1a0edff7dfbba42d4e50ef2425557a5bb7051f77b/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:2c9ad19a6cfcd5ea5c0d41161d22f9df1dcc277e9bef2751391334546a314c00", size = 268565, upload-time = "2026-09-30T04:36:18.468Z" }, + { url = "https://files.pythonhosted.org/packages/79/ba/57adc269824e8658f1a0f97a9e514c247445a9632b3419b97e0ba37f16dc/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e243bd13217235fc7290c621941c3f5cc8b66e4872495be821d7436ba2fb838d", size = 257627, upload-time = "2026-09-30T04:36:19.938Z" }, + { url = "https://files.pythonhosted.org/packages/9a/85/33abd4315c052d3d4f54c92b1ee49bfbc0dc7115a981e462a793b6d2ab87/charset_normalizer-3.5.2-cp313-cp313-pyemscripten_2025_0_wasm32.whl", hash = "sha256:a090bb2c68df85450502e3e20d665e3a5af9c65a84d6508ed477badd49166fd3", size = 143407, upload-time = "2026-09-30T04:36:21.376Z" }, + { url = "https://files.pythonhosted.org/packages/4f/de/6435e18d1aaa5d910b896d551411c96af1f42a0c56c29afc2016c61ccc2e/charset_normalizer-3.5.2-cp313-cp313-win32.whl", hash = "sha256:2b7b3bbfb4fe8ef40600792d762fbaa9057559f9d3fad209525b7a22b99e91fd", size = 183207, upload-time = "2026-09-30T04:36:22.776Z" }, + { url = "https://files.pythonhosted.org/packages/9c/76/b8ec57f4e9ee3253541abf95e4a462c0175fe8032dcd070f1f2421240942/charset_normalizer-3.5.2-cp313-cp313-win_amd64.whl", hash = "sha256:78456a747de8dc58360ffa581f30a002baf5aa28cb262536545e91f113ed7639", size = 206489, upload-time = "2026-09-30T04:36:24.306Z" }, + { url = "https://files.pythonhosted.org/packages/3e/60/c647c6ae47480221e875ea5d743ff94946f7416e3c69415ab772928e8d32/charset_normalizer-3.5.2-cp313-cp313-win_arm64.whl", hash = "sha256:11912e4bb14baae7c5d8791aa55ba0a3a03ec6729073307b0f57270abaa713d3", size = 195501, upload-time = "2026-09-30T04:36:25.846Z" }, + { url = "https://files.pythonhosted.org/packages/58/ca/7aa91362a2f77ac8e9e28a9b902a74f7d0e11a851ef0d27a74308da8cd90/charset_normalizer-3.5.2-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:1afb975bd5d68d5ce9f6b6d44fdf2f7e34b895a35e95708a7a91b20a3b51d187", size = 226010, upload-time = "2026-09-30T04:36:27.669Z" }, + { url = "https://files.pythonhosted.org/packages/a8/cf/ac8878d0322cf88a1aad4c7b147db32ca0bd806eb0060957b2e31486dbe6/charset_normalizer-3.5.2-cp314-cp314-android_24_x86_64.whl", hash = "sha256:bbbfc8e28816f19d7c0f1816664980c0a9875d01b27cdf8eedddb639d9e108ad", size = 239266, upload-time = "2026-09-30T04:36:29.434Z" }, + { url = "https://files.pythonhosted.org/packages/c9/6d/9a08d7e0b29b7208e2c6c01dc56c8e0520e7c7beadbbfb024b58fd69c8a5/charset_normalizer-3.5.2-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:7967d08cf06dee78443b874f98c98036f624f3a4e73e11f9f64f5be4d25393cf", size = 206783, upload-time = "2026-09-30T04:36:30.872Z" }, + { url = "https://files.pythonhosted.org/packages/82/44/b0aa350280e6ff5a5492d17cf10460dd39d5ee848f872f7ba2df10607f60/charset_normalizer-3.5.2-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:4c2b5031f63e331e3839b40aed2dd6f191e9c07edbde303e7876846ea1946995", size = 210449, upload-time = "2026-09-30T04:36:32.625Z" }, + { url = "https://files.pythonhosted.org/packages/7c/8a/40db9aa9f5907bb0e6f8b6d64064bf8852fb33d4b813ff9414911df7647c/charset_normalizer-3.5.2-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:fcff63213e8e6e47770541a4607175404f47cbb3ebea7b6058cc82d524a0e424", size = 367815, upload-time = "2026-09-30T04:36:34.197Z" }, + { url = "https://files.pythonhosted.org/packages/7f/72/9c5e7707b57c8ddfa9ddf7b0b1d009d7fbab9e9e887d5b721060f37e307d/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8d86d6fc60743dc916eb79e2eb1ec4818e21e427731543af40a3021851174a13", size = 247095, upload-time = "2026-09-30T04:36:35.803Z" }, + { url = "https://files.pythonhosted.org/packages/83/09/71e453691e927de4ddf792770cfaab3f49d494e222f66ea5e404bbd5e39c/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7a881931aa470808df94a8c380eed2bbbc76cd9dc622310f99665658c821eb6d", size = 233942, upload-time = "2026-09-30T04:36:37.407Z" }, + { url = "https://files.pythonhosted.org/packages/9f/86/85c84e4da8b27dd409577d9437926ff581c5f9d3c66038dc68c1a526de51/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8024d00c3faf3fc0c16e07a69f4405e8eac7cc0ab15f65fe6cf43827c4cf72b4", size = 273762, upload-time = "2026-09-30T04:36:38.904Z" }, + { url = "https://files.pythonhosted.org/packages/92/08/564955a4b5f2ccb410ab480bbe8c6a18063ff27f2d35458731c4a5335df9/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4d48f2d08b9de5864e2c8744d4461b862fb149a18274abc8b698c45975573438", size = 269514, upload-time = "2026-09-30T04:36:40.469Z" }, + { url = "https://files.pythonhosted.org/packages/18/24/bad3ac4271589df29cf5ce2f5ae490518a5739358052bd0d61209e6fea54/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:34276fd796040bf0993ab33a369aa572e6979c7aab225a88893667ad8eac8f7a", size = 255056, upload-time = "2026-09-30T04:36:42.02Z" }, + { url = "https://files.pythonhosted.org/packages/d6/3e/350d89ad49916b86554d6f5f2d03ec1152148f87e5ff735106c6a03b1a36/charset_normalizer-3.5.2-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0521c5665880b33d603717defa76c094048900010897909952397feb3039da56", size = 251311, upload-time = "2026-09-30T04:36:43.577Z" }, + { url = "https://files.pythonhosted.org/packages/56/5b/4970a2d154df502e133402906dd04e3ae7cada7b3011283c88d0479a2585/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:eff0ac9dbe711a4aee69bf04a83896aa9b85f19641264053a9f6d48573abb7dd", size = 250190, upload-time = "2026-09-30T04:36:45.185Z" }, + { url = "https://files.pythonhosted.org/packages/88/8c/f1a91bddc8fb47c2889e29ea7ea49a194eb0d9868675d786806519c00d76/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:1503bccbeb36d5527790c3930327704c39af22de3112f1b1666a9f3ce15ee204", size = 237098, upload-time = "2026-09-30T04:36:46.689Z" }, + { url = "https://files.pythonhosted.org/packages/24/0e/bb5dace3cc7e79068425386a6589c19b5a2ab5fefc2a46abea6919683332/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:52aa6992700996af31f375de0c6bacd402b0097fe40b53c426b9f51a90ebabc7", size = 274228, upload-time = "2026-09-30T04:36:48.31Z" }, + { url = "https://files.pythonhosted.org/packages/9d/79/b849ad523017ea9f5a45581bbebed91439e0cf42fd2860a6f64e358eb5a6/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:e09a3942ecbdee5cce73ea9d42da82b81b72ac1bf031ce069b93b5adf4eac8cd", size = 252401, upload-time = "2026-09-30T04:36:50.091Z" }, + { url = "https://files.pythonhosted.org/packages/89/8c/75469d690cf47200bce8f6cad7655724fc23148e147abfc5ce78b5f65863/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:c7c9ab723cde841fefb34efbad91e87f00a674b1fe1cd0784fde742bf2c154dc", size = 271846, upload-time = "2026-09-30T04:36:51.719Z" }, + { url = "https://files.pythonhosted.org/packages/26/cd/6d52d3c7437cdcf2e310ce9f28f282e733d4ef60ed19105d1819c356255f/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:ddc7dacc8ece3a182e7f15cb862d1fd616b46d076cb1ae9dd232b2c38b655874", size = 258151, upload-time = "2026-09-30T04:36:53.234Z" }, + { url = "https://files.pythonhosted.org/packages/f7/4c/070b38bdb5f49a70199fce923ec0726a49536a63ab262abbfcaaf351110b/charset_normalizer-3.5.2-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:ee43c17b173d46a3212baa6ead3ae258eeabdae48c263a01ccf0218c366dd655", size = 143570, upload-time = "2026-09-30T04:36:54.816Z" }, + { url = "https://files.pythonhosted.org/packages/81/84/9ebfc8ed6c8c4fcd8e726ff6bf220cc8deb3966e31dce9be8dd8aa017e64/charset_normalizer-3.5.2-cp314-cp314-win32.whl", hash = "sha256:4f87960d57feabfb618e4e0af6e7371645fa26a277860739d6e5d6e0012c92f0", size = 186412, upload-time = "2026-09-30T04:36:56.643Z" }, + { url = "https://files.pythonhosted.org/packages/d1/78/5ed86f743d4bc350db307e7636419a0a5ee1d91806d30c7f667bd5c80dae/charset_normalizer-3.5.2-cp314-cp314-win_amd64.whl", hash = "sha256:e4e81e09c1578b8df602e3db08b0b3ea0a6947ad612f52bf8dc5ea8d47691f0c", size = 210965, upload-time = "2026-09-30T04:36:58.205Z" }, + { url = "https://files.pythonhosted.org/packages/53/94/a3a7698e9b1a395e1eb99ccd9a324be9347973bff4e72db2a06496d7cd27/charset_normalizer-3.5.2-cp314-cp314-win_arm64.whl", hash = "sha256:80d02b6f04e92601a081dd97b23d3128033098bff5d35d392ddcc0476ea11253", size = 200406, upload-time = "2026-09-30T04:36:59.764Z" }, + { url = "https://files.pythonhosted.org/packages/c1/48/c5dd00d5ef7791f02666de250a5bb6071e29b7e133cf4b835800b6d3bc27/charset_normalizer-3.5.2-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:dca9ab98072a5a54ebacebdc45f53e645336b320c667410b061be1ca588ae709", size = 396871, upload-time = "2026-09-30T04:37:01.543Z" }, + { url = "https://files.pythonhosted.org/packages/12/c8/8379554b42e8368161d898476686947a0fdbd3e8865170d7909dcabfdee8/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f0aa869112ef88429ae17820d99c3dd9504c9e9c671d3c246f3d7442cb051084", size = 249711, upload-time = "2026-09-30T04:37:03.111Z" }, + { url = "https://files.pythonhosted.org/packages/4a/eb/2ddb1035d17320caa9f41682935123a9a250277b261c3efc86b2d2a21343/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c0afc6800ba57ccc350374c5bd6150419915d95ce93cdbab2d783d75eaf30ecb", size = 231146, upload-time = "2026-09-30T04:37:04.721Z" }, + { url = "https://files.pythonhosted.org/packages/4a/24/2ecb4bde104322cd7859d6594fcfa74649f8d90b3221c9feecbef149875b/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7dcd882da75ef9adf94903b1e3b9419e8aa8fb4c7396822b834b9ef7fb96954f", size = 271552, upload-time = "2026-09-30T04:37:06.295Z" }, + { url = "https://files.pythonhosted.org/packages/3f/98/9d5f6ebc3aee9fef5d30b4aff11fb2ab7a1222b4064f8ef2c7c87cde217a/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2e06a3a98f916dd41d27f3105e02e7a40181c98c94b9158733d03a6f80506c09", size = 269810, upload-time = "2026-09-30T04:37:07.905Z" }, + { url = "https://files.pythonhosted.org/packages/09/e1/a3b06a10461b1b7628853c934c644e03bc28e42767116afb52f19a56519b/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6bd128f206a7752ae1f2ab6c61bf8a24ba28913a10df8b14c2637b973ff97a80", size = 259845, upload-time = "2026-09-30T04:37:09.554Z" }, + { url = "https://files.pythonhosted.org/packages/fd/d3/6f561f74a296cf27d61775a1dc665ad13f3bff6a798810ca05907f37a7c4/charset_normalizer-3.5.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c8f3d67aeaf55f017982b73683f0e7342ba2f6635a78f69ce89ebb26aa411e5c", size = 252825, upload-time = "2026-09-30T04:37:11.274Z" }, + { url = "https://files.pythonhosted.org/packages/26/9f/69e13ca3b18f43e0eafcd34c04a45b732ae22a43b54a5fc9e119103356eb/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:fe9753dfee015c570d73df76f899f18444d41388bffcde097deba51c4fadbb9f", size = 252659, upload-time = "2026-09-30T04:37:12.941Z" }, + { url = "https://files.pythonhosted.org/packages/73/a9/ace29806a0dae18939919c76ba526472d83214afa101105fabff2cf30625/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:92888bb3187c5ba50500b00b3b310c9f2c651709d28036077680cb5255450a03", size = 238819, upload-time = "2026-09-30T04:37:14.659Z" }, + { url = "https://files.pythonhosted.org/packages/f8/c1/6116d52a2e3311ec80f21f5fb5e17b27405f10b9608af8f6e69516841a1b/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:d008d90a7f2471519aef0c90dfbe73b3e6e4d5e66ac48e19154c17e89e98b604", size = 272973, upload-time = "2026-09-30T04:37:16.346Z" }, + { url = "https://files.pythonhosted.org/packages/19/aa/9955c7e93bba10a9c7e8f7a5031b7ced66f3a1883a55c00712b8d5850ff3/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:31f3930700408d211f13378ccbe1c40845d8da54bd0681fac3a9b5aae81c7aa8", size = 253692, upload-time = "2026-09-30T04:37:18.212Z" }, + { url = "https://files.pythonhosted.org/packages/bb/33/2a6ae7fdc1b10cb581cef91addd8cdfc5f40d50abb5702309369d5834579/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:2a925889534b3748302dae5dead07cc13480de1dac3aea80a941b729b471ef93", size = 268757, upload-time = "2026-09-30T04:37:19.877Z" }, + { url = "https://files.pythonhosted.org/packages/a2/22/80992720a0282cd39bba1db35868e6b9c22f41281160143a836544bc1d8a/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:f5ec61164adcec446f8969a3358ec3f9b26bbda3b9213e5586d219afa8df2915", size = 262220, upload-time = "2026-09-30T04:37:21.583Z" }, + { url = "https://files.pythonhosted.org/packages/92/9f/181fd07e1bffea1d95cd80c84ac537354f50699c22cfc4d3c02b6fc16208/charset_normalizer-3.5.2-cp314-cp314t-win32.whl", hash = "sha256:598a11a2c7ebaa5334bf698bf29568c9c390abac6a154d8170fedecd1cea38c5", size = 197797, upload-time = "2026-09-30T04:37:23.235Z" }, + { url = "https://files.pythonhosted.org/packages/49/1c/25d8415ec1c4f2f41f1680435e4c87cfb378ff2f677d950946f2a45d0632/charset_normalizer-3.5.2-cp314-cp314t-win_amd64.whl", hash = "sha256:7fdde2c9fd9e3eca40631e024664cf2584272cc8f96308cbe5fdfc930f51d8bc", size = 222765, upload-time = "2026-09-30T04:37:24.891Z" }, + { url = "https://files.pythonhosted.org/packages/3e/b4/46b48f013dadfc0d0d33b375438e31bdf5a989dc68389c6bf627054d4df9/charset_normalizer-3.5.2-cp314-cp314t-win_arm64.whl", hash = "sha256:d1befeed746d247c81127bb14de9dc3d30edb6e5976d34f83f86ed262b1d9105", size = 210985, upload-time = "2026-09-30T04:37:26.634Z" }, + { url = "https://files.pythonhosted.org/packages/ca/e9/34e597dee616d0b8ee4b34d29399e85c2204ade174157a48505d42baa4ff/charset_normalizer-3.5.2-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:87475fabc8d9996fd9c27debb395e642e8c838d78a00b6e932227a0e06b81e26", size = 367676, upload-time = "2026-09-30T04:37:28.329Z" }, + { url = "https://files.pythonhosted.org/packages/60/9f/a5d1c91c0263745e2cd344c5a4415d787c575501ab1d449f1148ac6b495d/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9409a8bf35cf78353942504b24a57de3d75b708997a1e4bd8db71ac8633ce364", size = 248414, upload-time = "2026-09-30T04:37:30.167Z" }, + { url = "https://files.pythonhosted.org/packages/26/79/e697f77464748a3ee3cf490c83d592459400d4898380d66c38366b03080c/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:498dc3188ca05a68231ac3fdbfc7f57eb67e1343c30e0fea17f8218c1599b253", size = 244775, upload-time = "2026-09-30T04:37:31.964Z" }, + { url = "https://files.pythonhosted.org/packages/ca/87/3d42a42e18ea066e2513936fd678a00696e77878b5ae04528976abdbcb83/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e242bb1c5e76e97dfa9e7f209a71e93a01d7f19ffdd5cfbb2e2d55b4f08f8ab0", size = 273877, upload-time = "2026-09-30T04:37:33.661Z" }, + { url = "https://files.pythonhosted.org/packages/c3/76/8a28136f3938ba9836f84280ce0c4d61ed1cf15a036b2034900c62634162/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:def79fa35ef0cef8d2accec024f4fdc7ead3012ff02f5215c783f39f03ef8cfc", size = 269455, upload-time = "2026-09-30T04:37:35.573Z" }, + { url = "https://files.pythonhosted.org/packages/a0/a1/4fbf5d0f0f1b2a080474c1cf9a2f12c4c6531bb0e8ba591055e846d2b4e9/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3df041de8887954562c9b261cba85ca0e9ded74048daf125f45edcfaa4832229", size = 257336, upload-time = "2026-09-30T04:37:37.397Z" }, + { url = "https://files.pythonhosted.org/packages/ba/a2/8b50aa320adb880ad579518e6f718f24944804b42a88b83d267d5d444125/charset_normalizer-3.5.2-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:04851f73ae72b8413dddadb16a49dfee95263553741fd42d546f7d66907e6be5", size = 257584, upload-time = "2026-09-30T04:37:39.522Z" }, + { url = "https://files.pythonhosted.org/packages/a5/57/50e3fed84e175f40349bd0da7a4fce94c87f0378f52d74f511d89e0bdc20/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:183b88127acdb4fabe59d951ab424faf1af7b63cdbb5f776186c1ea2ffcaed98", size = 251854, upload-time = "2026-09-30T04:37:41.23Z" }, + { url = "https://files.pythonhosted.org/packages/d6/54/f7fbb3493c9f49091213b9c2d6dd65800696f1ce1a3f196a4205f50417b1/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:16fa0eccf81304b79c5cd87f9271c3b85dd9dd99245e4422ae9c0dd45e0f99d3", size = 248767, upload-time = "2026-09-30T04:37:42.883Z" }, + { url = "https://files.pythonhosted.org/packages/d9/37/b3a6385acc5a1e45b39ae9c90bfb9cf838a09b9dd37ef2740ab4c6b4a2eb/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:7441d755b7ab94f8d4eb3e43ec05482d760842fd263d003a99102d742cd835e2", size = 274479, upload-time = "2026-09-30T04:37:44.658Z" }, + { url = "https://files.pythonhosted.org/packages/89/44/809913e2cfd279e635a9294fdbbfb1b1dc62a8189d473d561f649fce98d8/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:ca403d7e4798f525fdfc78e258820419cbbd0f0ecbab9de7840e3c017cf6b8cf", size = 258310, upload-time = "2026-09-30T04:37:46.529Z" }, + { url = "https://files.pythonhosted.org/packages/af/a2/f28400ab13359d91bd39179df8e149376b9bf36588e739a3a4f9de2b84b2/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:df29a0a7107f7011e77f4eebdddec4c7331e24d787a0b21a46d63bdf7445da95", size = 271100, upload-time = "2026-09-30T04:37:48.399Z" }, + { url = "https://files.pythonhosted.org/packages/e9/89/9bab37955edf0adb3b66f8a3a6617d9f2f487e0d56f295a6a286cb640aa6/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:f3c96f633825733f735c5a9cf21d21a257d8e1edf0b1cee0a064b9c424ca0f7d", size = 259936, upload-time = "2026-09-30T04:37:50.023Z" }, + { url = "https://files.pythonhosted.org/packages/23/b5/4459e08d45a679f903d50fea08bc52cfa728cca4d7bd02c757b5e5abda2e/charset_normalizer-3.5.2-cp315-cp315-win32.whl", hash = "sha256:281cb91036248400f4cc957495cccd44c275c2e0c5854f7e45ac5cf7dc193847", size = 186301, upload-time = "2026-09-30T04:37:51.722Z" }, + { url = "https://files.pythonhosted.org/packages/98/e8/55d5fd3935b4bce6da4fe0df61898e8c82653e317e677bd58aceb9c60f13/charset_normalizer-3.5.2-cp315-cp315-win_amd64.whl", hash = "sha256:89b53f3cda69831909888e0494f4fa0bcd3537e3e138dabeb620bd6ad946bae8", size = 210858, upload-time = "2026-09-30T04:37:53.427Z" }, + { url = "https://files.pythonhosted.org/packages/a9/5b/974423c2fd8e524c7a7f64318c1e02240ef954912fa2b4d70344107b9c68/charset_normalizer-3.5.2-cp315-cp315-win_arm64.whl", hash = "sha256:6be488a102b8cf28d0391d8c4ba7748938ae28b78ad901f8585520fca33ead1a", size = 200309, upload-time = "2026-09-30T04:37:55.015Z" }, + { url = "https://files.pythonhosted.org/packages/ee/f9/00ee0195db1013d8f7c416fd770fbeb560bb46eb2e36b054d05cb56f6cfa/charset_normalizer-3.5.2-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:915563965d418f986e7e145accc592eae9e1a1be3566ff98a05d7a9ec42a76e1", size = 395343, upload-time = "2026-09-30T04:37:56.743Z" }, + { url = "https://files.pythonhosted.org/packages/04/3a/c00b50e94c964cf934c7899cd47c97952fc11dad71cc5884b3c61795b09b/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:65cd72beeeca9d3aaea1201e5923859f308f952f9c71de93f06063c79f0f7a3b", size = 250114, upload-time = "2026-09-30T04:37:58.607Z" }, + { url = "https://files.pythonhosted.org/packages/50/27/d102dc880bbcffd0479ab64dfc1fb96777a854355a55e2bda72a71efadcb/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b7fd005a73d9e657273b7a10dc71a9e03c8fb9ee6999798d6918ce095b81ac7f", size = 239997, upload-time = "2026-09-30T04:38:00.511Z" }, + { url = "https://files.pythonhosted.org/packages/a5/4a/bf7ef45794dd293fab5f98a9309817977fbb845b9998f171b8cc5d8437a3/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e54da4baf05720032d527874d40b65fa4d7e5c6c6a43d0c3adbeffcaf275a2b3", size = 272313, upload-time = "2026-09-30T04:38:02.509Z" }, + { url = "https://files.pythonhosted.org/packages/e8/ee/008a2837737991474c5754bb3191010007663860979701990982a502cbaf/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:124fbf1a8ff966d87ae05bb8bd45a71f966055ed8bba320d0c7cf450bc5f4d0e", size = 269986, upload-time = "2026-09-30T04:38:04.435Z" }, + { url = "https://files.pythonhosted.org/packages/93/ad/bd74a283940dc910c5b14f8e4f80a248082bc9c0fcbe1f54530cb6d9cc5e/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:28b4f0d66fb834ff90f28209ac7bce77868c45d8c93e26f906709d9b7c2e1af9", size = 260202, upload-time = "2026-09-30T04:38:06.549Z" }, + { url = "https://files.pythonhosted.org/packages/8a/7b/ed341c66f69f688723501fac752be3d63c7159ca0d0d4174fc611e5710bb/charset_normalizer-3.5.2-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:58ca3755ee7ff7f59b57789ec9833c9de9ea275405cdd240eda1f193112e398a", size = 259083, upload-time = "2026-09-30T04:38:08.311Z" }, + { url = "https://files.pythonhosted.org/packages/cc/9d/e41588b777965e5031a43128a1e96173ebb35ac75fc53ec3b517e7c21cd4/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:443eae2bf318abeaf6f15d785138f71fd6de770e99a92158b8b814265e079115", size = 253081, upload-time = "2026-09-30T04:38:10.402Z" }, + { url = "https://files.pythonhosted.org/packages/81/35/b761eb6d8c1eb218b9b42b9b4d5ac902afdc399fb6dac6f9a9aac7bda589/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:58f361dcbab699cf8f42db3f47c8e7fd1036f138c23a5d08de9fde5f425a730c", size = 248712, upload-time = "2026-09-30T04:38:12.317Z" }, + { url = "https://files.pythonhosted.org/packages/4d/2c/147169a041b747759f37405c0a97157e8e92de967968373101ff14915cba/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:1b4cbc7c3491ccb4aa17fcd8165649d01cf39f76de1696da8631b5f71b85401d", size = 274176, upload-time = "2026-09-30T04:38:14.138Z" }, + { url = "https://files.pythonhosted.org/packages/f0/2d/0ff8db0d373ba8538db686db11cd7e8912031490b9e4f383b41912e8d594/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:ba0b1d2620edf869789c3879223f52bf2afc5d31b3cb47cc57b3a12c05e2aa9d", size = 259413, upload-time = "2026-09-30T04:38:15.841Z" }, + { url = "https://files.pythonhosted.org/packages/8a/8e/b4a085fb47c9d3a7e43576a4784fdd8fe23f907514a972de8086edaf7a48/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:5e2b6b57e9733d39f0c9fd3185efa6b8e29652c4cd8fe94180272cf6ed9a78c4", size = 269434, upload-time = "2026-09-30T04:38:17.626Z" }, + { url = "https://files.pythonhosted.org/packages/83/1c/d8d8d7322a7c3eecdf3237a4a419cf41d2eaad8e006ce7dfdd9d4c8fa2eb/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:51cf45226a9b588d0d2b4880c62d686934b63ab0bd79ca23ab0e9762eb27441b", size = 262716, upload-time = "2026-09-30T04:38:19.214Z" }, + { url = "https://files.pythonhosted.org/packages/a0/16/0e4c6ba9b44e97a2da150e52d331e8f9c968b21b358fbffa6c856cebcd89/charset_normalizer-3.5.2-cp315-cp315t-win32.whl", hash = "sha256:5fb29fb8cd1a46c27a1bf9613ad5ec2599310d46b4025d9556404a6b6a292800", size = 197159, upload-time = "2026-09-30T04:38:21.037Z" }, + { url = "https://files.pythonhosted.org/packages/be/33/e90bc2b1374f7f36ef106f56620de5a783907e19ca857efe2277e31cac3e/charset_normalizer-3.5.2-cp315-cp315t-win_amd64.whl", hash = "sha256:a192e2c40070d92c3ccf777e3a5c4ff515573cd2bb7ed0c537fdadbbec5bbf21", size = 221322, upload-time = "2026-09-30T04:38:22.886Z" }, + { url = "https://files.pythonhosted.org/packages/66/89/dfa6dcb08c200b7830ab56439e8c1890f2971d51aafbb3937894a2e7fcfc/charset_normalizer-3.5.2-cp315-cp315t-win_arm64.whl", hash = "sha256:749e97e1b32313717a565abbe321bc2190bc8b35f1a67e4cdbc7c56c8d8ffe58", size = 209192, upload-time = "2026-09-30T04:38:24.648Z" }, + { url = "https://files.pythonhosted.org/packages/8c/ab/176fbfd5b64939c55d652366aa5b9ef1d767af207a3aa6ebeb0d226c484d/charset_normalizer-3.5.2-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:4275811936e2f06feff5e598fb42a1b7ae852da8e39605211892b56b81a34efd", size = 331815, upload-time = "2026-09-30T04:38:26.216Z" }, + { url = "https://files.pythonhosted.org/packages/7e/84/371eac6b30bdbcbf2d632a1a01809103459216fcaae61b8b8d922c1bfb8a/charset_normalizer-3.5.2-cp37-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:1c50fe28bbc2ced33386f298650d91218076c05420e6cbd790b913adc41659e7", size = 253276, upload-time = "2026-09-30T04:38:28.032Z" }, + { url = "https://files.pythonhosted.org/packages/43/6f/c4fbae58febff71709c51bc7e18fdfa55341dc382704740f9f0cbf03817b/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d19fbd981a488e22cd04883659ca6b08f50b5974f9fd7c95655ef6a043e5893f", size = 241239, upload-time = "2026-09-30T04:38:29.732Z" }, + { url = "https://files.pythonhosted.org/packages/61/71/458c3f42164a07d0c5210798e9e704b39e540a6793b05aba67f3a35243a9/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0fed1d06615f022ee3b13caf5e8b180cfea32bb2c5aded8a9d44277afc040f93", size = 231121, upload-time = "2026-09-30T04:38:31.462Z" }, + { url = "https://files.pythonhosted.org/packages/09/54/ab9e89367076f6331bb6c65c4bf14a5361fa5191cb6561bf534f18504e1b/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:838dcc90063569a0448120554591a1d6c4a4ffe11babf048908793154ab86ade", size = 260350, upload-time = "2026-09-30T04:38:33.239Z" }, + { url = "https://files.pythonhosted.org/packages/7c/c1/061431ecc688d9d76602502cb57cc01e691e682c18f1beb45f9673b5bbd2/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2ce45c6627b22c47e390bc91a41c3d13032192e699fa0bea96e9671b373d69b0", size = 255430, upload-time = "2026-09-30T04:38:34.865Z" }, + { url = "https://files.pythonhosted.org/packages/8d/1f/20c8949f0676f7ab811abdeb7f4d7f1cbc6e61ff20bef08b44edeb092bc8/charset_normalizer-3.5.2-cp37-abi3-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0774bf9bf620249fee3e0b8b9fd3065de213be30f3aa94ce2494b3b638949e26", size = 250612, upload-time = "2026-09-30T04:38:36.649Z" }, + { url = "https://files.pythonhosted.org/packages/2b/9e/46f2fa4c431fc98c4ae76a8cb5bdca54e0341e3cfc3fcfd8e82740250818/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:1db38f4c5496827c1a501846d64d14c3b80c7e6714e406cd7dc36a9899fa1011", size = 242083, upload-time = "2026-09-30T04:38:38.26Z" }, + { url = "https://files.pythonhosted.org/packages/bd/39/559be29a0c0f086e0bba6922babd38916cc5e0b58ced4de13ee01ea05508/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:304d8e4d493af723536393eee0c689eb7813f4a474c8b479dee63f1fdd98f621", size = 232738, upload-time = "2026-09-30T04:38:39.81Z" }, + { url = "https://files.pythonhosted.org/packages/ff/6c/387b0e4f756a282831c1d9fc6aeb6c51ca4507ca202767c8de15ce9b12e2/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:9b7f416ff0978e2f2249330527f0ad6fa02f4932e6199692d3b52da2048c19e4", size = 260703, upload-time = "2026-09-30T04:38:41.346Z" }, + { url = "https://files.pythonhosted.org/packages/96/92/1fdf015f09ef449f50d3ac4b67c90887c9c318b727daa95cc4f866e6521d/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:01077390b03f7988f11d700a2194e69b119741a86b1a638b1db88891e3eced8e", size = 247622, upload-time = "2026-09-30T04:38:42.937Z" }, + { url = "https://files.pythonhosted.org/packages/dc/3c/8e7b8a5671ad5d433669fb2a76f1a0164df2d9b1718b0206bc2a16d840cc/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_s390x.whl", hash = "sha256:7e841fb9010836c992c9f12fcbd43a831de93a5f726fc1ccd8ca1d0268c5014c", size = 257500, upload-time = "2026-09-30T04:38:44.604Z" }, + { url = "https://files.pythonhosted.org/packages/b4/f0/45b579df5cabc1d5d53ea1cc35e8437d3ca768c0acccc7041517cb6fbb32/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:9cae88599c7219005d879f98e5ed53341e9a122af585e1091200358a3003d2a0", size = 255100, upload-time = "2026-09-30T04:38:46.289Z" }, + { url = "https://files.pythonhosted.org/packages/31/68/fdec18a343f5fb3f310588dd478b09ac4799e0b187dbade3a8cd776f03ef/charset_normalizer-3.5.2-cp37-abi3-win32.whl", hash = "sha256:01b0c0d2262a9e28e8484a278c7e1b5d650e3ac8cf2683d2967e25899f208bdf", size = 174499, upload-time = "2026-09-30T04:38:47.999Z" }, + { url = "https://files.pythonhosted.org/packages/9d/8a/b618149cc5207943a0242068d7a27897f56a62947b5a039085f2a22029f8/charset_normalizer-3.5.2-cp37-abi3-win_amd64.whl", hash = "sha256:9f56f72050826f63dcee7a7f55b0a77168cb3bfc553fd405e7f8f9ece75a4036", size = 200092, upload-time = "2026-09-30T04:38:49.707Z" }, + { url = "https://files.pythonhosted.org/packages/03/cf/4c66866fa9e2b1c78e3c911516d1de497a677b7ac60f1eceda74ce777ca3/charset_normalizer-3.5.2-cp37-abi3-win_arm64.whl", hash = "sha256:40ab6bffa02ae10a0581e6c198be7d2d8ca5c2a0c64e4ed3465d766df457573e", size = 294363, upload-time = "2026-09-30T04:38:51.312Z" }, + { url = "https://files.pythonhosted.org/packages/fc/ad/d07d7862a62ffa6d79d68074d14823243dd235a77c45262acbf6adeb28bf/charset_normalizer-3.5.2-py3-none-any.whl", hash = "sha256:b6b751274acb69d77b3323d6b7dbaa3c7fdfc1eb829b7eb61d262f32e1af9685", size = 68872, upload-time = "2026-09-30T04:39:21.828Z" }, +] + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, +] + +[[package]] +name = "embodirun-activevln-preparation" +version = "0.1.0" +source = { virtual = "." } +dependencies = [ + { name = "huggingface-hub" }, + { name = "ml-dtypes" }, + { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "numpy", version = "2.4.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.11.*'" }, + { name = "numpy", version = "2.5.4", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" }, + { name = "safetensors" }, +] + +[package.metadata] +requires-dist = [ + { name = "huggingface-hub", specifier = "==0.36.0" }, + { name = "ml-dtypes", specifier = ">=0.5,<1" }, + { name = "numpy", specifier = ">=1.26,<3" }, + { name = "safetensors", specifier = ">=0.8,<1" }, +] + +[[package]] +name = "filelock" +version = "4.1.0" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +sdist = { url = "https://files.pythonhosted.org/packages/4c/58/6fd434bec86eff7c38a3168454cb132b762b2bea9b3ac094101a2f7bc32a/filelock-4.1.0.tar.gz", hash = "sha256:ad7f724afef953e731b1cc39bcd3a09166d72ed7fcdf29e6e88b1c3235c6715d", size = 561277, upload-time = "2026-10-09T19:57:20.34Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ee/86/032133892a5de43b5a98200b01aadcad68cc255e274a762f08b8a76d2912/filelock-4.1.0-py3-none-any.whl", hash = "sha256:2ce9818e3e2d8f284c1a964414447ef148d42a5fd5e2a477a7118e574b293ec1", size = 133003, upload-time = "2026-10-09T19:57:18.716Z" }, +] + +[[package]] +name = "filelock" +version = "4.2.4" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.14'", + "python_full_version == '3.13.*'", + "python_full_version == '3.12.*'", + "python_full_version == '3.11.*'", +] +sdist = { url = "https://files.pythonhosted.org/packages/d8/28/3893324bcadf8f89b1616637468d766af3f625008c0735bf704fdfa86617/filelock-4.2.4.tar.gz", hash = "sha256:c6d8663535e1650ee430507b4ffbac7b464dd64b7647ea0112a9f406499d163d", size = 652444, upload-time = "2026-10-19T01:57:51.001Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e0/1b/5e74289a1878e666bb4b65fe5805a04cafcac2aa5f519ef1ead67ef91c56/filelock-4.2.4-py3-none-any.whl", hash = "sha256:301241438c57936ef93f4243a94f2559022268bfcf9b375a9a72eb0f8db8358e", size = 162475, upload-time = "2026-10-19T01:57:49.419Z" }, +] + +[[package]] +name = "fsspec" +version = "2026.9.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/77/cd/9be253869fc42e764de7f3dedd6969af7d44ff9c3375214a3442a6f3fc08/fsspec-2026.9.0.tar.gz", hash = "sha256:0f08147951c8cb31d844c3547d631053b127863b60be04cf06e121333ee0e2fe", size = 333545, upload-time = "2026-09-18T17:50:42.825Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6c/c0/a98505f18594f1bce828bb159cec0fcf9860562f1a2c85913409fc8f3d9e/fsspec-2026.9.0-py3-none-any.whl", hash = "sha256:8dd6e646e99ea382bd85f97a45e6b526a442d79423a7dc673f1e2756d05fcb5f", size = 221738, upload-time = "2026-09-18T17:50:41.341Z" }, +] + +[[package]] +name = "hf-xet" +version = "1.7.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/9e/27/06d899ea7bd721d272f84aac98bdb238de98af4cc767a69056d967d68c71/hf_xet-1.7.0.tar.gz", hash = "sha256:d406ec79053c0871817f700c2ac8c36ba0d87f9c34b7458b0f0063bb218b0466", size = 985689, upload-time = "2026-10-06T20:18:43.89Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9f/7c/3e45174942e6793adde6cba4daa7fb037275cf02a944d9eadfcf9ff33b86/hf_xet-1.7.0-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:fa029678be1ba7f953c409b0b27bf15cc69cd1c9b3a674fbd78856ebefca1052", size = 3803919, upload-time = "2026-10-06T20:18:09.844Z" }, + { url = "https://files.pythonhosted.org/packages/ff/3a/5e8b363391adcbb002e191dbf924dab31464ea9c45adfeb73502afc36d35/hf_xet-1.7.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:57bc157b8b7fe3bee9dcb9af7f3da8de41801c3b31a9ef68a77a33c6a6be382f", size = 3553588, upload-time = "2026-10-06T20:18:13.376Z" }, + { url = "https://files.pythonhosted.org/packages/e5/c2/0d1eaa5da13bbf9c896badc7f380601c7d973a87a6ffb4d100267c4536c1/hf_xet-1.7.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:87dab080f8f7d32781c2586904e3603f4e60d09bfc727706c3ae419e0829beeb", size = 4201962, upload-time = "2026-10-06T20:18:16.11Z" }, + { url = "https://files.pythonhosted.org/packages/23/2d/225d5b11a9ca7d31b9470a57f2b2be1a5cef8b84325a2146aeb4589e226c/hf_xet-1.7.0-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:b01fe18dbbd151a2403d2c64ed30dc6547b00d6babab9a617d77c7acdb81ee66", size = 3982978, upload-time = "2026-10-06T20:18:18.092Z" }, + { url = "https://files.pythonhosted.org/packages/93/34/9d681f0e3dac0b5dae0d7dea748429266f24e52415446523f464fbaa828e/hf_xet-1.7.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:4ee5e05a627f5ab5bad7a86582277d645556ea1e199903aae19e033a392aa13a", size = 4181558, upload-time = "2026-10-06T20:18:20.082Z" }, + { url = "https://files.pythonhosted.org/packages/de/f0/277f039b7d72027bc2ed277f1b62a2f70f740a5aac2a3e7243e5b6854c5d/hf_xet-1.7.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:19c0e64f14175ccb6a1aff69e0d2ab9ec5269a560e6687abaf2b3fa4f73de7cd", size = 4411546, upload-time = "2026-10-06T20:18:21.999Z" }, + { url = "https://files.pythonhosted.org/packages/3d/7f/832d3ddb49326114175b7bcc50daea8565c09fd21ac03a02b211c09fefb7/hf_xet-1.7.0-cp314-cp314t-win_amd64.whl", hash = "sha256:757168feb5679647c0bb13ee5d0faebe799c4dff9051419885a566ebd79f949d", size = 3812809, upload-time = "2026-10-06T20:18:24.288Z" }, + { url = "https://files.pythonhosted.org/packages/3d/c4/310c3c29e5beae7c049e63947bd1923d597883b41c9ec4718589920812c4/hf_xet-1.7.0-cp314-cp314t-win_arm64.whl", hash = "sha256:b91569d5f1b61c34b043687da02c05dd3604f3d329e7868510bf3f7971599006", size = 3646174, upload-time = "2026-10-06T20:18:26.279Z" }, + { url = "https://files.pythonhosted.org/packages/9c/0b/b03be21ffaada749ba0d3197d8aefbf1aa698bac149580421c15239b299e/hf_xet-1.7.0-cp38-abi3-macosx_10_12_x86_64.whl", hash = "sha256:e3e88a7a75d7d95cbee1f37dc31341d6201124cf21c6c4b1dfab8ccba9b09e0f", size = 3796096, upload-time = "2026-10-06T20:18:28.43Z" }, + { url = "https://files.pythonhosted.org/packages/c3/47/a26ebdce7056a61e931f228439bc0ab08cbec239d1690f965e5e637cba79/hf_xet-1.7.0-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:59fba37039233c7fcbe196817d6cdcf1b40dfb17b410f229d85b0cf0a1848da4", size = 3560352, upload-time = "2026-10-06T20:18:30.365Z" }, + { url = "https://files.pythonhosted.org/packages/a3/4c/2bf3b66c215d409655f28de1622393dde04c9461280d48c7924bb3b2decd/hf_xet-1.7.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:2814a6e999d13464c4d679b788cc5d784eb5a4edfc638a31f10e9a11ab531ef8", size = 4212180, upload-time = "2026-10-06T20:18:32.292Z" }, + { url = "https://files.pythonhosted.org/packages/49/0c/a2f703a5a78267556e89e03316fa0805c86b72b50829bc67665746e8ebf0/hf_xet-1.7.0-cp38-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:fcfd6c22418e57dd5b3aea649e813b2e2cfb2aebf317b210d90f1fe4b3018b52", size = 3990011, upload-time = "2026-10-06T20:18:34.21Z" }, + { url = "https://files.pythonhosted.org/packages/a4/77/e52e4201b1cbf571530a61cc57f70182045a39a230089ee5f1df182a4de2/hf_xet-1.7.0-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:80f79dae613ce9e0ea1fd1ae15616ca9ac74aed4c770aabc199c4f03ebecc863", size = 4190628, upload-time = "2026-10-06T20:18:36.062Z" }, + { url = "https://files.pythonhosted.org/packages/6c/dc/03a21b89f118664a0926ff25b0f8e44a519bf22724a6a8fc7a9abbc188b6/hf_xet-1.7.0-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:0a9e802f33bf50c851abe45fc5380e61f959e2d369647d6742b79ad9d6c27cab", size = 4418814, upload-time = "2026-10-06T20:18:37.888Z" }, + { url = "https://files.pythonhosted.org/packages/4d/59/b35106dfa71b6eef605dc88bd038fe99c7f86fb132a15b60d0bf2f235b2c/hf_xet-1.7.0-cp38-abi3-win_amd64.whl", hash = "sha256:2b7bb5727889b0f2436dbaaad8fc4c3e66b8240d992716989e0c086b4278b1bc", size = 3822644, upload-time = "2026-10-06T20:18:40.052Z" }, + { url = "https://files.pythonhosted.org/packages/48/cd/072313585f74fe9d441e2eb5e0a4703c30586cd709810ea369675f61b74e/hf_xet-1.7.0-cp38-abi3-win_arm64.whl", hash = "sha256:acc3851cf2576a8fb2ae926da863f4efabe21303cf292e9a44332802ab0dcc6a", size = 3662436, upload-time = "2026-10-06T20:18:42.205Z" }, +] + +[[package]] +name = "huggingface-hub" +version = "0.36.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "filelock", version = "4.1.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "filelock", version = "4.2.4", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, + { name = "fsspec" }, + { name = "hf-xet", marker = "platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'arm64' or platform_machine == 'x86_64'" }, + { name = "packaging" }, + { name = "pyyaml" }, + { name = "requests" }, + { name = "tqdm" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/98/63/4910c5fa9128fdadf6a9c5ac138e8b1b6cee4ca44bf7915bbfbce4e355ee/huggingface_hub-0.36.0.tar.gz", hash = "sha256:47b3f0e2539c39bf5cde015d63b72ec49baff67b6931c3d97f3f84532e2b8d25", size = 463358, upload-time = "2025-10-23T12:12:01.413Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cb/bd/1a875e0d592d447cbc02805fd3fe0f497714d6a2583f59d14fa9ebad96eb/huggingface_hub-0.36.0-py3-none-any.whl", hash = "sha256:7bcc9ad17d5b3f07b57c78e79d527102d08313caa278a641993acddcb894548d", size = 566094, upload-time = "2025-10-23T12:11:59.557Z" }, +] + +[[package]] +name = "idna" +version = "3.20" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f5/08/8eea9d4b8302028f3abb2c0813953f7aec26d33b7a8960ed760e65ff29fa/idna-3.20.tar.gz", hash = "sha256:a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44", size = 216463, upload-time = "2026-09-17T14:11:04.752Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/58/a2/bb081bab032533a855d44de1d56f8e8426114ff1ba5d1f07a438a0a654f8/idna-3.20-py3-none-any.whl", hash = "sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c", size = 69583, upload-time = "2026-09-17T14:11:03.168Z" }, +] + +[[package]] +name = "ml-dtypes" +version = "0.6.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "numpy", version = "2.4.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.11.*'" }, + { name = "numpy", version = "2.5.4", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/12/72/307d7c4bd0600601c7133fba5cb78af7db968152951c1cd473abb1cda782/ml_dtypes-0.6.0.tar.gz", hash = "sha256:5e60251d32ced5598972e4d5e06a2f044341f9291402551a3f6f0ec44f9299b0", size = 3032327, upload-time = "2026-08-13T14:14:40.215Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/14/15/01285c64133ea38abf3b990a704d7d30e50daea2806d150bcc4163495d35/ml_dtypes-0.6.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:bad8d1dd5bed060a29332b99d63d0e5c2969081e1c6ea54adfbccfdfa783be44", size = 566808, upload-time = "2026-08-13T14:13:50.012Z" }, + { url = "https://files.pythonhosted.org/packages/e7/54/850d9b8b35549182f7c7f2cf742ce75c853ee880101bbc51cca0d62732e3/ml_dtypes-0.6.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:008382aeab529df5d3f00501ad9a7dcd64494d4b5b1971fc4c79019e6c1f5010", size = 356865, upload-time = "2026-08-13T14:13:51.339Z" }, + { url = "https://files.pythonhosted.org/packages/e9/15/844f5402145ce73bec8eb3afeb9f41d2bf99e0c8617c93f9e9886f26b419/ml_dtypes-0.6.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6ec0d244a5bba12239025389ad88bbfb45f9f10e25ab4f678e9a4768ebd47532", size = 412036, upload-time = "2026-08-13T14:13:52.494Z" }, + { url = "https://files.pythonhosted.org/packages/f8/63/efc9257a1ef0f53dfc76dedfe70d7d35118fbcdb810bb48cb7323ebd0b87/ml_dtypes-0.6.0-cp310-cp310-win_amd64.whl", hash = "sha256:03ce583adfce34ad33aa9e1fc7a8344dcf90ea776cc4ef0e5a48d4eae84e5d20", size = 433668, upload-time = "2026-08-13T14:13:53.668Z" }, + { url = "https://files.pythonhosted.org/packages/b8/2c/318cd1a9014c63939ffe687e19559ae12831fcc37d66c71ad1f616f1ffd6/ml_dtypes-0.6.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:f4f59f83c82ab480e924b988e7b1b4eb4de836dfcf5390c6f59148d1a00e1d02", size = 566813, upload-time = "2026-08-13T14:13:55.053Z" }, + { url = "https://files.pythonhosted.org/packages/d9/83/706b8a39449f0d55a7d5f7d07a169da4decfafae8a1f4983a9236d4b49e8/ml_dtypes-0.6.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7728c0420ec1c338564fc8b01015ff2d58567e70f17fedce5a0a7c0308c0d5b9", size = 356864, upload-time = "2026-08-13T14:13:56.249Z" }, + { url = "https://files.pythonhosted.org/packages/2e/b1/135a7bf47633f5b9184f0d0316af819884124d12b40965064bd216266514/ml_dtypes-0.6.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6c8e39b53e90afda8ce52859c93de4dba3e02b76d85dcf091cc469f9184c6dae", size = 412043, upload-time = "2026-08-13T14:13:57.614Z" }, + { url = "https://files.pythonhosted.org/packages/07/23/8870bb62d6e499d6bcbc1242b9f11689bae00a3d39d3684a9aefad8b6ee6/ml_dtypes-0.6.0-cp311-cp311-win_amd64.whl", hash = "sha256:3035518e3e19add1a4cac9236ab22888b208a4074912514313ccb2d6d242cde8", size = 433670, upload-time = "2026-08-13T14:13:59.097Z" }, + { url = "https://files.pythonhosted.org/packages/cf/7a/5d8fbe24d0bffd0d7cb5165a89f8ab7c3de000f26d6705242aeed99d583c/ml_dtypes-0.6.0-cp311-cp311-win_arm64.whl", hash = "sha256:5a519c9e95a216fbcb8e759793ef7fb40793fc803ed839142d6dc5be9be5bc89", size = 551915, upload-time = "2026-08-13T14:14:00.368Z" }, + { url = "https://files.pythonhosted.org/packages/84/6a/441eb053b078954f7fea284dfb288701884d0a1404d39babb858e1649023/ml_dtypes-0.6.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:5359c588cc62de6f78d7430f06b65853d884955494d86d6ad90b6dd64a3f3a08", size = 565447, upload-time = "2026-08-13T14:14:01.737Z" }, + { url = "https://files.pythonhosted.org/packages/ed/cf/87e8a6c57eed63a91782a0d229856ddf73e138ce004dd71e2799a9dcdb33/ml_dtypes-0.6.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:37da32aa97749251025666d62372775019594577b9c9e9cfda83bed48d778fdb", size = 360227, upload-time = "2026-08-13T14:14:02.938Z" }, + { url = "https://files.pythonhosted.org/packages/c7/f9/7d76c1eae866f5d4636401b31b6d6dd90e4b4ced1fa7cfdfcca9c60e4bd3/ml_dtypes-0.6.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3b4a480aa8fd54a1805b8ac10f3f91763926a74f73c0c364c10f9231854f4170", size = 409890, upload-time = "2026-08-13T14:14:04.248Z" }, + { url = "https://files.pythonhosted.org/packages/ba/db/9c61ec2760b5cbfb1c6558d5c991a6d8fd3271053c32db20506a9a90272b/ml_dtypes-0.6.0-cp312-cp312-win_amd64.whl", hash = "sha256:2a3e9d53925597fbffafd2a37048dadeddd0bdaba58058f6ae0869ed709a184d", size = 439333, upload-time = "2026-08-13T14:14:05.501Z" }, + { url = "https://files.pythonhosted.org/packages/6a/57/780ca3e5ab135b9fbdd8e5441abf5f801b30398371b691291e05ab9834c0/ml_dtypes-0.6.0-cp312-cp312-win_arm64.whl", hash = "sha256:6eaed129a4afe90694b8685e2f9b6294849f5eda4af9a15be83a4326eeebd775", size = 552268, upload-time = "2026-08-13T14:14:06.866Z" }, + { url = "https://files.pythonhosted.org/packages/50/51/fd1582b8f5ed8a9e7be0e161a6ea0dff70cb280479a12178df0b3a72700e/ml_dtypes-0.6.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:084dfe51a7ad58b171f05115f8226ed4233a454a1611371947e806e76f0c638d", size = 565468, upload-time = "2026-08-13T14:14:08.5Z" }, + { url = "https://files.pythonhosted.org/packages/d2/22/20fd70ca6ed12446cb92d5b2a7745bd185f9d8b8cdeeadad976574398e6b/ml_dtypes-0.6.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:28d676428b104bb9717b0928bc5c5129f2d6b51b6727587cc4289e7bf8713cb5", size = 360232, upload-time = "2026-08-13T14:14:09.873Z" }, + { url = "https://files.pythonhosted.org/packages/89/a5/da8ae6c6f1babe4b68e3e55d43d39b529e29774f10e0910671a6b8c86eb8/ml_dtypes-0.6.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:26b1f1fa4f0435a2946859823f6e2bf06796f1e9f10f5a05b08a5e3c8f46ff69", size = 410169, upload-time = "2026-08-13T14:14:11.036Z" }, + { url = "https://files.pythonhosted.org/packages/e2/55/4561acefa00fa4bcbfb82ca6a48578b41f372cd7dd7cdd6eb4720abc2e5f/ml_dtypes-0.6.0-cp313-cp313-win_amd64.whl", hash = "sha256:fb87f46b4f7ad7b5d3ad8f4b452b024bd4229d44c8ff934798c1fe656210387a", size = 439357, upload-time = "2026-08-13T14:14:12.172Z" }, + { url = "https://files.pythonhosted.org/packages/b1/5d/6a01538e507ef0ed5e879985b13a92467bf8960696fb1131f8b8cadc60ff/ml_dtypes-0.6.0-cp313-cp313-win_arm64.whl", hash = "sha256:57ed0d6b4ac5e7868361303a9c57fbcf63b768236ee14456f585dfcf260d0292", size = 552278, upload-time = "2026-08-13T14:14:13.539Z" }, + { url = "https://files.pythonhosted.org/packages/d9/7a/97dc35667b7c9db33c5344c673cd27f87e34771875ea7100138726132ac9/ml_dtypes-0.6.0-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:84fa136b8602c8c39e3b6cb24918960cd6f36cade7a70376f56770729cd56510", size = 562551, upload-time = "2026-08-13T14:14:14.774Z" }, + { url = "https://files.pythonhosted.org/packages/db/48/77f0ede10558d0d935da2e3276ed7e9c8cc2bad3463b9a0b66b03fc60be2/ml_dtypes-0.6.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:317be9967fb84b0ce4e80e6b1bf71213d21971621cf6f1e501a63602a95297bf", size = 360334, upload-time = "2026-08-13T14:14:16.079Z" }, + { url = "https://files.pythonhosted.org/packages/1c/b1/1831dd8c9b06c013085d31a2ac4f03392d43bd36bfc6ff591a08bcedc1cf/ml_dtypes-0.6.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8f490c003369ce60e514a0c3b12374f05274c101fee1bead6740ec8a564032b0", size = 409966, upload-time = "2026-08-13T14:14:17.477Z" }, + { url = "https://files.pythonhosted.org/packages/ff/ad/9c32c53f823dda3742df19a79c10bc198365937873ea125ba65747440c23/ml_dtypes-0.6.0-cp314-cp314-win_amd64.whl", hash = "sha256:d574c2b28921dc72e869df248f1a278f6eee176a1f237c8642e1a71eb15f3977", size = 457224, upload-time = "2026-08-13T14:14:18.608Z" }, + { url = "https://files.pythonhosted.org/packages/41/3d/dd98205418a13353d41c52bf5326d8cbec515aace46174e23c6ea01c2978/ml_dtypes-0.6.0-cp314-cp314-win_arm64.whl", hash = "sha256:f4adb4af61516510d786cf8c01851a66f6d3ddfa79e1144deaa5b40d8507231e", size = 568378, upload-time = "2026-08-13T14:14:19.843Z" }, + { url = "https://files.pythonhosted.org/packages/65/36/32e7beef3281fed74883451477ad976364323206dbfaa95e948ba788dac7/ml_dtypes-0.6.0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:3e169214e0d80ff1c038e1b3017e33c23e43bdf948d42d31de8283111c7e2fa3", size = 590177, upload-time = "2026-08-13T14:14:20.971Z" }, + { url = "https://files.pythonhosted.org/packages/d7/a2/99b3d9b3c984b3bd1e81d8244f1fa2f812e44060d853205b2df6271aa17c/ml_dtypes-0.6.0-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:573b11f3c327e17ef3826d266e676cf1149a1f3016f822a05f2306c55d8246bf", size = 363142, upload-time = "2026-08-13T14:14:22.463Z" }, + { url = "https://files.pythonhosted.org/packages/0c/fb/8091c0aee7f2712de99c7fd4b1642382644dec6a4962effe4f5b9d16a973/ml_dtypes-0.6.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b76fa1d3f92967d58289ac47ab7458ede66e6f3527fff3e59142aee57d9307cd", size = 430645, upload-time = "2026-08-13T14:14:23.737Z" }, + { url = "https://files.pythonhosted.org/packages/c4/6f/962d2c589513b5930d05b6eae5fbd22ad8bbcf26bb763449f3d8f912360f/ml_dtypes-0.6.0-cp314-cp314t-win_amd64.whl", hash = "sha256:3be9911d953f97cddded4b9961d7b650473b7e55806d20f6176f8356dfe7b38e", size = 465667, upload-time = "2026-08-13T14:14:25.04Z" }, + { url = "https://files.pythonhosted.org/packages/aa/ca/bcb25e246edd19af5fa1cf6267040bd9977a7afca846e6cfd4a52078b44f/ml_dtypes-0.6.0-cp314-cp314t-win_arm64.whl", hash = "sha256:e74266ca8e97874a937b7646378c178025650a236584f7474d10d8086a6edea3", size = 572706, upload-time = "2026-08-13T14:14:26.296Z" }, + { url = "https://files.pythonhosted.org/packages/12/42/46cb442648e3c774d8cb25f2e1e41d496cdcc91fbe9c2a6f75c0b8df7af6/ml_dtypes-0.6.0-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:b1b503864fada3f74fabf8d9fee7b4c1cbe956301e6fdece975d5f77c2fce958", size = 562550, upload-time = "2026-08-13T14:14:27.542Z" }, + { url = "https://files.pythonhosted.org/packages/07/56/844eff5af7a2d1a09d75df12c70225c3a6b6a771f95876b2bf5f7d10ad44/ml_dtypes-0.6.0-cp315-cp315-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9c6ad60af4102789a5c09824004beade2f7f28cd1cd581ee5c170d9dc2fbb00e", size = 360332, upload-time = "2026-08-13T14:14:28.767Z" }, + { url = "https://files.pythonhosted.org/packages/b6/29/b7165a3a76364a5baa6aa4ee82a0adf73a3c014b8cd126120b62cc087992/ml_dtypes-0.6.0-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d4f1b9329a251e4affe3bb58f4d3e2db22a714396fd7ffb40d0b5db423c24d17", size = 409964, upload-time = "2026-08-13T14:14:30.023Z" }, + { url = "https://files.pythonhosted.org/packages/c8/2e/f61c54a0544b6a170ac1bb89bcf406af53fb2deffc5476b6d2d3df5ba13e/ml_dtypes-0.6.0-cp315-cp315-win_amd64.whl", hash = "sha256:488c99ab181a2f59d9ec3b12c5fa11ec904e92be2c4ba18cded54dd7501208fe", size = 457249, upload-time = "2026-08-13T14:14:31.213Z" }, + { url = "https://files.pythonhosted.org/packages/63/00/bee1bc9faa02a46e7a851019fd23f47ca1f906609edbec8b6ba5decc3cc3/ml_dtypes-0.6.0-cp315-cp315-win_arm64.whl", hash = "sha256:de9d14748dbf3968951436ef514a29c9d1fe438aa680d110134ee2f7a9f9df18", size = 568381, upload-time = "2026-08-13T14:14:32.548Z" }, + { url = "https://files.pythonhosted.org/packages/72/f7/9a5edede28f73185fd51d75030ef7f11d76997bab3a92427d986e54fe2eb/ml_dtypes-0.6.0-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:e25bb3b0ad1217b60626e4ed45b10ca170c41d99fbe44a12bebc1e07ec4aad55", size = 589877, upload-time = "2026-08-13T14:14:33.695Z" }, + { url = "https://files.pythonhosted.org/packages/fd/81/d5924a141b850b606eb027493c9c3ca3c665cca5163af3f5b6e5e3345503/ml_dtypes-0.6.0-cp315-cp315t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:31f1ce979d31a357e95aa81812f20412c8c954fa43c44ee3ead1e1c8a78575ef", size = 362788, upload-time = "2026-08-13T14:14:34.996Z" }, + { url = "https://files.pythonhosted.org/packages/59/8f/3298e3f334832bc28dd144af6b99cdc93502a8687e71922ea68b0a319929/ml_dtypes-0.6.0-cp315-cp315t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e2d6149f3a57f405bcad5fb41e03218b8373936253f23e1ca84c0108abbc3392", size = 430823, upload-time = "2026-08-13T14:14:36.44Z" }, + { url = "https://files.pythonhosted.org/packages/93/d2/f2dbf118f42ce4c325a139c9236737f436b7f8e00cd18701c99ef2405e6f/ml_dtypes-0.6.0-cp315-cp315t-win_amd64.whl", hash = "sha256:ce7563e0b1a4482cbc1b4a6272145e54e4489e54fe7428f94908c3d87103abfa", size = 465119, upload-time = "2026-08-13T14:14:37.776Z" }, + { url = "https://files.pythonhosted.org/packages/5a/ff/bda40387b5c5c64254595f4d81a12351770856acc5de4e6d43606a31f161/ml_dtypes-0.6.0-cp315-cp315t-win_arm64.whl", hash = "sha256:f6cb525101b6b903779188c1e9e9490c343b455ab822883e02cf01e5547338d2", size = 572666, upload-time = "2026-08-13T14:14:38.993Z" }, +] + +[[package]] +name = "numpy" +version = "2.2.6" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +sdist = { url = "https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz", hash = "sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd", size = 20276440, upload-time = "2025-05-17T22:38:04.611Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb", size = 21165245, upload-time = "2025-05-17T21:27:58.555Z" }, + { url = "https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90", size = 14360048, upload-time = "2025-05-17T21:28:21.406Z" }, + { url = "https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163", size = 5340542, upload-time = "2025-05-17T21:28:30.931Z" }, + { url = "https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf", size = 6878301, upload-time = "2025-05-17T21:28:41.613Z" }, + { url = "https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83", size = 14297320, upload-time = "2025-05-17T21:29:02.78Z" }, + { url = "https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915", size = 16801050, upload-time = "2025-05-17T21:29:27.675Z" }, + { url = "https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680", size = 15807034, upload-time = "2025-05-17T21:29:51.102Z" }, + { url = "https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289", size = 18614185, upload-time = "2025-05-17T21:30:18.703Z" }, + { url = "https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl", hash = "sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d", size = 6527149, upload-time = "2025-05-17T21:30:29.788Z" }, + { url = "https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl", hash = "sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3", size = 12904620, upload-time = "2025-05-17T21:30:48.994Z" }, + { url = "https://files.pythonhosted.org/packages/da/a8/4f83e2aa666a9fbf56d6118faaaf5f1974d456b1823fda0a176eff722839/numpy-2.2.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f9f1adb22318e121c5c69a09142811a201ef17ab257a1e66ca3025065b7f53ae", size = 21176963, upload-time = "2025-05-17T21:31:19.36Z" }, + { url = "https://files.pythonhosted.org/packages/b3/2b/64e1affc7972decb74c9e29e5649fac940514910960ba25cd9af4488b66c/numpy-2.2.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c820a93b0255bc360f53eca31a0e676fd1101f673dda8da93454a12e23fc5f7a", size = 14406743, upload-time = "2025-05-17T21:31:41.087Z" }, + { url = "https://files.pythonhosted.org/packages/4a/9f/0121e375000b5e50ffdd8b25bf78d8e1a5aa4cca3f185d41265198c7b834/numpy-2.2.6-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:3d70692235e759f260c3d837193090014aebdf026dfd167834bcba43e30c2a42", size = 5352616, upload-time = "2025-05-17T21:31:50.072Z" }, + { url = "https://files.pythonhosted.org/packages/31/0d/b48c405c91693635fbe2dcd7bc84a33a602add5f63286e024d3b6741411c/numpy-2.2.6-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:481b49095335f8eed42e39e8041327c05b0f6f4780488f61286ed3c01368d491", size = 6889579, upload-time = "2025-05-17T21:32:01.712Z" }, + { url = "https://files.pythonhosted.org/packages/52/b8/7f0554d49b565d0171eab6e99001846882000883998e7b7d9f0d98b1f934/numpy-2.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b64d8d4d17135e00c8e346e0a738deb17e754230d7e0810ac5012750bbd85a5a", size = 14312005, upload-time = "2025-05-17T21:32:23.332Z" }, + { url = "https://files.pythonhosted.org/packages/b3/dd/2238b898e51bd6d389b7389ffb20d7f4c10066d80351187ec8e303a5a475/numpy-2.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba10f8411898fc418a521833e014a77d3ca01c15b0c6cdcce6a0d2897e6dbbdf", size = 16821570, upload-time = "2025-05-17T21:32:47.991Z" }, + { url = "https://files.pythonhosted.org/packages/83/6c/44d0325722cf644f191042bf47eedad61c1e6df2432ed65cbe28509d404e/numpy-2.2.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:bd48227a919f1bafbdda0583705e547892342c26fb127219d60a5c36882609d1", size = 15818548, upload-time = "2025-05-17T21:33:11.728Z" }, + { url = "https://files.pythonhosted.org/packages/ae/9d/81e8216030ce66be25279098789b665d49ff19eef08bfa8cb96d4957f422/numpy-2.2.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9551a499bf125c1d4f9e250377c1ee2eddd02e01eac6644c080162c0c51778ab", size = 18620521, upload-time = "2025-05-17T21:33:39.139Z" }, + { url = "https://files.pythonhosted.org/packages/6a/fd/e19617b9530b031db51b0926eed5345ce8ddc669bb3bc0044b23e275ebe8/numpy-2.2.6-cp311-cp311-win32.whl", hash = "sha256:0678000bb9ac1475cd454c6b8c799206af8107e310843532b04d49649c717a47", size = 6525866, upload-time = "2025-05-17T21:33:50.273Z" }, + { url = "https://files.pythonhosted.org/packages/31/0a/f354fb7176b81747d870f7991dc763e157a934c717b67b58456bc63da3df/numpy-2.2.6-cp311-cp311-win_amd64.whl", hash = "sha256:e8213002e427c69c45a52bbd94163084025f533a55a59d6f9c5b820774ef3303", size = 12907455, upload-time = "2025-05-17T21:34:09.135Z" }, + { url = "https://files.pythonhosted.org/packages/82/5d/c00588b6cf18e1da539b45d3598d3557084990dcc4331960c15ee776ee41/numpy-2.2.6-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:41c5a21f4a04fa86436124d388f6ed60a9343a6f767fced1a8a71c3fbca038ff", size = 20875348, upload-time = "2025-05-17T21:34:39.648Z" }, + { url = "https://files.pythonhosted.org/packages/66/ee/560deadcdde6c2f90200450d5938f63a34b37e27ebff162810f716f6a230/numpy-2.2.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:de749064336d37e340f640b05f24e9e3dd678c57318c7289d222a8a2f543e90c", size = 14119362, upload-time = "2025-05-17T21:35:01.241Z" }, + { url = "https://files.pythonhosted.org/packages/3c/65/4baa99f1c53b30adf0acd9a5519078871ddde8d2339dc5a7fde80d9d87da/numpy-2.2.6-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:894b3a42502226a1cac872f840030665f33326fc3dac8e57c607905773cdcde3", size = 5084103, upload-time = "2025-05-17T21:35:10.622Z" }, + { url = "https://files.pythonhosted.org/packages/cc/89/e5a34c071a0570cc40c9a54eb472d113eea6d002e9ae12bb3a8407fb912e/numpy-2.2.6-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:71594f7c51a18e728451bb50cc60a3ce4e6538822731b2933209a1f3614e9282", size = 6625382, upload-time = "2025-05-17T21:35:21.414Z" }, + { url = "https://files.pythonhosted.org/packages/f8/35/8c80729f1ff76b3921d5c9487c7ac3de9b2a103b1cd05e905b3090513510/numpy-2.2.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f2618db89be1b4e05f7a1a847a9c1c0abd63e63a1607d892dd54668dd92faf87", size = 14018462, upload-time = "2025-05-17T21:35:42.174Z" }, + { url = "https://files.pythonhosted.org/packages/8c/3d/1e1db36cfd41f895d266b103df00ca5b3cbe965184df824dec5c08c6b803/numpy-2.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd83c01228a688733f1ded5201c678f0c53ecc1006ffbc404db9f7a899ac6249", size = 16527618, upload-time = "2025-05-17T21:36:06.711Z" }, + { url = "https://files.pythonhosted.org/packages/61/c6/03ed30992602c85aa3cd95b9070a514f8b3c33e31124694438d88809ae36/numpy-2.2.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:37c0ca431f82cd5fa716eca9506aefcabc247fb27ba69c5062a6d3ade8cf8f49", size = 15505511, upload-time = "2025-05-17T21:36:29.965Z" }, + { url = "https://files.pythonhosted.org/packages/b7/25/5761d832a81df431e260719ec45de696414266613c9ee268394dd5ad8236/numpy-2.2.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fe27749d33bb772c80dcd84ae7e8df2adc920ae8297400dabec45f0dedb3f6de", size = 18313783, upload-time = "2025-05-17T21:36:56.883Z" }, + { url = "https://files.pythonhosted.org/packages/57/0a/72d5a3527c5ebffcd47bde9162c39fae1f90138c961e5296491ce778e682/numpy-2.2.6-cp312-cp312-win32.whl", hash = "sha256:4eeaae00d789f66c7a25ac5f34b71a7035bb474e679f410e5e1a94deb24cf2d4", size = 6246506, upload-time = "2025-05-17T21:37:07.368Z" }, + { url = "https://files.pythonhosted.org/packages/36/fa/8c9210162ca1b88529ab76b41ba02d433fd54fecaf6feb70ef9f124683f1/numpy-2.2.6-cp312-cp312-win_amd64.whl", hash = "sha256:c1f9540be57940698ed329904db803cf7a402f3fc200bfe599334c9bd84a40b2", size = 12614190, upload-time = "2025-05-17T21:37:26.213Z" }, + { url = "https://files.pythonhosted.org/packages/f9/5c/6657823f4f594f72b5471f1db1ab12e26e890bb2e41897522d134d2a3e81/numpy-2.2.6-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0811bb762109d9708cca4d0b13c4f67146e3c3b7cf8d34018c722adb2d957c84", size = 20867828, upload-time = "2025-05-17T21:37:56.699Z" }, + { url = "https://files.pythonhosted.org/packages/dc/9e/14520dc3dadf3c803473bd07e9b2bd1b69bc583cb2497b47000fed2fa92f/numpy-2.2.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:287cc3162b6f01463ccd86be154f284d0893d2b3ed7292439ea97eafa8170e0b", size = 14143006, upload-time = "2025-05-17T21:38:18.291Z" }, + { url = "https://files.pythonhosted.org/packages/4f/06/7e96c57d90bebdce9918412087fc22ca9851cceaf5567a45c1f404480e9e/numpy-2.2.6-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:f1372f041402e37e5e633e586f62aa53de2eac8d98cbfb822806ce4bbefcb74d", size = 5076765, upload-time = "2025-05-17T21:38:27.319Z" }, + { url = "https://files.pythonhosted.org/packages/73/ed/63d920c23b4289fdac96ddbdd6132e9427790977d5457cd132f18e76eae0/numpy-2.2.6-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:55a4d33fa519660d69614a9fad433be87e5252f4b03850642f88993f7b2ca566", size = 6617736, upload-time = "2025-05-17T21:38:38.141Z" }, + { url = "https://files.pythonhosted.org/packages/85/c5/e19c8f99d83fd377ec8c7e0cf627a8049746da54afc24ef0a0cb73d5dfb5/numpy-2.2.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f92729c95468a2f4f15e9bb94c432a9229d0d50de67304399627a943201baa2f", size = 14010719, upload-time = "2025-05-17T21:38:58.433Z" }, + { url = "https://files.pythonhosted.org/packages/19/49/4df9123aafa7b539317bf6d342cb6d227e49f7a35b99c287a6109b13dd93/numpy-2.2.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1bc23a79bfabc5d056d106f9befb8d50c31ced2fbc70eedb8155aec74a45798f", size = 16526072, upload-time = "2025-05-17T21:39:22.638Z" }, + { url = "https://files.pythonhosted.org/packages/b2/6c/04b5f47f4f32f7c2b0e7260442a8cbcf8168b0e1a41ff1495da42f42a14f/numpy-2.2.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e3143e4451880bed956e706a3220b4e5cf6172ef05fcc397f6f36a550b1dd868", size = 15503213, upload-time = "2025-05-17T21:39:45.865Z" }, + { url = "https://files.pythonhosted.org/packages/17/0a/5cd92e352c1307640d5b6fec1b2ffb06cd0dabe7d7b8227f97933d378422/numpy-2.2.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b4f13750ce79751586ae2eb824ba7e1e8dba64784086c98cdbbcc6a42112ce0d", size = 18316632, upload-time = "2025-05-17T21:40:13.331Z" }, + { url = "https://files.pythonhosted.org/packages/f0/3b/5cba2b1d88760ef86596ad0f3d484b1cbff7c115ae2429678465057c5155/numpy-2.2.6-cp313-cp313-win32.whl", hash = "sha256:5beb72339d9d4fa36522fc63802f469b13cdbe4fdab4a288f0c441b74272ebfd", size = 6244532, upload-time = "2025-05-17T21:43:46.099Z" }, + { url = "https://files.pythonhosted.org/packages/cb/3b/d58c12eafcb298d4e6d0d40216866ab15f59e55d148a5658bb3132311fcf/numpy-2.2.6-cp313-cp313-win_amd64.whl", hash = "sha256:b0544343a702fa80c95ad5d3d608ea3599dd54d4632df855e4c8d24eb6ecfa1c", size = 12610885, upload-time = "2025-05-17T21:44:05.145Z" }, + { url = "https://files.pythonhosted.org/packages/6b/9e/4bf918b818e516322db999ac25d00c75788ddfd2d2ade4fa66f1f38097e1/numpy-2.2.6-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0bca768cd85ae743b2affdc762d617eddf3bcf8724435498a1e80132d04879e6", size = 20963467, upload-time = "2025-05-17T21:40:44Z" }, + { url = "https://files.pythonhosted.org/packages/61/66/d2de6b291507517ff2e438e13ff7b1e2cdbdb7cb40b3ed475377aece69f9/numpy-2.2.6-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:fc0c5673685c508a142ca65209b4e79ed6740a4ed6b2267dbba90f34b0b3cfda", size = 14225144, upload-time = "2025-05-17T21:41:05.695Z" }, + { url = "https://files.pythonhosted.org/packages/e4/25/480387655407ead912e28ba3a820bc69af9adf13bcbe40b299d454ec011f/numpy-2.2.6-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:5bd4fc3ac8926b3819797a7c0e2631eb889b4118a9898c84f585a54d475b7e40", size = 5200217, upload-time = "2025-05-17T21:41:15.903Z" }, + { url = "https://files.pythonhosted.org/packages/aa/4a/6e313b5108f53dcbf3aca0c0f3e9c92f4c10ce57a0a721851f9785872895/numpy-2.2.6-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:fee4236c876c4e8369388054d02d0e9bb84821feb1a64dd59e137e6511a551f8", size = 6712014, upload-time = "2025-05-17T21:41:27.321Z" }, + { url = "https://files.pythonhosted.org/packages/b7/30/172c2d5c4be71fdf476e9de553443cf8e25feddbe185e0bd88b096915bcc/numpy-2.2.6-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e1dda9c7e08dc141e0247a5b8f49cf05984955246a327d4c48bda16821947b2f", size = 14077935, upload-time = "2025-05-17T21:41:49.738Z" }, + { url = "https://files.pythonhosted.org/packages/12/fb/9e743f8d4e4d3c710902cf87af3512082ae3d43b945d5d16563f26ec251d/numpy-2.2.6-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f447e6acb680fd307f40d3da4852208af94afdfab89cf850986c3ca00562f4fa", size = 16600122, upload-time = "2025-05-17T21:42:14.046Z" }, + { url = "https://files.pythonhosted.org/packages/12/75/ee20da0e58d3a66f204f38916757e01e33a9737d0b22373b3eb5a27358f9/numpy-2.2.6-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:389d771b1623ec92636b0786bc4ae56abafad4a4c513d36a55dce14bd9ce8571", size = 15586143, upload-time = "2025-05-17T21:42:37.464Z" }, + { url = "https://files.pythonhosted.org/packages/76/95/bef5b37f29fc5e739947e9ce5179ad402875633308504a52d188302319c8/numpy-2.2.6-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8e9ace4a37db23421249ed236fdcdd457d671e25146786dfc96835cd951aa7c1", size = 18385260, upload-time = "2025-05-17T21:43:05.189Z" }, + { url = "https://files.pythonhosted.org/packages/09/04/f2f83279d287407cf36a7a8053a5abe7be3622a4363337338f2585e4afda/numpy-2.2.6-cp313-cp313t-win32.whl", hash = "sha256:038613e9fb8c72b0a41f025a7e4c3f0b7a1b5d768ece4796b674c8f3fe13efff", size = 6377225, upload-time = "2025-05-17T21:43:16.254Z" }, + { url = "https://files.pythonhosted.org/packages/67/0e/35082d13c09c02c011cf21570543d202ad929d961c02a147493cb0c2bdf5/numpy-2.2.6-cp313-cp313t-win_amd64.whl", hash = "sha256:6031dd6dfecc0cf9f668681a37648373bddd6421fff6c66ec1624eed0180ee06", size = 12771374, upload-time = "2025-05-17T21:43:35.479Z" }, + { url = "https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d", size = 21040391, upload-time = "2025-05-17T21:44:35.948Z" }, + { url = "https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db", size = 6786754, upload-time = "2025-05-17T21:44:47.446Z" }, + { url = "https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543", size = 16643476, upload-time = "2025-05-17T21:45:11.871Z" }, + { url = "https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00", size = 12812666, upload-time = "2025-05-17T21:45:31.426Z" }, +] + +[[package]] +name = "numpy" +version = "2.4.6" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version == '3.11.*'", +] +sdist = { url = "https://files.pythonhosted.org/packages/d0/ad/fed0499ce6a338d2a03ebae59cd15093910c8875328855781952abf6c2fe/numpy-2.4.6.tar.gz", hash = "sha256:f3a3570c4a2a16746ac2c31a7c7c7b0c186b95ce902e33db6f28094ed7387dda", size = 20735807, upload-time = "2026-05-18T23:37:14.07Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b3/49/ec46835a70be8fa6446c495126ac84fdb28cb2558e1620ffb87a10c8b64c/numpy-2.4.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0280e0356c0829a18d9de1cb7eee50ec22ca639878d7240307ca0943d73cd2c4", size = 16969194, upload-time = "2026-05-18T23:33:13.503Z" }, + { url = "https://files.pythonhosted.org/packages/0e/0d/f5957185c0ee2f3e12f78715aa9e3b353fd83633316c8532b38faa37e3f6/numpy-2.4.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:110f8b71aacb688ec69062bb7f6938a0f8acb01b7c1c4beb453c65b6d234584d", size = 14964111, upload-time = "2026-05-18T23:33:17.795Z" }, + { url = "https://files.pythonhosted.org/packages/ad/40/40a40ee0ddf7ceb782c49af278894b686e586d65d8c1889c8b5da01a3d7d/numpy-2.4.6-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:4cfe66903cc32a9921a6733d96b19bb6abf310397581bbad89c228f5abaf0ee8", size = 5469159, upload-time = "2026-05-18T23:33:20.654Z" }, + { url = "https://files.pythonhosted.org/packages/63/13/f9a8046535cb21deae82f8d03de9617e08882d274fad2539630761888228/numpy-2.4.6-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:8155154c7c691289fe18f510b5d4657c68c67989f293f0535a91360392ff6538", size = 6798936, upload-time = "2026-05-18T23:33:22.987Z" }, + { url = "https://files.pythonhosted.org/packages/33/a8/6fa8c1a345a8c85dbb21932c447bee07c30a2c2a3f31e369c0a84b300147/numpy-2.4.6-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0ab0a9c4ffb1a6d95ef519fe4247dba8eb6b18ad93999f76b7f657039acabd47", size = 15966692, upload-time = "2026-05-18T23:33:26.62Z" }, + { url = "https://files.pythonhosted.org/packages/02/03/74fe2a4cb3817d94d86402f2506554130a2f01414e299b5a843e5a8a957f/numpy-2.4.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:89cd468399cfd2504718f0ba50e410dca55a170b61a02ad92bb18c8a65186e93", size = 16918164, upload-time = "2026-05-18T23:33:29.955Z" }, + { url = "https://files.pythonhosted.org/packages/c5/80/3615be3313f7e7696609bc194b9f0101da809df79e859bdb84e0cd043f46/numpy-2.4.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c2d37ab77531417474168eb79d6d80b14f821a966818505d03013d0833edb7a8", size = 17322877, upload-time = "2026-05-18T23:33:34.724Z" }, + { url = "https://files.pythonhosted.org/packages/ca/ac/a691e0fe2675e370d0e08ff905adc49a1c8830e8cae03efe4477e92cd55d/numpy-2.4.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f407cb6b8e9d6d8c626bc73c945db1706035af8fd632295547bf1c9e46d092d6", size = 18651487, upload-time = "2026-05-18T23:33:38.217Z" }, + { url = "https://files.pythonhosted.org/packages/15/a7/9bc1cd626d7bf6869bfedf27b91b6ab5dd607758bf8e959d6fa80c6a59cb/numpy-2.4.6-cp311-cp311-win32.whl", hash = "sha256:ddea102b48f9e339f3948bf22040944184627a30fdf7f858667673b9c5f033c8", size = 6233945, upload-time = "2026-05-18T23:33:41.331Z" }, + { url = "https://files.pythonhosted.org/packages/c5/31/7fc6239c12bce7e931463251cca4426c465e1876ba3cc785402ef4dd8f4e/numpy-2.4.6-cp311-cp311-win_amd64.whl", hash = "sha256:1e254a00cdf42b1e4d5b3d68d33af63268d41340d8885df2ab6470f2e1500147", size = 12608406, upload-time = "2026-05-18T23:33:44.131Z" }, + { url = "https://files.pythonhosted.org/packages/27/83/140f85a466595a16382996a1bf06b2b54bcd597488921b0c9daaeeda72af/numpy-2.4.6-cp311-cp311-win_arm64.whl", hash = "sha256:ed9749eef4cbd126da3dc1d6bcb3a57f5eb7ac6a6484146bdbf743f552dfc577", size = 10479528, upload-time = "2026-05-18T23:33:50.725Z" }, + { url = "https://files.pythonhosted.org/packages/95/2a/3d7b5ac8aac24feaf9ad7ed58f45b0bbc06d37e4338ae84c9f2298b570f9/numpy-2.4.6-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:001fbb8e08d942dd57599e781f2472269ee7f2755fae407b4f67b2f0b17da3f1", size = 16689119, upload-time = "2026-05-18T23:33:54.065Z" }, + { url = "https://files.pythonhosted.org/packages/ea/12/92c4c131527599e8288d6918e888d88726f84d805d784b771f32408aeaef/numpy-2.4.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ebfb099f8dcf083deef3ac1ca4c1503f387cf76296fcb3816b66f5ecb5f54fdb", size = 14699246, upload-time = "2026-05-18T23:33:57.621Z" }, + { url = "https://files.pythonhosted.org/packages/ad/fe/c0a6b7b2ca128a8fb228575147073b660656734b8ebe4d76c8fd748dcc79/numpy-2.4.6-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:3213d622a0283a39a93d188f3cf72b26862df52fbb4ca3697f51705016523d41", size = 5204410, upload-time = "2026-05-18T23:34:00.302Z" }, + { url = "https://files.pythonhosted.org/packages/f3/d4/9770d14ba719432bb90a421bfd443872ed0f70f7264b64bec12ea363d5fd/numpy-2.4.6-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:357cc07a6d7b0b182ff02249616a03742827ebb1277546b5c7cd7f7620a45698", size = 6551240, upload-time = "2026-05-18T23:34:02.852Z" }, + { url = "https://files.pythonhosted.org/packages/c9/c6/50a46a6205feba2343f1d6d17438107c5dc491ed1c736e6ea68689fd906b/numpy-2.4.6-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5f9fb9157b4ce2971008323afe46053787b526ef624fea915b261468a8421a0f", size = 15671012, upload-time = "2026-05-18T23:34:05.485Z" }, + { url = "https://files.pythonhosted.org/packages/99/60/14115e6364fa676c5397c2ad3004e527e9aa487abf5d0706ec81bbd08529/numpy-2.4.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:90f9849678c75fe7afa2d348ac842c168b0a4d3d61919687216dfc547976d853", size = 16645538, upload-time = "2026-05-18T23:34:09.265Z" }, + { url = "https://files.pythonhosted.org/packages/ae/c5/693cbe59e57db94d2231fa519ca3978dc9e19da5a8f088588f5c6e947ff2/numpy-2.4.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c1a2af6c6ef86344a6b0db6b97834208bf598db514f2b155042439b62605601a", size = 17020706, upload-time = "2026-05-18T23:34:13.053Z" }, + { url = "https://files.pythonhosted.org/packages/ef/fc/85b7c4eff9b4966ade25c2273cf7e7012e92366c032058653934b37de044/numpy-2.4.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e5805d5a22fd19c8ccff10a9561f9df94436b0545619ea579db2d3c35294bce2", size = 18368541, upload-time = "2026-05-18T23:34:17.024Z" }, + { url = "https://files.pythonhosted.org/packages/f6/81/e1b27545deedce7f4a0b348618c6b62d74e36a4dc9ccd42f3eb2f85eee32/numpy-2.4.6-cp312-cp312-win32.whl", hash = "sha256:e3eeb0aabd6bd5ce64faae67e9935203a6991b4bc2a485a767fbafb2c5125f45", size = 5962825, upload-time = "2026-05-18T23:34:20.3Z" }, + { url = "https://files.pythonhosted.org/packages/ab/ca/feab00bd44aa5fe1ad2c18f08b4d3bb92e26484b0b1d1443897809ed528c/numpy-2.4.6-cp312-cp312-win_amd64.whl", hash = "sha256:d8e8286dd7cea7895157318d1b91cdacac64c479f3cbc8dce548331728484751", size = 12321687, upload-time = "2026-05-18T23:34:23.095Z" }, + { url = "https://files.pythonhosted.org/packages/63/cf/5a6d34850a39d1093558564f77ee8e8e0bee5061151b8f05a55711001ec7/numpy-2.4.6-cp312-cp312-win_arm64.whl", hash = "sha256:4081eb135ac24158bd51cdfbef16f1c64df7063b1143f24731387137c092bec8", size = 10221482, upload-time = "2026-05-18T23:34:25.876Z" }, + { url = "https://files.pythonhosted.org/packages/fb/82/bdab26d7438c6791ca31b7c024ca37c1eab8b726ba236129005cd4a06e45/numpy-2.4.6-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:511dbaf848decaaaf4b4ca48032619fb3138710c4bf7da7617765edad1ef96b0", size = 16684648, upload-time = "2026-05-18T23:34:29.41Z" }, + { url = "https://files.pythonhosted.org/packages/1b/30/a80189bcc7f5e4258b3fbc3968d909d1756f54d023299ecc39ad6fdb9ef8/numpy-2.4.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:bf162abab1c1a736333192707cef898e735a5ca00f38f27eeedf44b39d9e85eb", size = 14693902, upload-time = "2026-05-18T23:34:33.013Z" }, + { url = "https://files.pythonhosted.org/packages/97/12/70b5d0d7c15e1ebb8a6a84a8caa1d19e181d84fb58bb6d70aca29099dec1/numpy-2.4.6-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:043191bfa8eab18c776647b62723ac9dddece59743b13f49b2016094129c2b3f", size = 5198992, upload-time = "2026-05-18T23:34:36.132Z" }, + { url = "https://files.pythonhosted.org/packages/ba/8c/ebd2a8f8a83541f8d38cc5667e8c2b69cecfd30da6e45693e8158857d44b/numpy-2.4.6-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:6180d8b35af935aed8ece3a85e0a43f87393ae0ac87c8d2c8bd2c993f7270ef3", size = 6546944, upload-time = "2026-05-18T23:34:38.484Z" }, + { url = "https://files.pythonhosted.org/packages/bb/c5/7b863a97a91671a0338f4253bd3b5a3d3852f0692dae91711c9f4a10e787/numpy-2.4.6-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:72fbe16c6fac95aedf5937fa873445cec2110be35d8a4e9433d7501fd98dae6b", size = 15669392, upload-time = "2026-05-18T23:34:41.257Z" }, + { url = "https://files.pythonhosted.org/packages/a5/9d/3584b9984ca4c047aea75214ce1a4c4c73d849bd71b604264b7f5653f8a8/numpy-2.4.6-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a7830bab239b79cda9c08c2da014761cafb48da6150e1da17ac06283f43b6089", size = 16633220, upload-time = "2026-05-18T23:34:45.075Z" }, + { url = "https://files.pythonhosted.org/packages/05/ae/7c67fba23bd98caec7c99261f3a16072ade14813486b0282cb29846de832/numpy-2.4.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ef4aea96ce4d3b074422cb4f2f64e216bf9e213004bb58ecfdf50ea02ea8eb9a", size = 17020800, upload-time = "2026-05-18T23:34:49.065Z" }, + { url = "https://files.pythonhosted.org/packages/d9/5d/3b6725cb31d983c5e66916f5d36f6d7e5521129e4c4404d64f918292a5b6/numpy-2.4.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:dfa20cc6ca228e6b155b11da03825975ce66aea520985dbbddf0f2a5a495c605", size = 18357600, upload-time = "2026-05-18T23:34:52.709Z" }, + { url = "https://files.pythonhosted.org/packages/f7/da/2ccc6c2fe8898dee01d90c75c5f5f914a23daf99e3e0f59516a08760c8b5/numpy-2.4.6-cp313-cp313-win32.whl", hash = "sha256:56b39e5e0622a09a25bf5baf62f4bcf0cb8a41ae6e2819cf49bbc5a74c083f91", size = 5961134, upload-time = "2026-05-18T23:34:55.618Z" }, + { url = "https://files.pythonhosted.org/packages/b5/cd/9cc4dc876fb065d5c220aae4d5e14826b2715331bb7618ce1fb07a679d99/numpy-2.4.6-cp313-cp313-win_amd64.whl", hash = "sha256:c4fc99836233ea196540b17ab0983aff60ed07941751930f5f4d05bc3b3b7359", size = 12318598, upload-time = "2026-05-18T23:34:58.928Z" }, + { url = "https://files.pythonhosted.org/packages/39/1e/c0bcba1f8694116485fe28fd1be698c278fcda4141c5b0e53a2aed8b12a8/numpy-2.4.6-cp313-cp313-win_arm64.whl", hash = "sha256:a7c711e21628b52034bb5ab8d1bce291f752fcc5e92accc615778acee1ff4778", size = 10222272, upload-time = "2026-05-18T23:35:02.167Z" }, + { url = "https://files.pythonhosted.org/packages/63/6d/cc5619247c8f4204e507f5883528372e4ac4bb189e579fb859a12e480b1f/numpy-2.4.6-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:112b06a867b235ef466ed3508ddf0238050df9c727cafb5301ac385b899189a1", size = 14821197, upload-time = "2026-05-18T23:35:05.468Z" }, + { url = "https://files.pythonhosted.org/packages/00/58/f1c39161c87d9e9bed660f1ed4bafc0e403d5ec9650b6dd77aead07d489b/numpy-2.4.6-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:eaf7fa2de5c0be8ae6ff8e9bea2ccd725e980541244521d8d4b5f3354a27babe", size = 5326287, upload-time = "2026-05-18T23:35:08.693Z" }, + { url = "https://files.pythonhosted.org/packages/af/57/3917ab0fd97f271a8694513581b8a36c655f111c446852c302f04ccdb6fc/numpy-2.4.6-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:7265a2f3d436e54ef9f2b52b5c937e6be778781bd97a590319d7348f1c1ca997", size = 6646763, upload-time = "2026-05-18T23:35:11.459Z" }, + { url = "https://files.pythonhosted.org/packages/eb/0f/037e64c494b67581ae18193d770adef354c41f3f2c8ebf865602d949bf8f/numpy-2.4.6-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f74a575920ab21fe304421a3fc28793d82e299cae9eccb37084e9fc7f3617c20", size = 15728070, upload-time = "2026-05-18T23:35:14.79Z" }, + { url = "https://files.pythonhosted.org/packages/21/a6/5d2bae9c9542eb4df16dc9c46dc79c186e9bad53805dfa5399a6023c6db0/numpy-2.4.6-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ede83e07a75dd06bc501566c1eca2afc0d61677c1472ac9ad93fdee6e638a48d", size = 16681752, upload-time = "2026-05-18T23:35:18.836Z" }, + { url = "https://files.pythonhosted.org/packages/92/14/23d1dfb410ae362cd59ce53e936b1513d545eb40db3949ced632e19a459e/numpy-2.4.6-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:68bb27509ac1b9a3443094260f6326150663b06abe40b73a2f81160623da5b67", size = 17086024, upload-time = "2026-05-18T23:35:22.52Z" }, + { url = "https://files.pythonhosted.org/packages/4b/6e/23595a2c642cdf3bc567877064bdd7f91c8b0038a4453cf2daf7248eafe9/numpy-2.4.6-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:a0df0043bdb289bde1f62da130d20df23d58b45429f752bc7a8fc5325a225ecd", size = 18403398, upload-time = "2026-05-18T23:35:26.398Z" }, + { url = "https://files.pythonhosted.org/packages/8a/90/0ac3bc947217e66dec77e7cbc6a1979d1af70b6461b82f620d3bccd5e4c8/numpy-2.4.6-cp313-cp313t-win32.whl", hash = "sha256:29a287e0cf63ff528da061de6b9f64a4618da591ca1046aafc54062e40ca7eab", size = 6084971, upload-time = "2026-05-18T23:35:29.387Z" }, + { url = "https://files.pythonhosted.org/packages/77/71/5673e351671a1d2bd6063b91b44f70c0affea7d1516fa7a6572941ba4aa1/numpy-2.4.6-cp313-cp313t-win_amd64.whl", hash = "sha256:25c692919ac5a01f170a3bfcd62d745b24fd095c353d50812637d6fcab442e75", size = 12458532, upload-time = "2026-05-18T23:35:32.175Z" }, + { url = "https://files.pythonhosted.org/packages/3f/88/19d3503c5046e688f049274b27a3ef3d771152fa80d3ba3d01a3dff61abe/numpy-2.4.6-cp313-cp313t-win_arm64.whl", hash = "sha256:1e978ec1e8bd0e0e4de6bb75de9d30cbb74db6b6a2bb727618613703ca0167dd", size = 10291881, upload-time = "2026-05-18T23:35:35.465Z" }, + { url = "https://files.pythonhosted.org/packages/f8/91/3ab2044d05fd16d343c5ac2e69b127f1b2854040dd20b193257c78028bd3/numpy-2.4.6-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:06ca2f61ec4385a07a6977c55ba998a4466c123642b4a32694d3128fce18c079", size = 16683458, upload-time = "2026-05-18T23:35:38.353Z" }, + { url = "https://files.pythonhosted.org/packages/8e/62/764ce66fa4147ae6d73071a3abf804ffe606f174618697c571acdf26a7c9/numpy-2.4.6-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:38efbc8de75c7a0fc1ac190162d892787f3f47b57cc291231aafee36b80982b7", size = 14704559, upload-time = "2026-05-18T23:35:42.14Z" }, + { url = "https://files.pythonhosted.org/packages/60/61/23f27c172f022e04025b7dc2367f4d63c1a398120607ec896228649a6f48/numpy-2.4.6-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:d581b735e177fdcdce6fed8e7e8880a3fb6ee4e3653a3ac6af01c6f4c03effc5", size = 5209716, upload-time = "2026-05-18T23:35:45.377Z" }, + { url = "https://files.pythonhosted.org/packages/03/71/21cf70dc6ea3e3acb95fc53a265b2fc248b981f0194ceb5b475271b8809d/numpy-2.4.6-cp314-cp314-macosx_14_0_x86_64.whl", hash = "sha256:0a041d3d761dc3c35cc56ce0351506a02bcbc25f7b169f652435141a17db9096", size = 6543947, upload-time = "2026-05-18T23:35:47.926Z" }, + { url = "https://files.pythonhosted.org/packages/d5/91/64288395ee1799bd2e0b04a305dce9666da90c961e1f3fe982a05ee1c036/numpy-2.4.6-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:40fdc1ae7125e518ea98e53e69a4ebc27e1fd50510c47b7ea130cf21e5e1d42b", size = 15685197, upload-time = "2026-05-18T23:35:50.863Z" }, + { url = "https://files.pythonhosted.org/packages/f3/eb/ebffaa97dc55502df69584a8f0dcf07f69a3e0b3e2323670a2722db9aa39/numpy-2.4.6-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a2c306dea656c12c68f51f4cea133cbe78ca7435eb28c735eac1d3ebe73be6e8", size = 16638245, upload-time = "2026-05-18T23:35:54.752Z" }, + { url = "https://files.pythonhosted.org/packages/b8/0b/54f9da33128d7e350fab89c7455902eeae70349ee52bddb448dc4a576f45/numpy-2.4.6-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:33111801a01c12a8a1e3721f0a9232f8cfc8ae2c6b7098167e6f623c6073f402", size = 17036587, upload-time = "2026-05-18T23:35:58.355Z" }, + { url = "https://files.pythonhosted.org/packages/b6/f0/fdebc1052db1cc37c64beb22072d67cd6d1c71adca1299f53dec2b5e20d3/numpy-2.4.6-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:ae506e6902902557576a26ff33eda8695e7ecb3cb36c3b573a0765dee114ebdb", size = 18363226, upload-time = "2026-05-18T23:36:02.845Z" }, + { url = "https://files.pythonhosted.org/packages/aa/b4/298628d98c72b57e57f7165ae6a481a1deaf6f3c28262a6e4c739c275930/numpy-2.4.6-cp314-cp314-win32.whl", hash = "sha256:aaf159caa35993cb1f56fb9b8e4610d35758e7ca005412eb1daa856a78c9c4b1", size = 6010196, upload-time = "2026-05-18T23:36:05.92Z" }, + { url = "https://files.pythonhosted.org/packages/df/ac/46de6dda46478f7942f839e094970be2d4a861e005c4b3bf07c92e291a09/numpy-2.4.6-cp314-cp314-win_amd64.whl", hash = "sha256:b507f5c4c1d508876d1819b6bf9a49d365b96320b5d4993426b33a23ca4b8261", size = 12450334, upload-time = "2026-05-18T23:36:09.107Z" }, + { url = "https://files.pythonhosted.org/packages/78/92/b8b798ac784102c0da830d2257d59358e3d3d90d1e2b3f2575dad976c5cf/numpy-2.4.6-cp314-cp314-win_arm64.whl", hash = "sha256:6f41ae150c4e32db4f3310cdaf64b1593a03dbabe29eec77fc9b50fe64061df6", size = 10495678, upload-time = "2026-05-18T23:36:12.766Z" }, + { url = "https://files.pythonhosted.org/packages/30/34/ec28d1aa8115971537c01469ab2011ee96827930f0a124de1000cc2a7ed7/numpy-2.4.6-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:ece3d2cfe132e7d51f44a832b303895e6f2d499c5e74dfbdb06ee246147a304a", size = 14823672, upload-time = "2026-05-18T23:36:16.473Z" }, + { url = "https://files.pythonhosted.org/packages/16/bd/f6d1fede4e54e8042a7ff97bb495510f3c220f94bcd9e8b228e87c92cc0d/numpy-2.4.6-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:e3e5193ef5a3dc73bceee50f7fdc2c90dbb76c42df8d8fae3d1067a583df579e", size = 5328731, upload-time = "2026-05-18T23:36:19.767Z" }, + { url = "https://files.pythonhosted.org/packages/f4/f0/e105b9e2fd728a9910103884decd6951d9dd73896b914a98d9a231de02ee/numpy-2.4.6-cp314-cp314t-macosx_14_0_x86_64.whl", hash = "sha256:17f9ade344e7d9b464a084d69bcf18fc691cb1db67c62ed80820bf4926d78f0e", size = 6649805, upload-time = "2026-05-18T23:36:22.266Z" }, + { url = "https://files.pythonhosted.org/packages/82/dd/1206a7ca6ab15e3f02069707ca96222e202af681bb73756da7527f3cb837/numpy-2.4.6-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9cd5ffd25db4e7ba6a375693b3fc0fc1791ec636c17db3720da19bde7180ec43", size = 15730496, upload-time = "2026-05-18T23:36:25.713Z" }, + { url = "https://files.pythonhosted.org/packages/51/e7/38d3ea825dcab85a591734decb2f6c67caa7c8367d374df1a1c3842f9b07/numpy-2.4.6-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7d92c3819208a60205a12a245c91ad70cb0a85336659b19b834205573ac8456e", size = 16679616, upload-time = "2026-05-18T23:36:29.652Z" }, + { url = "https://files.pythonhosted.org/packages/93/b7/caabfdf53edf663e0b4eb74d7d405d83baef09eb5e83bcd32d601d72b93e/numpy-2.4.6-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e85b752a1e912b70eaad4fafbd4d1238007ab221de2009b9a2f5ae7461239895", size = 17085145, upload-time = "2026-05-18T23:36:33.449Z" }, + { url = "https://files.pythonhosted.org/packages/f9/45/68d7c33a6bcf3e5aa3bdbd57a367e6f615286dfd6482f97e8ffeb734306e/numpy-2.4.6-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:29cb7f67d10b479ff07c17d33e39f78c07f71c40ef30d63c153d340e96cd3fb4", size = 18403813, upload-time = "2026-05-18T23:36:37.369Z" }, + { url = "https://files.pythonhosted.org/packages/9c/50/0753655aa844c99cd9e018aacf76f130f1bd81d881bb74bc0aef5d73a8ba/numpy-2.4.6-cp314-cp314t-win32.whl", hash = "sha256:260a5d70215b61ab4fadf5c7baacd64821842975eea312125ed3c39a6391b063", size = 6156982, upload-time = "2026-05-18T23:36:40.817Z" }, + { url = "https://files.pythonhosted.org/packages/b2/d4/7c67becf668f973cb490cec3e98dfd799d866f9c989a54d355672cfa0db6/numpy-2.4.6-cp314-cp314t-win_amd64.whl", hash = "sha256:81a1cca95ed5bb92aa8b10dd2cdc9a0d3853a50fad926c28b5d7e8ea54389627", size = 12638908, upload-time = "2026-05-18T23:36:43.996Z" }, + { url = "https://files.pythonhosted.org/packages/43/bb/e1c71a4295b1b1d1393d50dbb4f2a36283c6859d9d3892e84f00ec5a91d5/numpy-2.4.6-cp314-cp314t-win_arm64.whl", hash = "sha256:0c9136e14ed34a9e343a31c533d78a9813a69a3148332bce5e9821cb2f996e66", size = 10565867, upload-time = "2026-05-18T23:36:47.114Z" }, + { url = "https://files.pythonhosted.org/packages/de/12/b422cc84439adc0d00de605bf4a308890ae5c26f2c71fbd73e5d08fbb0dd/numpy-2.4.6-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:55cced7c52e981362f708ad635198e97a752dfba412cc03c23bbf3bd8d5cd662", size = 16847511, upload-time = "2026-05-18T23:36:50.673Z" }, + { url = "https://files.pythonhosted.org/packages/44/53/f481bef68011740f8849418d82db07230e825013f31f4eef5ba5b805316a/numpy-2.4.6-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:d6da64deb6b8ed903e7560180a92f2d804ee1ba5eeb849ac2748b8c1aba1f6d7", size = 14889064, upload-time = "2026-05-18T23:36:53.879Z" }, + { url = "https://files.pythonhosted.org/packages/7f/57/42ed575c10ced8af951d426bc4e1f8aff16fd851db33f067036215a7f860/numpy-2.4.6-pp311-pypy311_pp73-macosx_14_0_arm64.whl", hash = "sha256:68a5124b13fa6cc2086764a20005d30bc0548146f7f5322f02fce212ca14317f", size = 5394157, upload-time = "2026-05-18T23:36:57.194Z" }, + { url = "https://files.pythonhosted.org/packages/6a/ef/f66cc724fcc36c1e364c67f51ae9146090b8b584f27d58b97fdae3edd737/numpy-2.4.6-pp311-pypy311_pp73-macosx_14_0_x86_64.whl", hash = "sha256:948424b06129ce883307e8cff868c31396d8dc7630a59c61d70d98dbe70f222c", size = 6708728, upload-time = "2026-05-18T23:36:59.575Z" }, + { url = "https://files.pythonhosted.org/packages/1a/9c/c531f2293b91265d8b48e9b329f54fdd7ffae73cb4134ea10cca4237e9cc/numpy-2.4.6-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5dbbdb29840ca3d91ee0fece42fc29278886d908280bfec0a5846c6f901a3eb0", size = 15798374, upload-time = "2026-05-18T23:37:02.674Z" }, + { url = "https://files.pythonhosted.org/packages/1a/b0/413077f6b1153ed3cba361401c6783bbad6114804a000cc22eb71c13e190/numpy-2.4.6-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8ad03c0965fb3c692200e74d458ca28c1dbb4ce96f9a479a8aa041ad5fabca02", size = 16747286, upload-time = "2026-05-18T23:37:06.327Z" }, + { url = "https://files.pythonhosted.org/packages/15/ce/e5ec180bc41812edcd8daeb8639d205622c0e8c02259d8ab25a0201b3c2a/numpy-2.4.6-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:2803abfebfc990042cd494d8ce2d5f82e9d847af6d35ec486923aa19dbad5e73", size = 12504263, upload-time = "2026-05-18T23:37:09.715Z" }, +] + +[[package]] +name = "numpy" +version = "2.5.4" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.14'", + "python_full_version == '3.13.*'", + "python_full_version == '3.12.*'", +] +sdist = { url = "https://files.pythonhosted.org/packages/95/b0/c7453d0b6e2073c3264468b106ee1563750cecc910965e67357e3698c83e/numpy-2.5.4.tar.gz", hash = "sha256:9a94cf751c9ad8ebaa835bcd3d40dacf8534ad086b88c38029b65123c7999d2a", size = 20866315, upload-time = "2026-10-10T20:05:31.422Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d0/97/ba2074e92b7befea137e77ea8471e768bbd87c339b7e8c9f5a931949f977/numpy-2.5.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c6342f54c67093cae5c0227eb0eb772fdb79f2a2c37a6eb278b9909ee06aa356", size = 17001609, upload-time = "2026-10-10T20:02:40.843Z" }, + { url = "https://files.pythonhosted.org/packages/ff/a9/bac826765e971d8e16e2064e9ac7525fd69b40ac17c905033a7f5442023f/numpy-2.5.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b11e8fda06a7d69f15ebf542660b74466c2e51094800c1fb794f47ad4faeef17", size = 12015718, upload-time = "2026-10-10T20:02:43.45Z" }, + { url = "https://files.pythonhosted.org/packages/31/2f/5ea3570fcb8ccd0882bea99436a513b2c85dad8f774a2057849130a8fb99/numpy-2.5.4-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:9cb18a327b49c5c337f972b03682f6a49855525faaf3c0d3e9c96cd0fd8880a8", size = 5451717, upload-time = "2026-10-10T20:02:46.169Z" }, + { url = "https://files.pythonhosted.org/packages/34/f2/b4fc1bafca03868220b5eaf729d2f21ebd7d7b151c0f9e144fe212bbca35/numpy-2.5.4-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:aec3fc4b32ff82421274f5d205c559c51c840c8df66a78efd7f3612dd005a26a", size = 6789926, upload-time = "2026-10-10T20:02:48.139Z" }, + { url = "https://files.pythonhosted.org/packages/dc/96/8319e2457ae4333c62c815c7006b869a4f60985c1e01024c2f8c6c040fe5/numpy-2.5.4-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fe4d21ab149f15e4e6043dfb0de87e6e5f34ac176cde83060e9802981fca2ac2", size = 15695312, upload-time = "2026-10-10T20:02:50.115Z" }, + { url = "https://files.pythonhosted.org/packages/43/a3/c799c62e19c337e6d3770b08e475887fb30ce8477d3c09efca6b2f0228a6/numpy-2.5.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fbde6962867ee75b48b0ee29b2b9372ec5d617799dbaf38e82dc0596f2f7738a", size = 16727283, upload-time = "2026-10-10T20:02:53.186Z" }, + { url = "https://files.pythonhosted.org/packages/39/6b/3604e53fb00314d0dc1b94ec9125a1484f649c0a17480b1f0f0c7a9d6250/numpy-2.5.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:381a7a3d2e65e64c0ec302795ab9dc12bb1e73f150904699c153716177eebdaf", size = 17047890, upload-time = "2026-10-10T20:02:56.038Z" }, + { url = "https://files.pythonhosted.org/packages/4a/7a/e8b58a5289a0d464c52885de47c35a935cdd70c03a4c3ab94a5126416dd0/numpy-2.5.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b89d0aaae2fe498c648f4c4795c084db535af5bd98ef942b2a3681fb74ce8645", size = 18485839, upload-time = "2026-10-10T20:02:59.018Z" }, + { url = "https://files.pythonhosted.org/packages/6f/c9/47094f597015009f310b8c900def59065ef1ff5a6fe7b51fc65ec58ec2c6/numpy-2.5.4-cp312-cp312-win32.whl", hash = "sha256:9968ab7e49b93ac6e1c3b2239732183152c9150f16308d30b66a372cffe3483c", size = 6138936, upload-time = "2026-10-10T20:03:01.626Z" }, + { url = "https://files.pythonhosted.org/packages/12/33/fefe62073dc8acfd0f2b9ed7c003af2f50aa61555e113e6db02b8f79f145/numpy-2.5.4-cp312-cp312-win_amd64.whl", hash = "sha256:a7b1b6353e36a7e50de2973a38d705c88ee93adcf120673cee7f45a4a3fa223a", size = 12573091, upload-time = "2026-10-10T20:03:04.349Z" }, + { url = "https://files.pythonhosted.org/packages/1a/07/161270b0c2eec56e4c905f6d6d22e1b836887b2cb189d3f5820aa588e9dd/numpy-2.5.4-cp312-cp312-win_arm64.whl", hash = "sha256:aa1cce2ff3f8d953de38b76bf44602caeb69f101430208f64a10067f7cb4b1d3", size = 10521630, upload-time = "2026-10-10T20:03:06.767Z" }, + { url = "https://files.pythonhosted.org/packages/67/14/1c3ee0118a8fce08565a5d8482631608426a33af10a01077fada5dc7c119/numpy-2.5.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:2377da2dd3ba2c1200956acbab2a358c83b8e1f8531191672d1cd6ad83250d53", size = 16997729, upload-time = "2026-10-10T20:03:09.291Z" }, + { url = "https://files.pythonhosted.org/packages/83/8c/b0ea9477fb1f0d4484bbc5cba21678cc9969704d8d7f3f158d1db35f8e14/numpy-2.5.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:7415db95818b39ec475a5eea54d9e3b6bc83e3912158e46da3438cdce399804d", size = 12009826, upload-time = "2026-10-10T20:03:11.946Z" }, + { url = "https://files.pythonhosted.org/packages/e2/84/6a3d75b3ba3dfe84ac0053450753d1e6d250a8bf80f66474cc46d1fb643f/numpy-2.5.4-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:6d6a71b9d9a97c03633aa12565ef2825ffa036cc1d99cfd50dacf0f128af4fe2", size = 5445803, upload-time = "2026-10-10T20:03:14.329Z" }, + { url = "https://files.pythonhosted.org/packages/61/18/bb993f267ca20b376e07092a16793a5b31ed3138751e9ba480011a14d742/numpy-2.5.4-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:d8200f16437b289a5bb927c6e184eccc3e8389bc0070fea4cd5b9e13c1757959", size = 6786220, upload-time = "2026-10-10T20:03:16.602Z" }, + { url = "https://files.pythonhosted.org/packages/db/b6/135bb0953b61dc21c6cafa14b424ae666944e4899cf140e00c2b322a1a45/numpy-2.5.4-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1c2e71b04c6cad90026e544501bbe0ab9290fa8a4d845e7e8c0d124fb429c988", size = 15689178, upload-time = "2026-10-10T20:03:18.721Z" }, + { url = "https://files.pythonhosted.org/packages/da/24/3bd070f3269dc609d8f26b2643f62ef91bb415841c0b294805aaf7fe06da/numpy-2.5.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6ffa07666f8da0eef81d149934a626d0d95fbd6838432a33e66245423a9062c0", size = 16718044, upload-time = "2026-10-10T20:03:21.386Z" }, + { url = "https://files.pythonhosted.org/packages/c7/8e/9d15bd356b0a019c965312b1a3c6a727cac4cae5bc40045fbc12ce4cff9c/numpy-2.5.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:2fa3328f784fc8277fc48026f6cad516f5c561c5d8e2e39b3c9e0c8f23223b34", size = 17048364, upload-time = "2026-10-10T20:03:24.468Z" }, + { url = "https://files.pythonhosted.org/packages/dc/fe/9d5b560db964f15871885f2250795d15945f8699e17ef90c0c2ff4c875b2/numpy-2.5.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b86966fbe4ad7de710422175572bcdc75fdedadfb54bc6fab7deabccddd7780b", size = 18474904, upload-time = "2026-10-10T20:03:27.895Z" }, + { url = "https://files.pythonhosted.org/packages/e9/98/d27552990f1bd611ef3e7466adadc78312ea2df63b83aad47fdc3d3ca8df/numpy-2.5.4-cp313-cp313-win32.whl", hash = "sha256:5258bc06526964be5face2fc6f756857a3f24f21ec3e72ca131337a75b165d6c", size = 6134537, upload-time = "2026-10-10T20:03:30.511Z" }, + { url = "https://files.pythonhosted.org/packages/90/8c/140a40398a66b4471211be1affdb6ed24c486d581bd28d07b7f2fcb69540/numpy-2.5.4-cp313-cp313-win_amd64.whl", hash = "sha256:8b4d2fd2d34e5f8c9235ee787de5631a37a28402b15cb80814df973d2be54129", size = 12566113, upload-time = "2026-10-10T20:03:32.612Z" }, + { url = "https://files.pythonhosted.org/packages/34/52/01d205e5e8ccb27b2b0b141e801f22b830198c979111b0fa44771438d9a9/numpy-2.5.4-cp313-cp313-win_arm64.whl", hash = "sha256:bc39ac66a7a9a3fbd6134fda43136b60ffde99c8f4501e64e0d2b24da137babf", size = 10519523, upload-time = "2026-10-10T20:03:35.163Z" }, + { url = "https://files.pythonhosted.org/packages/99/ba/005cb5edd580d2f84d7ca3206b92dc17d4388e56e6f87ffe8f2762f83139/numpy-2.5.4-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:c668b2f0d651605b58892644b0e302c7157f7159544227758c896982ef384b18", size = 17005499, upload-time = "2026-10-10T20:03:37.961Z" }, + { url = "https://files.pythonhosted.org/packages/f3/49/fee7587c33ee35f7977f9051d7f2023d4e7246d62710c80f20c2361ea232/numpy-2.5.4-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:ffa6ce09a1c6a08e9667dd9c97aa0b14184e8d18f2a14b78b2a2328c9147f076", size = 12019666, upload-time = "2026-10-10T20:03:40.606Z" }, + { url = "https://files.pythonhosted.org/packages/d5/b2/c6ce165acffceb15a82c07b9cc77d391f86b3f379ba62911908ae5d34b91/numpy-2.5.4-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:956555e0603a4d38019ae6925711cb9dc43195c076a928accf7ea5d50bddfe53", size = 5455617, upload-time = "2026-10-10T20:03:43.138Z" }, + { url = "https://files.pythonhosted.org/packages/77/7f/dd85ce260a669a89be06842cf355d7353a33e6cfbc590fb8ebb947d88dc9/numpy-2.5.4-cp314-cp314-macosx_14_0_x86_64.whl", hash = "sha256:2c2c4afffdeb7920e445028dd71eb932cac3e704792e964bc2a232426d4f1255", size = 6791932, upload-time = "2026-10-10T20:03:44.874Z" }, + { url = "https://files.pythonhosted.org/packages/63/d6/34b0a2b0741386a63025a65a2c09caaaaaad6d0ca95b66cd65c30dd7fcb5/numpy-2.5.4-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4054173604cd8658796053f1f3bc0befb68ec1c0762c57fdad61e199256a8617", size = 15710899, upload-time = "2026-10-10T20:03:46.839Z" }, + { url = "https://files.pythonhosted.org/packages/16/d5/928078d2b28f26829b138b4a6c3980045022fb409f570657a224ae60ef4e/numpy-2.5.4-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d549420b8858885cea8838a727842249218b9c1da24dd517e25c9c7a948310a3", size = 16721710, upload-time = "2026-10-10T20:03:49.489Z" }, + { url = "https://files.pythonhosted.org/packages/f9/cf/673fd1b8f4cd78eb6320e87ec4c90ac19c095644259e3749853a405c70f4/numpy-2.5.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:823874a507a84af050493b622affde94b6f7c3a0dc22cb2801381bc03b871c00", size = 17066182, upload-time = "2026-10-10T20:03:52.25Z" }, + { url = "https://files.pythonhosted.org/packages/f3/92/a77b5061b1b3e2643928c37976d79ee173e1b171ed158b7a3c61056b41bc/numpy-2.5.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:4e263278bfb5ee6409db8aedbc4cc32973b1b82bc1e8d3c668551d04d83a7e37", size = 18480315, upload-time = "2026-10-10T20:03:55.39Z" }, + { url = "https://files.pythonhosted.org/packages/bb/1d/1486ef3d3fb2279fd93c4c43c1bbbf1ca389a19816696684409f71babaab/numpy-2.5.4-cp314-cp314-win32.whl", hash = "sha256:cfd73180400042a7c532d30c5e287bdd03c59ff9ee1b4c0316af0539e29dfe23", size = 6185739, upload-time = "2026-10-10T20:03:58.186Z" }, + { url = "https://files.pythonhosted.org/packages/52/9a/e1e512ebc948d5b9dd33b08736760f0ebbed2848fd4eda1f553088a6dcee/numpy-2.5.4-cp314-cp314-win_amd64.whl", hash = "sha256:2ca144f15135b6212a5c47b1e2aeca6e412f102f95a2d5d88d8aec77eb255de3", size = 12703552, upload-time = "2026-10-10T20:04:00.28Z" }, + { url = "https://files.pythonhosted.org/packages/2c/05/de709a982d7bbcd688a3fad71f002e9ff80c2db39e03ee726609b610f1d1/numpy-2.5.4-cp314-cp314-win_arm64.whl", hash = "sha256:468397ba3c64427474706e5c9123fe266395496714dc684294eac75cd4930d1e", size = 10803901, upload-time = "2026-10-10T20:04:02.659Z" }, + { url = "https://files.pythonhosted.org/packages/13/34/083570ada3bb2a30fbe5d77c8c6fef9141144a15d33e6f793a67e9749ab8/numpy-2.5.4-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1ef3aa6d7e29bb13677323114280b05acc57607fa2300e66432d665d5418a162", size = 12138695, upload-time = "2026-10-10T20:04:05.012Z" }, + { url = "https://files.pythonhosted.org/packages/94/06/1f9c24db48eef0c2d1207e3b11fffb0478e39dfd8c1e1be7476936885eed/numpy-2.5.4-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:98b053943e5a0474ec0da309d2cb9d3f18ea57f8a2067c2ab7b5f763d1068380", size = 5574615, upload-time = "2026-10-10T20:04:07.316Z" }, + { url = "https://files.pythonhosted.org/packages/da/0f/593fba2e1560e949123bc7d2fc48b5893d56e58cd4bd5a273d2fbf60b220/numpy-2.5.4-cp314-cp314t-macosx_14_0_x86_64.whl", hash = "sha256:b64a85f40e154983960a4167d4c1d57a50c7f109b3d3264a3a984154e90a8454", size = 6889383, upload-time = "2026-10-10T20:04:09.918Z" }, + { url = "https://files.pythonhosted.org/packages/eb/9f/b799dfdce4e05e80ed4bc815c71ff343a11533b2c0ffc221cae8538cda63/numpy-2.5.4-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a813ed7719bf45463c51779e6a98d0385fe905e48447526938a4b8337333d551", size = 15753763, upload-time = "2026-10-10T20:04:12.278Z" }, + { url = "https://files.pythonhosted.org/packages/34/88/16c5f12f86f5ad2817c4d103205131fc6c8acb3d1878af05a1a4f23ec859/numpy-2.5.4-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c9b80cdf5cedba0e90d93fa5f9a333c4d65bd545cd669b71bb97ce2b703c9d73", size = 16757212, upload-time = "2026-10-10T20:04:14.799Z" }, + { url = "https://files.pythonhosted.org/packages/ff/4f/a1fe40e18a898e6a5089f4f0d891f0a493eb0574d5b34458f0fbe5aa3e5c/numpy-2.5.4-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:2199ed071f460487c8db2c0e5c0b564494190edb4772fe80f9aad88b2604def5", size = 17116471, upload-time = "2026-10-10T20:04:17.58Z" }, + { url = "https://files.pythonhosted.org/packages/aa/46/e923a11c78e65c1722e7aaad817c06bd591324174b9d28ce5d31eee4d432/numpy-2.5.4-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:64f9c9878c1938476365e11ccfb6b770f3b9e5f045ccddc514235041e6959365", size = 18524063, upload-time = "2026-10-10T20:04:20.365Z" }, + { url = "https://files.pythonhosted.org/packages/5a/fa/84ab064514440c1f64a1b21088f2c82756defdd05e07c75ab233899565b2/numpy-2.5.4-cp314-cp314t-win32.whl", hash = "sha256:64d1c8ac28a4077cf987e0a71a7a0ef7e2df70722f07f0baa42dbb7eb6938647", size = 6340926, upload-time = "2026-10-10T20:04:22.865Z" }, + { url = "https://files.pythonhosted.org/packages/7e/7e/6cd886876f435b10685db9b9f7eeb70356f99e052116f4e5f11c5792c714/numpy-2.5.4-cp314-cp314t-win_amd64.whl", hash = "sha256:067374eb538c34c745436365cf7b0112595c1d326f21ce4ff340f61230239fbb", size = 12901584, upload-time = "2026-10-10T20:04:24.99Z" }, + { url = "https://files.pythonhosted.org/packages/38/1b/3c1684f6a06f7307f2335fca6e486cb162847fb97e91d65f8eb5cabad213/numpy-2.5.4-cp314-cp314t-win_arm64.whl", hash = "sha256:e94aef2c639da4a960ad0db8e06471208d8589974953d78b61d345b4eb99e394", size = 10891152, upload-time = "2026-10-10T20:04:27.52Z" }, + { url = "https://files.pythonhosted.org/packages/08/f4/3224deff3af2bef6bc0b175369698d8cb348f3d91d9bb0286cd5c9eae9e0/numpy-2.5.4-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:8dddfbee2e68d26d0d7d7d9cb247b1fd4409241cce32d815a11d97ec2cfde179", size = 17003231, upload-time = "2026-10-10T20:04:30.021Z" }, + { url = "https://files.pythonhosted.org/packages/be/75/fee0b8c6d94b44b2fdfae74f6a4ad5a138739589a8aebaec28ce4e713ed5/numpy-2.5.4-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:81e3420b27048b65eb14c3acf0c174a8cb0e023277716110347d2dcb26026dad", size = 12018300, upload-time = "2026-10-10T20:04:32.519Z" }, + { url = "https://files.pythonhosted.org/packages/47/c0/d0b335a499a04b65f532c3f034346ef390f81299060f928492dabc1e0272/numpy-2.5.4-cp315-cp315-macosx_14_0_arm64.whl", hash = "sha256:0b4724a19de67bea8cfc4970798efa78bcbbe2ac2613cfac16721a42d44de2a5", size = 5454250, upload-time = "2026-10-10T20:04:34.943Z" }, + { url = "https://files.pythonhosted.org/packages/5a/0e/461b3783c03d668052e6a21b01b673db6ffcb7831fd32d9aa5368c1cd426/numpy-2.5.4-cp315-cp315-macosx_14_0_x86_64.whl", hash = "sha256:2132418bf8dd124a427ca9e6a1daf9ee1a87185344c95119ceae868b99466da1", size = 6789644, upload-time = "2026-10-10T20:04:37.258Z" }, + { url = "https://files.pythonhosted.org/packages/b3/02/5dad269b02166965a7b4ca14adaddd75dbee0de42435bfecf561b84ba5a6/numpy-2.5.4-cp315-cp315-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:325518d4245b9e331387702aa58c2ce1dc4cdcbb41dfb4ccd5dcbc7e08db1266", size = 15704353, upload-time = "2026-10-10T20:04:39.616Z" }, + { url = "https://files.pythonhosted.org/packages/93/3a/01360c8036822ed9f7aa32189a77d1476567ec1e8e1383522389e4faac45/numpy-2.5.4-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:56733449d2544178beaa4545cee357370440cf056c197f9c7bfb19dbfdd0e86d", size = 16718648, upload-time = "2026-10-10T20:04:42.383Z" }, + { url = "https://files.pythonhosted.org/packages/7d/5c/b863a2c093c4d6f21a597fcaf24ead0835c09ab16a8312d5a5a8868af683/numpy-2.5.4-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:5ec3753760c1a6d8bb91200666e545c3a9728e6269dfb5d6ce02340996698aa3", size = 17059053, upload-time = "2026-10-10T20:04:44.976Z" }, + { url = "https://files.pythonhosted.org/packages/0a/60/ced4f57f9a1258a0af74f17cb0b0c2700b5c67cd6678823c803b263e4df3/numpy-2.5.4-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:b1185012870173de7ae33d370bd45b1cf5baee747ea4b97036b65f4e93016877", size = 18477406, upload-time = "2026-10-10T20:04:47.863Z" }, + { url = "https://files.pythonhosted.org/packages/f9/bd/0ef22dafaafcc7d4bb3ca26b8d2afbd55dedad8eaba99a8c864e1997456f/numpy-2.5.4-cp315-cp315-win32.whl", hash = "sha256:298eca75243f2cbbfdb460560b9fb2a1792a33cf2ab4286efd43d92e8d3df508", size = 6185133, upload-time = "2026-10-10T20:04:50.467Z" }, + { url = "https://files.pythonhosted.org/packages/50/bc/d2651b155ecc608a77e6f4d15495c11f14f19bb98f8bf0c5b0d38f86dda1/numpy-2.5.4-cp315-cp315-win_amd64.whl", hash = "sha256:332f3378fe077dd850e677ec01bdcc4f22368fb5d50ef10b2c79230b1bf5a592", size = 12703085, upload-time = "2026-10-10T20:04:52.63Z" }, + { url = "https://files.pythonhosted.org/packages/dc/d2/45e404f8abb26fb9eda12b94012936873e827b1be76f2ee7890be128312e/numpy-2.5.4-cp315-cp315-win_arm64.whl", hash = "sha256:d4cccbbc78717966f764cd3af4fb70276fa01fc7a2688af11c78901fa5c04f05", size = 10801451, upload-time = "2026-10-10T20:04:55.677Z" }, + { url = "https://files.pythonhosted.org/packages/c6/c3/2ae14e09cfdb67dc187a342e15308a21c15bf4d2071f8079e6aee5fe56dc/numpy-2.5.4-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:950ea81d57ef070665581b6e1b5f6a029306423cd1739c5b95fe78aa30db6b9d", size = 17097121, upload-time = "2026-10-10T20:04:58.403Z" }, + { url = "https://files.pythonhosted.org/packages/f5/cf/305ae624ef8a039414317224abe9ec9c2fe7ea3c2e1cf204d43ff6b2ffb9/numpy-2.5.4-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:c05ede731b03fb1b7591faca9389ade3267d2bddf1ad8882bb3f2cc5e101694f", size = 12135439, upload-time = "2026-10-10T20:05:01.65Z" }, + { url = "https://files.pythonhosted.org/packages/a9/a8/f75c63813aef95827bb2c0d13b12803016853056e8792c280058cdbfe783/numpy-2.5.4-cp315-cp315t-macosx_14_0_arm64.whl", hash = "sha256:5fbf7141bbfd63aea22f435c9062a032b9ea0082fe9845dad7f021d3f1234e71", size = 5571451, upload-time = "2026-10-10T20:05:04.135Z" }, + { url = "https://files.pythonhosted.org/packages/6f/0f/f17763f983868b5c49b4101ebd7e00760bd1769478a6bb6a8de6e085bbac/numpy-2.5.4-cp315-cp315t-macosx_14_0_x86_64.whl", hash = "sha256:3573cd22564692a5b899ec344e5d5b9cc4576f2985b96f22af3564ed54f2710f", size = 6883356, upload-time = "2026-10-10T20:05:06.249Z" }, + { url = "https://files.pythonhosted.org/packages/67/a7/8af04c5a79e047996cfa38854dcfbececdd0343a7c933a46fdd03ef6f5da/numpy-2.5.4-cp315-cp315t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6c109eac9cd439193678f69d70733c1108487546ca8eafc107b510ae10c1aecd", size = 15750991, upload-time = "2026-10-10T20:05:08.376Z" }, + { url = "https://files.pythonhosted.org/packages/57/7a/648254290d0c504faa8f2d07aa206660c728802c781a6f3fc68ab7cb5d71/numpy-2.5.4-cp315-cp315t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:80d6ef6e8620eb2c2b4c4caad50b5935d6db3cde2d51581b55dcc79e14016d1d", size = 16757675, upload-time = "2026-10-10T20:05:11.393Z" }, + { url = "https://files.pythonhosted.org/packages/b8/fe/4a8c3cdb0c70400cfe4c5bec42d3099a5673802a95064614b33e07b82aa1/numpy-2.5.4-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:77045a4b175bbf5316ec08003880804336c78f92281a1b72222b274ea85ec5ac", size = 17113846, upload-time = "2026-10-10T20:05:14.49Z" }, + { url = "https://files.pythonhosted.org/packages/1b/7e/619692bb67778702c0e9eb2d468568a7573f4e269386ea61aed01ee4e557/numpy-2.5.4-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:0f02a46e49cfb6c73bdb7aea1c0d3461dbae9aba613542b65f657cd3d17b9fab", size = 18522915, upload-time = "2026-10-10T20:05:17.33Z" }, + { url = "https://files.pythonhosted.org/packages/b7/b5/4da41c328788f575838f97a098fe8ca691ebc6f6fd73ad4a262ee40b184d/numpy-2.5.4-cp315-cp315t-win32.whl", hash = "sha256:ad62a416ddcf863bf44bba76fbf6b53366ab0692e294f51cae4b5fbe0d246788", size = 6335804, upload-time = "2026-10-10T20:05:19.921Z" }, + { url = "https://files.pythonhosted.org/packages/98/94/6482ddfa3d312490cb9358f375bf2ad56427dbea8769187158e94d653753/numpy-2.5.4-cp315-cp315t-win_amd64.whl", hash = "sha256:38f47be9f74ab870d2633b5456ae519c43758a8d1fd05342f0ce4ecc034396ee", size = 12890095, upload-time = "2026-10-10T20:05:21.875Z" }, + { url = "https://files.pythonhosted.org/packages/48/7f/c2d1b436b6e7cfebac140c2579a298344b85f2991a2ce5c3615cefb29400/numpy-2.5.4-cp315-cp315t-win_arm64.whl", hash = "sha256:7a14a461d9340f1b46b8648578aed9cdb8b3b018a8fac6c1dde2c9192a01a87f", size = 10883718, upload-time = "2026-10-10T20:05:28.547Z" }, +] + +[[package]] +name = "packaging" +version = "26.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7d/fa/3944b40b07da9ce895c0e6303a5ab7d53da063554f534556b134a54d6093/packaging-26.3.tar.gz", hash = "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79", size = 313412, upload-time = "2026-08-04T18:15:28.737Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", size = 129956, upload-time = "2026-08-04T18:15:27.159Z" }, +] + +[[package]] +name = "pyyaml" +version = "6.0.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960, upload-time = "2025-09-25T21:33:16.546Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b", size = 184227, upload-time = "2025-09-25T21:31:46.04Z" }, + { url = "https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956", size = 174019, upload-time = "2025-09-25T21:31:47.706Z" }, + { url = "https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8", size = 740646, upload-time = "2025-09-25T21:31:49.21Z" }, + { url = "https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198", size = 840793, upload-time = "2025-09-25T21:31:50.735Z" }, + { url = "https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b", size = 770293, upload-time = "2025-09-25T21:31:51.828Z" }, + { url = "https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0", size = 732872, upload-time = "2025-09-25T21:31:53.282Z" }, + { url = "https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69", size = 758828, upload-time = "2025-09-25T21:31:54.807Z" }, + { url = "https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl", hash = "sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e", size = 142415, upload-time = "2025-09-25T21:31:55.885Z" }, + { url = "https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c", size = 158561, upload-time = "2025-09-25T21:31:57.406Z" }, + { url = "https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e", size = 185826, upload-time = "2025-09-25T21:31:58.655Z" }, + { url = "https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824", size = 175577, upload-time = "2025-09-25T21:32:00.088Z" }, + { url = "https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c", size = 775556, upload-time = "2025-09-25T21:32:01.31Z" }, + { url = "https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00", size = 882114, upload-time = "2025-09-25T21:32:03.376Z" }, + { url = "https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d", size = 806638, upload-time = "2025-09-25T21:32:04.553Z" }, + { url = "https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a", size = 767463, upload-time = "2025-09-25T21:32:06.152Z" }, + { url = "https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4", size = 794986, upload-time = "2025-09-25T21:32:07.367Z" }, + { url = "https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl", hash = "sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b", size = 142543, upload-time = "2025-09-25T21:32:08.95Z" }, + { url = "https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf", size = 158763, upload-time = "2025-09-25T21:32:09.96Z" }, + { url = "https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196", size = 182063, upload-time = "2025-09-25T21:32:11.445Z" }, + { url = "https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0", size = 173973, upload-time = "2025-09-25T21:32:12.492Z" }, + { url = "https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28", size = 775116, upload-time = "2025-09-25T21:32:13.652Z" }, + { url = "https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c", size = 844011, upload-time = "2025-09-25T21:32:15.21Z" }, + { url = "https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc", size = 807870, upload-time = "2025-09-25T21:32:16.431Z" }, + { url = "https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e", size = 761089, upload-time = "2025-09-25T21:32:17.56Z" }, + { url = "https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea", size = 790181, upload-time = "2025-09-25T21:32:18.834Z" }, + { url = "https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl", hash = "sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5", size = 137658, upload-time = "2025-09-25T21:32:20.209Z" }, + { url = "https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b", size = 154003, upload-time = "2025-09-25T21:32:21.167Z" }, + { url = "https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd", size = 140344, upload-time = "2025-09-25T21:32:22.617Z" }, + { url = "https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8", size = 181669, upload-time = "2025-09-25T21:32:23.673Z" }, + { url = "https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1", size = 173252, upload-time = "2025-09-25T21:32:25.149Z" }, + { url = "https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c", size = 767081, upload-time = "2025-09-25T21:32:26.575Z" }, + { url = "https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5", size = 841159, upload-time = "2025-09-25T21:32:27.727Z" }, + { url = "https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6", size = 801626, upload-time = "2025-09-25T21:32:28.878Z" }, + { url = "https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6", size = 753613, upload-time = "2025-09-25T21:32:30.178Z" }, + { url = "https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be", size = 794115, upload-time = "2025-09-25T21:32:31.353Z" }, + { url = "https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl", hash = "sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26", size = 137427, upload-time = "2025-09-25T21:32:32.58Z" }, + { url = "https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c", size = 154090, upload-time = "2025-09-25T21:32:33.659Z" }, + { url = "https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb", size = 140246, upload-time = "2025-09-25T21:32:34.663Z" }, + { url = "https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac", size = 181814, upload-time = "2025-09-25T21:32:35.712Z" }, + { url = "https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310", size = 173809, upload-time = "2025-09-25T21:32:36.789Z" }, + { url = "https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7", size = 766454, upload-time = "2025-09-25T21:32:37.966Z" }, + { url = "https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788", size = 836355, upload-time = "2025-09-25T21:32:39.178Z" }, + { url = "https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5", size = 794175, upload-time = "2025-09-25T21:32:40.865Z" }, + { url = "https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764", size = 755228, upload-time = "2025-09-25T21:32:42.084Z" }, + { url = "https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35", size = 789194, upload-time = "2025-09-25T21:32:43.362Z" }, + { url = "https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac", size = 156429, upload-time = "2025-09-25T21:32:57.844Z" }, + { url = "https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3", size = 143912, upload-time = "2025-09-25T21:32:59.247Z" }, + { url = "https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3", size = 189108, upload-time = "2025-09-25T21:32:44.377Z" }, + { url = "https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba", size = 183641, upload-time = "2025-09-25T21:32:45.407Z" }, + { url = "https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c", size = 831901, upload-time = "2025-09-25T21:32:48.83Z" }, + { url = "https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702", size = 861132, upload-time = "2025-09-25T21:32:50.149Z" }, + { url = "https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c", size = 839261, upload-time = "2025-09-25T21:32:51.808Z" }, + { url = "https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065", size = 805272, upload-time = "2025-09-25T21:32:52.941Z" }, + { url = "https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65", size = 829923, upload-time = "2025-09-25T21:32:54.537Z" }, + { url = "https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9", size = 174062, upload-time = "2025-09-25T21:32:55.767Z" }, + { url = "https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b", size = 149341, upload-time = "2025-09-25T21:32:56.828Z" }, +] + +[[package]] +name = "requests" +version = "2.34.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "certifi" }, + { name = "charset-normalizer" }, + { name = "idna" }, + { name = "urllib3" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ac/c3/e2a2b89f2d3e2179abd6d00ebd70bff6273f37fb3e0cc209f48b39d00cbf/requests-2.34.2.tar.gz", hash = "sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed", size = 142856, upload-time = "2026-05-14T19:25:27.735Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a0/f4/c67b0b3f1b9245e8d266f0f112c500d50e5b4e83cb6f3b71b6528104182a/requests-2.34.2-py3-none-any.whl", hash = "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0", size = 73075, upload-time = "2026-05-14T19:25:26.443Z" }, +] + +[[package]] +name = "safetensors" +version = "0.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/45/06/f955dbbb1859e3bd23c8ac6141af5106e7ad5fedec4a3a6e3d60f94b7001/safetensors-0.8.0.tar.gz", hash = "sha256:fabaf3e0f18a6618d9b36560682562157f77c2b71fcffc7b432be2baed9d753d", size = 325846, upload-time = "2026-06-09T07:52:25.563Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/39/a0/f718cda65b05407d228f97602cf60dca269c979867aa5beb25410de26cd3/safetensors-0.8.0-cp310-abi3-macosx_10_12_x86_64.whl", hash = "sha256:c554f85858e05226d3c2828e32395e677434685d6d94594a41643361c5e837f0", size = 473568, upload-time = "2026-06-09T07:52:18.829Z" }, + { url = "https://files.pythonhosted.org/packages/f5/b1/fa7c600e7dceae12e9606c7578cbc9ff1e1ed55844883ee5c92205e86226/safetensors-0.8.0-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:c80201d22cbf405b80647a60ada77bba06c8fba2da2743ba1e89cdcc39a81f25", size = 484562, upload-time = "2026-06-09T07:52:17.518Z" }, + { url = "https://files.pythonhosted.org/packages/09/7d/65a7de0af421317bb36a067241e4235fff194eed60b961ed6d3f59a3fc60/safetensors-0.8.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7a46e5ff292c356d6991e60942ba7f79817682d3a2cef0702136448cb9c4d235", size = 502844, upload-time = "2026-06-09T07:52:07.624Z" }, + { url = "https://files.pythonhosted.org/packages/91/4f/3175c9d75634e0e0dda0082794193521035edd7c70a6f212bf33ca06ddf4/safetensors-0.8.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4124502b78f03534117c848f87a39b8f31e577b15eff423bf8bfb95f2a8c30d0", size = 511823, upload-time = "2026-06-09T07:52:09.565Z" }, + { url = "https://files.pythonhosted.org/packages/20/87/846c289e7aa2299eff406335717cf43ce8777194ece8aad75772e0411615/safetensors-0.8.0-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7bc0a787ba8a35be368ee3574edfa2b1ad389eebd0a72e482ae275490e3f6c98", size = 633461, upload-time = "2026-06-09T07:52:11.128Z" }, + { url = "https://files.pythonhosted.org/packages/76/22/8d64d9df2c45d5ded401df889d0ad90882804ca172d79ec4f0df8f727fe0/safetensors-0.8.0-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:040070828e36dc8e122178bbbd5830ff9e97920affb84cbe0f46442497bed358", size = 545148, upload-time = "2026-06-09T07:52:13.603Z" }, + { url = "https://files.pythonhosted.org/packages/28/50/f203ff3a3ddfe19308efc83c5a3a29ed02bf786732ec35e68bf9162f3365/safetensors-0.8.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd6f3f93c9a0a7cc2788ee63fb763353d4bd2e89b0751bc78fcf7dda00bea774", size = 516040, upload-time = "2026-06-09T07:52:16.29Z" }, + { url = "https://files.pythonhosted.org/packages/46/fb/cdaed17ceb2948784fd9c36b6fd3e951b608547cea81a48e8ee6f8cfdfcb/safetensors-0.8.0-cp310-abi3-manylinux_2_31_riscv64.whl", hash = "sha256:fcdd41ec4628fee5799f807c73c353629130fbd942aa23d83c623dd6c9d52d78", size = 513832, upload-time = "2026-06-09T07:52:12.37Z" }, + { url = "https://files.pythonhosted.org/packages/0d/49/1e15de264dcc3b77943d2d0c56a95809956883b1c2d6d585c792523f180b/safetensors-0.8.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8e9f537aa183a38ace122d27303dcd986b26bd2a7591f9181d7f0c396f4677ca", size = 559930, upload-time = "2026-06-09T07:52:14.743Z" }, + { url = "https://files.pythonhosted.org/packages/2a/43/bf38443278eab4b1be1fce2931e2b012ad9cb7df52ada751d0aab8f7659a/safetensors-0.8.0-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:87eec7ffed2b809f05a398a8becb7d013f19f7837cd15d9748580d6cf30dbaf4", size = 678670, upload-time = "2026-06-09T07:52:20.032Z" }, + { url = "https://files.pythonhosted.org/packages/72/e3/68cd3fa5b48488e84add63e04cb12f3bc28ae4638c06d4508c6e88823d0e/safetensors-0.8.0-cp310-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:4a95ae2b05d7726d751da4ebf626a2ca782b706e101bd894c95bc2450b1cffcc", size = 786679, upload-time = "2026-06-09T07:52:21.322Z" }, + { url = "https://files.pythonhosted.org/packages/29/4b/1c19c509d56e01f4fbb3d0a2e597450f6cc04d1d56cf52defb0a62dfd715/safetensors-0.8.0-cp310-abi3-musllinux_1_2_i686.whl", hash = "sha256:3ae091f16662658bdc019a4ff6cb4c085bb7d725eb5978b183ffd265863b6d2d", size = 765683, upload-time = "2026-06-09T07:52:22.594Z" }, + { url = "https://files.pythonhosted.org/packages/27/43/41c1621732edd934d868a00d1b891584c892a7b62a9aab82ea5a0a5623ee/safetensors-0.8.0-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:8e080062fcde23be189565e1c3305d16751a218ecf9412c8601e64204eb6f846", size = 722361, upload-time = "2026-06-09T07:52:23.924Z" }, + { url = "https://files.pythonhosted.org/packages/8e/3f/73ccf82579412b4a71c4ca673f10b5f1f888d7cf5af7fe24f27d30307be4/safetensors-0.8.0-cp310-abi3-win32.whl", hash = "sha256:2ddf52eac562eda224f99acfa7889d02968c1fd59a5b011ae7d8137c37e9c02d", size = 342401, upload-time = "2026-06-09T07:52:28.895Z" }, + { url = "https://files.pythonhosted.org/packages/1b/6d/3fba214c1e5e0f69991677ec3bc17023f0421776975e1de0c682dca475e2/safetensors-0.8.0-cp310-abi3-win_amd64.whl", hash = "sha256:096ec1a98435df7beb08853bb5aa9081a84f23d0adc67ed1a0a10550f608373f", size = 355540, upload-time = "2026-06-09T07:52:27.832Z" }, + { url = "https://files.pythonhosted.org/packages/8d/fc/7eedc3510d97878876e32774eebbeb61c43f148a96e915c84229a3e967aa/safetensors-0.8.0-cp310-abi3-win_arm64.whl", hash = "sha256:f7838e5135a406ad3e02efdcb8cf2e5397d368b0154537c4fec682dbc544d452", size = 340500, upload-time = "2026-06-09T07:52:26.745Z" }, +] + +[[package]] +name = "tqdm" +version = "4.70.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/0d/ea/b2a5bd54b28a324dae8211928b2d730b6547500342c7e6c6dea08bd0a485/tqdm-4.70.1.tar.gz", hash = "sha256:cefd0eca11b2a37a3aee776544d4f4ae913f02688135b5556b8788dfa474afc4", size = 171846, upload-time = "2026-09-11T07:25:16.601Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a7/03/921a3d3c75785aca9ebfbfcabfbc3a1be12e2ab5265deb026d55a5a3f83e/tqdm-4.70.1-py3-none-any.whl", hash = "sha256:c293e525e6fef9c20e8728fd4612df02a0aa31bb5fe91ecd93e123b1b7bffa73", size = 80199, upload-time = "2026-09-11T07:25:14.599Z" }, +] + +[[package]] +name = "typing-extensions" +version = "4.16.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f6/cc/6253133b5bb138fc3306cebfbda2c520f545d36b5be2c7255cc528bb45d6/typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5", size = 113555, upload-time = "2026-07-02T08:40:05.92Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", size = 45571, upload-time = "2026-07-02T08:40:04.659Z" }, +] + +[[package]] +name = "urllib3" +version = "2.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e3/05/b17359e1cefb4f909b5e40b1b90a496d987258916dbbf88e842c729f510e/urllib3-2.8.0.tar.gz", hash = "sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63", size = 458972, upload-time = "2026-09-15T19:29:36.253Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/92/9d/c4e665119135114480843e7ab388fa94d8480650450e6f8e26b70d323a4c/urllib3-2.8.0-py3-none-any.whl", hash = "sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3", size = 135717, upload-time = "2026-09-15T19:29:34.577Z" }, +] diff --git a/scripts/download_navigation_models.py b/scripts/download_navigation_models.py new file mode 100644 index 0000000..fcce1c6 --- /dev/null +++ b/scripts/download_navigation_models.py @@ -0,0 +1,132 @@ +#!/usr/bin/env python3 +"""Download an immutable Hugging Face snapshot with resume and hash checks. + +Uses the Python standard library, so preparation does not install a +model framework on the transfer computer. Files are published only after their +upstream LFS SHA256 or Git blob SHA1 has been checked. +""" + +from __future__ import annotations + +import argparse +import concurrent.futures +import hashlib +import json +import time +import urllib.parse +import urllib.request +from pathlib import Path + + +def digest(path: Path, algorithm: str, *, git_blob: bool = False) -> str: + """Hash a file without loading model shards into memory.""" + value = hashlib.new(algorithm) + if git_blob: + value.update(f"blob {path.stat().st_size}\0".encode()) + with path.open("rb") as source: + while block := source.read(8 * 1024 * 1024): + value.update(block) + return value.hexdigest() + + +def main() -> None: + """Resolve a revision once, download its files, and write transfer hashes.""" + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--repo", required=True) + parser.add_argument("--revision", default="main") + parser.add_argument("--output", required=True, type=Path) + parser.add_argument("--workers", type=int, default=3) + parser.add_argument("--authenticated", action="store_true", help="use the token saved by hf auth login") + args = parser.parse_args() + if args.workers < 1: + parser.error("--workers must be positive") + api = f"https://huggingface.co/api/models/{args.repo}/revision/{args.revision}?blobs=true" + token = None + if args.authenticated: + from huggingface_hub import get_token + + token = get_token() + if not token: + raise RuntimeError("run hf auth login before using --authenticated") + api_request = urllib.request.Request(api) + if token: + # Do not forward credentials to redirected storage/CDN hosts. + api_request.add_unredirected_header("Authorization", f"Bearer {token}") + with urllib.request.urlopen(api_request, timeout=30) as response: + metadata = json.load(response) + revision = metadata["sha"] + files = metadata["siblings"] + args.output.mkdir(parents=True, exist_ok=True) + manifest = args.output / "download-manifest.json" + if manifest.exists(): + previous = json.loads(manifest.read_text()) + if (previous["repo"], previous["revision"]) != (args.repo, revision): + raise RuntimeError("destination already belongs to a different model revision") + manifest.write_text(json.dumps({"repo": args.repo, "revision": revision, "files": files}, indent=2) + "\n") + print( + json.dumps( + {"event": "start", "repo": args.repo, "revision": revision, "bytes": sum(item["size"] for item in files)} + ), + flush=True, + ) + + def download(item: dict) -> tuple[str, str]: + name = item["rfilename"] + relative = Path(name) + if relative.is_absolute() or ".." in relative.parts: + raise ValueError(f"unsafe snapshot path: {name!r}") + path = args.output / relative + path.parent.mkdir(parents=True, exist_ok=True) + partial = path.with_name(path.name + ".partial") + candidate = path if path.exists() else partial + if not candidate.exists() or candidate.stat().st_size != item["size"]: + if path.exists(): + raise RuntimeError(f"existing file has incorrect size: {path}") + url = f"https://huggingface.co/{args.repo}/resolve/{revision}/{urllib.parse.quote(name)}" + for attempt in range(9): + offset = partial.stat().st_size if partial.exists() else 0 + if offset == item["size"]: + break + request = urllib.request.Request(url, headers={"Range": f"bytes={offset}-"} if offset else {}) + if token: + request.add_unredirected_header("Authorization", f"Bearer {token}") + try: + with urllib.request.urlopen(request, timeout=60) as response: + if offset and response.status != 206: + raise RuntimeError("server did not honor the resume range") + if offset and not response.headers.get("Content-Range", "").startswith(f"bytes {offset}-"): + raise RuntimeError("server returned an unexpected resume range") + with partial.open("ab" if offset else "wb") as output: + while block := response.read(1024 * 1024): + output.write(block) + if partial.stat().st_size == item["size"]: + break + except (OSError, TimeoutError, RuntimeError) as error: + if attempt == 8: + raise + print( + json.dumps({"event": "retry", "file": name, "attempt": attempt + 1, "error": str(error)}), + flush=True, + ) + time.sleep(min(2**attempt, 30)) + candidate = partial + if candidate.stat().st_size != item["size"]: + raise RuntimeError(f"incomplete download: {name}") + sha256 = digest(candidate, "sha256") + lfs = item.get("lfs") + valid = sha256 == lfs["sha256"] if lfs else digest(candidate, "sha1", git_blob=True) == item["blobId"] + if not valid: + raise RuntimeError(f"upstream hash mismatch: {name}") + if candidate != path: + candidate.replace(path) + print(json.dumps({"event": "verified", "file": name, "bytes": item["size"]}), flush=True) + return name, sha256 + + with concurrent.futures.ThreadPoolExecutor(max_workers=args.workers) as pool: + results = list(pool.map(download, files)) + (args.output / "SHA256SUMS").write_text("".join(f"{sha} {name}\n" for name, sha in sorted(results))) + print(json.dumps({"event": "complete", "repo": args.repo, "output": str(args.output)}), flush=True) + + +if __name__ == "__main__": + main() diff --git a/scripts/inspect_go2_onboard.py b/scripts/inspect_go2_onboard.py new file mode 100644 index 0000000..4c5967f --- /dev/null +++ b/scripts/inspect_go2_onboard.py @@ -0,0 +1,133 @@ +#!/usr/bin/env python3 +"""Read-only Orin environment and RealSense inventory; supports Python 3.8. + +Run --camera with the vendor SDK Python, and --torch with the inference Python. +No camera stream, robot connection, installation, or motion is started. +""" + +from __future__ import annotations + +import argparse +import json +import platform +import re +import sys +from pathlib import Path + + +def camera_inventory(): + import pyrealsense2 as rs + + cameras = [] + for device in rs.context().query_devices(): + serial = device.get_info(rs.camera_info.serial_number) + scale = float(device.first_depth_sensor().get_depth_scale()) + profiles = {"color": set(), "depth": set()} + for sensor in device.query_sensors(): + for profile in sensor.get_stream_profiles(): + if profile.stream_type() == rs.stream.color and profile.format() == rs.format.bgr8: + kind = "color" + elif profile.stream_type() == rs.stream.depth and profile.format() == rs.format.z16: + kind = "depth" + else: + continue + video = profile.as_video_stream_profile() + profiles[kind].add((video.width(), video.height(), profile.fps())) + supported = (640, 480, 15) in profiles["color"] & profiles["depth"] + cameras.append( + { + "name": device.get_info(rs.camera_info.name), + "serial": serial, + "native_depth_scale_m": scale, + "rgbd_profiles": [f"{w}x{h}@{fps}" for w, h, fps in sorted(profiles["color"] & profiles["depth"])], + "owner_camera_config": { + "backend": "realsense", + "profile": "640x480@15", + "serial": serial, + "depth_scale": scale, + "depth_calibrated": True, + } + if supported + else None, + } + ) + if not cameras: + raise RuntimeError("no RealSense device found") + return cameras + + +def torch_inventory(): + import torch + import torchvision + + available = torch.cuda.is_available() + version = re.match(r"(\d+)\.(\d+)", torch.__version__) + supported_version = version is not None and tuple(map(int, version.groups())) >= (2, 5) + return { + "torch": torch.__version__, + "torchvision": torchvision.__version__, + "cuda_build": torch.version.cuda, + "cuda_available": available, + "gpu": torch.cuda.get_device_name(0) if available else None, + "bf16_supported": bool(available and torch.cuda.is_bf16_supported()), + "minimum_versions_met": sys.version_info >= (3, 10) and supported_version, + "note": "Inventory only; checkpoint loading, memory and inference still require validation.", + } + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--camera", action="store_true", help="enumerate RealSense profiles without streaming") + parser.add_argument("--torch", action="store_true", help="inspect the selected Python's CUDA inference stack") + parser.add_argument("--write-owner-config", type=Path, help="create a new owner config using the detected camera") + parser.add_argument("--serial", help="select a camera when generating the owner config") + args = parser.parse_args() + if args.write_owner_config: + args.camera = True + l4t = Path("/etc/nv_tegra_release") + report = { + "python": sys.version.split()[0], + "executable": sys.executable, + "platform": platform.platform(), + "architecture": platform.machine(), + "l4t": l4t.read_text().strip() if l4t.is_file() else None, + } + failed = False + for enabled, name, inspect in ((args.camera, "camera", camera_inventory), (args.torch, "torch", torch_inventory)): + if enabled: + try: + report[name] = inspect() + if name == "camera": + failed |= not any(item["owner_camera_config"] for item in report[name]) + else: + failed |= not (report[name]["cuda_available"] and report[name]["minimum_versions_met"]) + except Exception as error: + report[name] = {"error": f"{type(error).__name__}: {error}"} + failed = True + if args.write_owner_config and not failed: + candidates = [ + item + for item in report["camera"] + if item["owner_camera_config"] and (args.serial is None or item["serial"] == args.serial) + ] + if len(candidates) != 1: + parser.error("select exactly one supported camera with --serial") + settings = { + "server": {"host": "127.0.0.1", "port": 8080, "token_env": "GO2_API_TOKEN"}, + "control": { + "mode": "live", + "interface": "eth0", + "cyclonedds_lib_dir": str(Path.home() / "cyclonedds/install/lib"), + }, + "camera": candidates[0]["owner_camera_config"], + } + with args.write_owner_config.open("x") as output: + json.dump(settings, output, indent=2) + output.write("\n") + report["owner_config"] = str(args.write_owner_config) + print(json.dumps(report, indent=2)) + return int(failed) + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/scripts/prepare_activevln_bf16.py b/scripts/prepare_activevln_bf16.py new file mode 100644 index 0000000..20a459f --- /dev/null +++ b/scripts/prepare_activevln_bf16.py @@ -0,0 +1,138 @@ +#!/usr/bin/env python3 +"""Create a BF16 copy of the FP32 ActiveVLN snapshot, preserving its source. + +Requires numpy, ml-dtypes and safetensors on the preparation computer, not CUDA. +The conversion uses round-to-nearest-even BF16, matching the selected BF16 +inference precision. This is a precision conversion, not a quantized model. +""" + +from __future__ import annotations + +import argparse +import hashlib +import json +import re +import shutil +from pathlib import Path + + +def sha256(path: Path) -> str: + """Hash shards with bounded memory on the supported Python 3.10 runtime.""" + digest = hashlib.sha256() + with path.open("rb") as stream: + while block := stream.read(8 * 1024 * 1024): + digest.update(block) + return digest.hexdigest() + + +def verified_files(source: Path) -> list[Path]: + """Require checksums for the config and every indexed model shard.""" + checksums = source / "SHA256SUMS" + if not checksums.is_file(): + raise ValueError("source download is incomplete: SHA256SUMS is missing") + expected_hashes = {} + for line in checksums.read_text().splitlines(): + expected, name = line.split(" ", 1) + relative = Path(name) + if ( + not re.fullmatch(r"[0-9a-f]{64}", expected) + or not name + or relative.is_absolute() + or ".." in relative.parts + or relative.as_posix() != name + or name.endswith(".partial") + or name in {"SHA256SUMS", "download-manifest.json"} + or name in expected_hashes + ): + raise ValueError(f"invalid source checksum entry: {name!r}") + path = source / relative + if not path.resolve().is_relative_to(source.resolve()) or not path.is_file(): + raise ValueError(f"missing or unsafe source file: {name}") + expected_hashes[name] = expected + if "config.json" not in expected_hashes: + raise ValueError("source download is incomplete: config.json has no checksum") + # Check hashes before interpreting the source's config or shard index. + for name, expected in expected_hashes.items(): + actual = sha256(source / name) + if actual != expected: + raise ValueError(f"source checksum mismatch: {name}") + if "model.safetensors.index.json" in expected_hashes: + index = json.loads((source / "model.safetensors.index.json").read_text()) + shards = set(index["weight_map"].values()) + else: + shards = {"model.safetensors"} + available = {name for name in expected_hashes if name.endswith(".safetensors")} + if not shards or shards != available: + raise ValueError("source download is incomplete: model shards do not match the checksummed index") + return [source / name for name in sorted(expected_hashes)] + + +def convert(source: Path, destination: Path) -> None: + """Convert verified shards; publish SHA256SUMS only after all output is ready.""" + import ml_dtypes + import numpy as np + from safetensors import safe_open + from safetensors.numpy import save_file + + if destination.exists(): + raise FileExistsError(f"choose a new destination: {destination}") + paths = verified_files(source) + config = json.loads((source / "config.json").read_text()) + if config.get("architectures") != ["Qwen2_5_VLForConditionalGeneration"]: + raise ValueError("expected an ActiveVLN Qwen2.5-VL checkpoint") + destination.mkdir(parents=True) + total_size = 0 + for path in paths: + target = destination / path.relative_to(source) + target.parent.mkdir(parents=True, exist_ok=True) + if path.suffix != ".safetensors": + shutil.copy2(path, target) + continue + tensors = {} + with safe_open(path, framework="numpy") as reader: + metadata = reader.metadata() + for key in reader.keys(): # noqa: SIM118 - safetensors reader is not a dict/iterable + tensor = reader.get_tensor(key) + if tensor.dtype == np.float32: + tensor = tensor.astype(ml_dtypes.bfloat16) + tensors[key] = tensor + total_size += tensor.nbytes + partial = target.with_suffix(".safetensors.partial") + save_file(tensors, partial, metadata=metadata) + partial.replace(target) + del tensors + print(f"converted {path.name}", flush=True) + config["torch_dtype"] = "bfloat16" + if isinstance(config.get("vision_config"), dict): + config["vision_config"]["torch_dtype"] = "bfloat16" + (destination / "config.json").write_text(json.dumps(config, indent=2) + "\n") + index_path = destination / "model.safetensors.index.json" + if index_path.exists(): + index = json.loads(index_path.read_text()) + index.setdefault("metadata", {})["total_size"] = total_size + index_path.write_text(json.dumps(index, indent=2) + "\n") + provenance = {"source": str(source.resolve()), "precision": "bfloat16", "rounding": "nearest-even"} + if (source / "download-manifest.json").exists(): + manifest = json.loads((source / "download-manifest.json").read_text()) + provenance.update(repo=manifest["repo"], revision=manifest["revision"]) + (destination / "conversion.json").write_text(json.dumps(provenance, indent=2) + "\n") + hashes = [] + for path in sorted(destination.rglob("*")): + if not path.is_file(): + continue + value = sha256(path) + hashes.append(f"{value} {path.relative_to(destination).as_posix()}\n") + (destination / "SHA256SUMS").write_text("".join(hashes)) + + +def main() -> None: + """Prepare an independently checksummed inference copy.""" + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("source", type=Path) + parser.add_argument("destination", type=Path) + args = parser.parse_args() + convert(args.source, args.destination) + + +if __name__ == "__main__": + main() diff --git a/src/embodirun/application/navigation/__init__.py b/src/embodirun/application/navigation/__init__.py new file mode 100644 index 0000000..32b1ca2 --- /dev/null +++ b/src/embodirun/application/navigation/__init__.py @@ -0,0 +1 @@ +"""Model-independent mobile navigation task execution.""" diff --git a/src/embodirun/application/navigation/async_chunk_session.py b/src/embodirun/application/navigation/async_chunk_session.py new file mode 100644 index 0000000..9888a2b --- /dev/null +++ b/src/embodirun/application/navigation/async_chunk_session.py @@ -0,0 +1,380 @@ +"""Overlap a committed motion tail with one camera/inference continuation. + +Only the calling thread can write control commands. The single worker owns +capture and sequential model steps; rejected results terminate that history. +""" + +from __future__ import annotations + +import math +import threading +import uuid +from concurrent.futures import Future, ThreadPoolExecutor +from dataclasses import dataclass, replace +from typing import Protocol + +from embodirun.robots.mobile_base.discrete import NavigationCommand, NavigationCommandKind +from embodirun.robots.mobile_base.interfaces import MobileBase, MobileBaseError, ReleasableMobileBase +from embodirun.robots.mobile_base.motion import MobileBaseState, PlanarVelocityCommand +from embodirun.robots.mobile_base.observation import NavigationObservation +from embodirun.robots.mobile_base.request import NavigationRequest + +from .chunk_session import ChunkNavigationSession, ChunkPolicy, ChunkSessionConfig, NavigationChunk, velocity_segments + + +class ContinuationPolicy(ChunkPolicy, Protocol): + """A policy which conditions its next chunk on an immutable execution tail.""" + + def plan_after(self, request: NavigationRequest, remaining: tuple[NavigationCommand, ...]) -> NavigationChunk: + """Return only the suffix to execute after all remaining commands finish.""" + ... + + +class RenewableBase(MobileBase, Protocol): + """A heartbeat base with bounded deadline renewal, preserving lease identity.""" + + def preflight(self, *, require_renewal: bool = False) -> MobileBaseState: + """Require an idle armed base and, optionally, renewable stream support.""" + ... + + def update_velocity_lease( + self, action_id: str, command: PlanarVelocityCommand, *, remaining_s: float | None = None + ) -> None: + """Update velocity and optionally replace the remaining lease duration.""" + ... + + +@dataclass(frozen=True) +class OverlapConfig: + """Bound prefetch lead and capture-time uncertainty, in local monotonic seconds.""" + + lead_s: float = 1.5 + max_capture_uncertainty_s: float = 0.15 + + def __post_init__(self) -> None: + for value in (self.lead_s, self.max_capture_uncertainty_s): + if isinstance(value, bool) or not isinstance(value, (int, float)) or not math.isfinite(value) or value <= 0: + raise ValueError("overlap timing bounds must be finite and positive") + + +def remaining_commands( + chunk: NavigationChunk, elapsed_s: float, config: ChunkSessionConfig +) -> tuple[NavigationCommand, ...]: + """Estimate the unexecuted tail at capture, retaining partial metric actions. + + This uses the commanded timeline, not measured displacement. The application + must abort on missed control ticks instead of continuing a divergent history. + """ + remaining = [] + elapsed = max(0.0, elapsed_s) + for action in chunk.commands: + if action.kind is NavigationCommandKind.STOP: + break + forward = action.kind is NavigationCommandKind.MOVE_FORWARD + duration = ( + action.distance_m / config.linear_speed_mps + if forward + else math.radians(action.angle_deg) / config.yaw_rate_rps + ) + if elapsed >= duration: + elapsed -= duration + continue + ratio = 1.0 - elapsed / duration + remaining.append( + replace(action, distance_m=action.distance_m * ratio) + if forward + else replace(action, angle_deg=action.angle_deg * ratio) + ) + elapsed = 0.0 + return tuple(remaining) + + +@dataclass(frozen=True) +class _Plan: + chunk: NavigationChunk + started_s: float + captured_s: float + ready_s: float + capture_s: float + inference_s: float + + +DEFAULT_OVERLAP_CONFIG = OverlapConfig() + + +class _RuntimeLimit(TimeoutError): + """A configured idle wait ended, rather than an inference/control failure.""" + + +class AsyncChunkNavigationSession(ChunkNavigationSession): + """Prefetch one continuation while retaining the full committed action tail. + + If inference misses the motion boundary the base stops and waits. A late, + invalid or cancelled result cannot extend motion. Shutdown stops first, + drains the finite-timeout worker, then permits its owner to close the model + session. No worker can race that stop with another motion command. + """ + + policy: ContinuationPolicy + base: RenewableBase + + def __init__(self, *args: object, overlap: OverlapConfig = DEFAULT_OVERLAP_CONFIG, **kwargs: object) -> None: + super().__init__(*args, **kwargs) + self.overlap = overlap + self._cancelled = threading.Event() + self._lease_active = False + self._last_motion: tuple[float, float] | None = None + + def _frame_time(self, observation: NavigationObservation) -> float: + timestamp = observation.metadata.get("captured_at_monotonic_s") + uncertainty = observation.metadata.get("capture_uncertainty_s") + if any( + isinstance(x, bool) or not isinstance(x, (int, float)) or not math.isfinite(x) + for x in (timestamp, uncertainty) + ): + raise ValueError("async capture needs frame_age_s from the updated camera agent") + if not 0 <= uncertainty <= self.overlap.max_capture_uncertainty_s: + raise ValueError("camera timing uncertainty exceeds overlap bound") + if timestamp > self.clock() or self.clock() - timestamp > self.config.max_plan_age_s: + raise TimeoutError("camera frame is too old for overlap") + return timestamp + + def _infer( + self, instruction: str, episode: str, previous: NavigationChunk | None, motion_start: float = 0.0 + ) -> _Plan: + started = self.clock() + if previous is None: + observation = self._capture(episode, True, -1) + else: + while True: + if self._cancelled.is_set(): + raise RuntimeError("navigation cancelled before capture") + observation = self.observations.capture(episode_id=episode, reset=False, robot_state={}) + if ( + not isinstance(observation, NavigationObservation) + or observation.episode_id != episode + or observation.reset + ): + raise ValueError("camera changed episode identity") + if observation.sequence < previous.observation_sequence: + raise ValueError("camera sequence moved backwards") + if observation.sequence > previous.observation_sequence: + break + if self.clock() - started >= self.config.capture_timeout_s: + raise TimeoutError("camera did not publish a fresh overlap frame") + self._cancelled.wait(0.02) + captured = self._frame_time(observation) + infer_start = self.clock() + if self._cancelled.is_set(): + raise RuntimeError("navigation cancelled before inference") + request = NavigationRequest(instruction, observation) + chunk = ( + self.policy.plan(request) + if previous is None + else self.policy.plan_after(request, remaining_commands(previous, captured - motion_start, self.config)) + ) + if not isinstance(chunk, NavigationChunk) or chunk.observation_sequence != observation.sequence: + raise ValueError("policy chunk does not match the captured observation") + velocity_segments(chunk, self.config) # Reject invalid plans before publishing. + if self._cancelled.is_set(): + raise RuntimeError("navigation cancelled during inference") + return _Plan(chunk, started, captured, self.clock(), infer_start - started, self.clock() - infer_start) + + def _wait(self, future: Future[_Plan], deadline: float) -> _Plan: + while not future.done(): + if self.clock() >= deadline: + raise _RuntimeLimit("navigation runtime limit reached waiting for inference") + self.sleep(0.01) + return future.result() + + def _idle(self, deadline: float) -> None: + if not self._lease_active: + return + self.base.update_velocity_lease(self._lease_id, PlanarVelocityCommand.stopped(), remaining_s=0.05) + end = min(deadline, self.clock() + 1.0) + while self.clock() < end: + active = self.base.state().active_velocity_lease_id + if active is None: + self._lease_active = False + return + if active != self._lease_id: + raise MobileBaseError("motion ownership changed while stopping for inference") + self.sleep(0.02) + raise TimeoutError("control lease did not finish") + + def _move( + self, + plan: _Plan, + pool: ThreadPoolExecutor, + instruction: str, + episode: str, + deadline: float, + prefetch: bool, + ) -> Future[_Plan] | None: + segments = velocity_segments(plan.chunk, self.config) + if not segments: + return None + total = sum(segment.duration_s for segment in segments) + if not self._lease_active: + self.base.preflight(require_renewal=True) + started = self.clock() + if started - plan.captured_s > self.config.max_plan_age_s: + raise TimeoutError("inference result is too old to execute") + if not self._lease_active: + self._motion_attempted = True + self._lease_id = None # An unacknowledged POST may have started motion. + self._lease_id = self.base.start_velocity_lease(segments[0].command, duration_s=total + 0.75) + if not isinstance(self._lease_id, str) or not self._lease_id: + raise MobileBaseError("control service returned an invalid lease id") + self._lease_active = True + else: + self.base.update_velocity_lease(self._lease_id, segments[0].command, remaining_s=total + 0.75) + future = None + index, boundary, last_tick = 0, segments[0].duration_s, started + while True: + now = self.clock() + if now >= deadline or now - last_tick > self.config.max_control_gap_s: + raise TimeoutError("runtime limit or delayed control heartbeat during overlap") + if future is not None and future.done(): + future.result() # Model/capture failure stops current motion promptly. + if now >= started + total: + if index != len(segments) - 1: + raise TimeoutError("control delay skipped an action") + break + while now >= started + boundary and index < len(segments) - 1: + if now >= started + boundary + segments[index + 1].duration_s: + raise TimeoutError("control delay skipped an action") + index += 1 + boundary += segments[index].duration_s + if future is None and prefetch and started + total - now <= self.overlap.lead_s: + future = pool.submit(self._infer, instruction, episode, plan.chunk, started) + self._emit("prefetch_started", remaining_motion_s=started + total - now) + self.base.update_velocity_lease( + self._lease_id, segments[index].command, remaining_s=started + total - now + 0.75 + ) + last_tick = now + self.sleep(max(0.0, min(now + 1 / self.config.control_hz, started + boundary) - self.clock())) + completed = self.clock() + self._last_motion = (started, completed) + self._emit( + "chunk_executed", + observation_sequence=plan.chunk.observation_sequence, + planned_s=total, + elapsed_s=completed - started, + ) + if future is None or not future.done(): + self._idle(deadline) + if future is None and prefetch: + future = pool.submit(self._infer, instruction, episode, plan.chunk, started) + self._emit("overlap_boundary", ready=future is not None and future.done(), motion_finished_s=completed) + return future + + def run( + self, + instruction: str, + *, + execute: bool = False, + episode_id: str | None = None, + keep_motion_ready: bool = False, + ) -> dict[str, object]: + """Run serialized asynchronous continuations, with one bounded worker.""" + if not execute: + return super().run(instruction, execute=execute, episode_id=episode_id, keep_motion_ready=keep_motion_ready) + if self._running: + raise RuntimeError("navigation session is already running") + if execute is not True or not isinstance(instruction, str) or not instruction.strip(): + raise ValueError("execute must be boolean and instruction must be non-empty") + if not isinstance(keep_motion_ready, bool): + raise ValueError("keep_motion_ready must be boolean") + if keep_motion_ready and not isinstance(self.base, ReleasableMobileBase): + raise MobileBaseError("base does not support scoped lease release") + self.base.preflight(require_renewal=True) + self._running, self._motion_attempted = True, False + self._lease_id = None + self._lease_active = False + self._last_motion = None + self._cancelled.clear() + episode = episode_id or f"go2-{uuid.uuid4().hex}" + started = self.clock() + deadline = started + self.config.max_runtime_s + chunks = actions = 0 + gap = 0.0 + boundary_wait = hidden_latency = 0.0 + reason = "chunk_limit" + release = False + pool = ThreadPoolExecutor(max_workers=1, thread_name_prefix="go2-observe-infer") + try: + future = pool.submit(self._infer, instruction, episode, None) + for index in range(self.config.max_chunks): + waited = self.clock() + plan = self._wait(future, deadline) + gap += self.clock() - waited + age = self.clock() - plan.captured_s + if age > self.config.max_plan_age_s: + raise TimeoutError("inference result is too old to execute") + total = sum(s.duration_s for s in velocity_segments(plan.chunk, self.config)) + if self.clock() + total + 1.0 >= deadline: + reason = "max_runtime" + break + chunks += 1 + boundary_gap = overlap_s = 0.0 + if self._last_motion is not None: + motion_start, motion_end = self._last_motion + boundary_gap = max(0.0, self.clock() - motion_end) + overlap_s = max(0.0, min(motion_end, plan.ready_s) - max(motion_start, plan.started_s)) + boundary_wait += boundary_gap + hidden_latency += overlap_s + self._emit( + "chunk_planned", + observation_sequence=plan.chunk.observation_sequence, + capture_s=plan.capture_s, + inference_roundtrip_s=plan.inference_s, + observation_age_s=age, + ready_s=plan.ready_s, + boundary_wait_s=boundary_gap, + capture_inference_overlap_s=overlap_s, + commands=[c.to_action_values() for c in plan.chunk.commands], + planned_motion_s=total, + ) + future = self._move( + plan, + pool, + instruction, + episode, + deadline, + prefetch=not plan.chunk.terminal and index + 1 < self.config.max_chunks, + ) + actions += len(plan.chunk.commands) + if plan.chunk.terminal: + reason = "stop" + break + release = keep_motion_ready + except _RuntimeLimit: + reason = "max_runtime" + release = keep_motion_ready + except KeyboardInterrupt: + release = keep_motion_ready + raise + finally: + self._cancelled.set() + try: + self._stop_after_motion(keep_motion_ready=release) + finally: + # Stop happens BEFORE draining. CLI closes the recurrent session + # only after this joins, so close cannot race an in-flight step. + pool.shutdown(wait=True, cancel_futures=True) + self._running = False + result = { + "episode_id": episode, + "reason": reason, + "execute": True, + "chunks": chunks, + "executed_actions": actions, + "wall_seconds": self.clock() - started, + "inference_wait_s": gap, + "boundary_wait_s": boundary_wait, + "capture_inference_overlap_s": hidden_latency, + "mode": "overlap", + } + self._emit("navigation_finished", **result) + return result diff --git a/src/embodirun/application/navigation/chunk_session.py b/src/embodirun/application/navigation/chunk_session.py new file mode 100644 index 0000000..24a7dc3 --- /dev/null +++ b/src/embodirun/application/navigation/chunk_session.py @@ -0,0 +1,326 @@ +"""Run complete discrete chunks with one heartbeat lease per chunk. + +Timed metric commands do not require translational odometry. Capture and +inference happen at chunk boundaries, after all previously committed actions. +""" + +from __future__ import annotations + +import math +import time +import uuid +from collections.abc import Callable +from dataclasses import dataclass +from typing import Protocol + +from embodirun.robots.mobile_base.discrete import NavigationCommand, NavigationCommandKind +from embodirun.robots.mobile_base.interfaces import ( + MobileBase, + MobileBaseError, + ObservationSource, + ReleasableMobileBase, +) +from embodirun.robots.mobile_base.motion import PlanarVelocityCommand +from embodirun.robots.mobile_base.observation import NavigationObservation +from embodirun.robots.mobile_base.request import NavigationRequest + + +@dataclass(frozen=True) +class NavigationChunk: + """Metric commands tied to the observation that produced them.""" + + observation_sequence: int + commands: tuple[NavigationCommand, ...] + + def __post_init__(self) -> None: + if type(self.observation_sequence) is not int or self.observation_sequence < 0: + raise ValueError("observation_sequence must be a non-negative integer") + if not self.commands or any(not isinstance(c, NavigationCommand) for c in self.commands): + raise ValueError("chunk must contain navigation commands") + object.__setattr__(self, "commands", tuple(self.commands)) + for command in self.commands[:-1]: + if command.kind is NavigationCommandKind.STOP: + raise ValueError("STOP must be the last command") + + @property + def terminal(self) -> bool: + """Whether completing this chunk terminates the task.""" + return self.commands[-1].kind is NavigationCommandKind.STOP + + +class ChunkPolicy(Protocol): + """Synchronous policy boundary, called only while the base is idle.""" + + def plan(self, request: NavigationRequest) -> NavigationChunk: + """Return the complete committed chunk; callers must not truncate it.""" + ... + + +@dataclass(frozen=True) +class ChunkSessionConfig: + """Timing bounds for open-loop chunks; distances need physical calibration.""" + + linear_speed_mps: float = 0.25 + yaw_rate_rps: float = 0.50 + control_hz: float = 10.0 + max_chunk_s: float = 9.0 + max_runtime_s: float = 120.0 + max_chunks: int = 100 + capture_timeout_s: float = 3.0 + max_plan_age_s: float = 5.0 + max_control_gap_s: float = 0.5 + + def __post_init__(self) -> None: + for name in self.__dataclass_fields__: + value = getattr(self, name) + if isinstance(value, bool) or not isinstance(value, (int, float)) or not math.isfinite(value) or value <= 0: + raise ValueError(f"{name} must be finite and positive") + if type(self.max_chunks) is not int: + raise ValueError("max_chunks must be an integer") + # Below the deployed agent's 10 s lease and 2 s heartbeat bounds. + if self.max_chunk_s > 9.0 or not 5 <= self.control_hz <= 20: + raise ValueError("max_chunk_s must be <= 9 and control_hz must be in [5,20]") + if not 1 / self.control_hz < self.max_control_gap_s <= 1.0: + raise ValueError("max_control_gap_s must exceed one tick and be <= 1") + PlanarVelocityCommand(self.linear_speed_mps, 0.0, self.yaw_rate_rps) + + +@dataclass(frozen=True) +class VelocitySegment: + """A constant body-frame velocity and its intended duration.""" + + command: PlanarVelocityCommand + duration_s: float + + +DEFAULT_CHUNK_SESSION_CONFIG = ChunkSessionConfig() + + +def velocity_segments(chunk: NavigationChunk, config: ChunkSessionConfig) -> tuple[VelocitySegment, ...]: + """Convert every action and merge adjacent equal velocities without truncation.""" + segments: list[VelocitySegment] = [] + for action in chunk.commands: + if action.kind is NavigationCommandKind.STOP: + break + if action.kind is NavigationCommandKind.MOVE_FORWARD: + command = PlanarVelocityCommand(config.linear_speed_mps, 0.0, 0.0) + duration = action.distance_m / config.linear_speed_mps + else: + sign = 1 if action.kind is NavigationCommandKind.TURN_LEFT else -1 + command = PlanarVelocityCommand(0.0, 0.0, sign * config.yaw_rate_rps) + duration = math.radians(action.angle_deg) / config.yaw_rate_rps + if segments and segments[-1].command == command: + duration += segments.pop().duration_s + segments.append(VelocitySegment(command, duration)) + if sum(s.duration_s for s in segments) > config.max_chunk_s + 1e-9: + raise ValueError("complete chunk exceeds max_chunk_s; refusing to truncate recurrent history") + return tuple(segments) + + +class ChunkNavigationSession: + """Run full chunks; dry-run captures and infers once with no control writes. + + One calling thread owns control requests, so cancellation cannot leave a + background command racing a final stop. Failed model steps are never retried. + """ + + def __init__( + self, + policy: ChunkPolicy, + observations: ObservationSource, + base: MobileBase, + *, + config: ChunkSessionConfig = DEFAULT_CHUNK_SESSION_CONFIG, + event_sink: Callable[[dict[str, object]], None] | None = None, + clock: Callable[[], float] = time.monotonic, + sleep: Callable[[float], None] = time.sleep, + ) -> None: + self.policy, self.observations, self.base = policy, observations, base + self.config, self.event_sink = config, event_sink + self.clock, self.sleep = clock, sleep + self._motion_attempted = False + self._lease_id: str | None = None + self._running = False + + def _emit(self, event: str, **values: object) -> None: + if self.event_sink is not None: + self.event_sink({"event": event, "monotonic_s": self.clock(), **values}) + + def _capture(self, episode_id: str, reset: bool, previous: int) -> NavigationObservation: + state = self.base.state() + if state.active_velocity_lease_id is not None: + raise MobileBaseError("capture requires an idle base") + started = self.clock() + baseline = None + while self.clock() - started < self.config.capture_timeout_s: + observation = self.observations.capture( + episode_id=episode_id, + reset=reset, + robot_state=state.as_observation_metadata(), + ) + if not isinstance(observation, NavigationObservation): + raise TypeError("camera must return NavigationObservation") + if observation.episode_id != episode_id or observation.reset is not reset: + raise ValueError("camera changed episode identity or reset flag") + if observation.sequence < previous: + raise ValueError("camera sequence moved backwards") + if baseline is None: + baseline = observation.latest_rgb + elif observation.sequence > max(previous, baseline.sequence): + if observation.latest_rgb.captured_at_s <= baseline.captured_at_s: + raise ValueError("camera capture time did not increase") + return observation + # Await a frame newer than the first read after stopping, without + # assuming clock synchronization between the camera computer and NX. + self.sleep(0.02) + raise TimeoutError("camera did not publish a new post-motion frame") + + def _execute(self, segments: tuple[VelocitySegment, ...], deadline: float) -> None: + total = sum(s.duration_s for s in segments) + if not segments: + return + self.base.preflight() + self._motion_attempted = True # A failed POST may still have been accepted. + self._lease_id = None + started = self.clock() + lease = self.base.start_velocity_lease(segments[0].command, duration_s=total + 0.25) + if not isinstance(lease, str) or not lease: + raise MobileBaseError("control service returned an invalid lease id") + self._lease_id = lease + segment_index, boundary = 0, segments[0].duration_s + last_tick = started + while True: + now = self.clock() + if now >= deadline: + raise TimeoutError("navigation runtime limit reached during motion") + if now - last_tick > self.config.max_control_gap_s: + raise TimeoutError("control heartbeat delayed; aborting chunk") + if now >= started + total: + if segment_index != len(segments) - 1: + raise TimeoutError("control delay skipped an action; aborting chunk") + break + while now >= started + boundary and segment_index < len(segments) - 1: + if now >= started + boundary + segments[segment_index + 1].duration_s: + raise TimeoutError("control delay skipped an action; aborting chunk") + segment_index += 1 + boundary += segments[segment_index].duration_s + self._emit("segment_started", index=segment_index) + self.base.update_velocity_lease(lease, segments[segment_index].command) + last_tick = now + self.sleep(max(0.0, min(now + 1 / self.config.control_hz, started + boundary) - self.clock())) + self.base.update_velocity_lease(lease, PlanarVelocityCommand.stopped()) + # /v1/stop also disarms the agent: reserve it for task termination. + while self.clock() < started + total + 1.0: + state = self.base.state() + if state.active_velocity_lease_id is None: + self._emit("chunk_executed", planned_s=total, elapsed_s=self.clock() - started) + return + if state.active_velocity_lease_id != lease: + raise MobileBaseError("motion ownership changed during chunk completion") + self.sleep(0.02) + raise TimeoutError("control lease did not finish") + + def _stop_after_motion(self, *, keep_motion_ready: bool = False) -> None: + if not self._motion_attempted: + return + if keep_motion_ready and self._lease_id is not None: + # The owner checks identity atomically with cancellation. Never + # substitute an unscoped stop if another controller took ownership. + self.base.release_velocity_lease(self._lease_id) + return + if self._lease_id is not None: + try: + active = self.base.state().active_velocity_lease_id + except MobileBaseError: + # If state is unavailable, still attempt the final stop. + active = self._lease_id + if active is not None and active != self._lease_id: + self._emit("ownership_lost", message="another action is active; not stopping its owner") + return + self.base.stop() + + def run( + self, + instruction: str, + *, + execute: bool = False, + episode_id: str | None = None, + keep_motion_ready: bool = False, + ) -> dict[str, object]: + """Run until STOP/bounds; optionally release a healthy task's own lease. + + Interactive callers can preserve existing readiness on normal completion + or KeyboardInterrupt. Errors and process termination still disarm. + """ + if self._running: + raise RuntimeError("navigation session is already running") + if not isinstance(execute, bool) or not isinstance(instruction, str) or not instruction.strip(): + raise ValueError("execute must be boolean and instruction must be non-empty") + if not isinstance(keep_motion_ready, bool): + raise ValueError("keep_motion_ready must be boolean") + if execute and keep_motion_ready and not isinstance(self.base, ReleasableMobileBase): + raise MobileBaseError("base does not support scoped lease release") + episode_id = episode_id or f"go2-{uuid.uuid4().hex}" + started = self.clock() + deadline = started + self.config.max_runtime_s + self._running, self._motion_attempted = True, False + self._lease_id = None + release = False + previous, chunks, actions = -1, 0, 0 + reason = "chunk_limit" + try: + if execute: + self.base.preflight() + for index in range(self.config.max_chunks): + if self.clock() >= deadline: + reason = "max_runtime" + break + observation = self._capture(episode_id, index == 0, previous) + previous = observation.sequence + captured = self.clock() + chunk = self.policy.plan(NavigationRequest(instruction, observation)) + latency = self.clock() - captured + if not isinstance(chunk, NavigationChunk) or chunk.observation_sequence != previous: + raise ValueError("policy chunk does not match the captured observation") + segments = velocity_segments(chunk, self.config) + chunks += 1 + self._emit( + "chunk_planned", + observation_sequence=previous, + inference_roundtrip_s=latency, + commands=[c.to_action_values() for c in chunk.commands], + segments=len(segments), + planned_motion_s=sum(s.duration_s for s in segments), + ) + if not execute: + reason = "dry_run" + break + if latency > self.config.max_plan_age_s: + raise TimeoutError("inference result is too old to execute") + if self.clock() + sum(s.duration_s for s in segments) + 1.0 >= deadline: + reason = "max_runtime" + break + self._execute(segments, deadline) + actions += len(chunk.commands) + if chunk.terminal: + reason = "stop" + break + release = keep_motion_ready + except KeyboardInterrupt: + release = keep_motion_ready + raise + finally: + try: + self._stop_after_motion(keep_motion_ready=release) + finally: + self._running = False + result = { + "episode_id": episode_id, + "reason": reason, + "execute": execute, + "chunks": chunks, + "executed_actions": actions, + "wall_seconds": self.clock() - started, + } + self._emit("navigation_finished", **result) + return result diff --git a/src/embodirun/robots/unitree/go2/navigation/config.py b/src/embodirun/application/navigation/config.py similarity index 97% rename from src/embodirun/robots/unitree/go2/navigation/config.py rename to src/embodirun/application/navigation/config.py index 6254464..aac1875 100644 --- a/src/embodirun/robots/unitree/go2/navigation/config.py +++ b/src/embodirun/application/navigation/config.py @@ -5,7 +5,7 @@ import math from dataclasses import dataclass -from .motion import DEFAULT_PLANAR_VELOCITY_LIMITS, PlanarVelocityLimits +from embodirun.robots.mobile_base.motion import DEFAULT_PLANAR_VELOCITY_LIMITS, PlanarVelocityLimits def _normalize_number( diff --git a/src/embodirun/robots/unitree/go2/navigation/controllers/__init__.py b/src/embodirun/application/navigation/controllers/__init__.py similarity index 100% rename from src/embodirun/robots/unitree/go2/navigation/controllers/__init__.py rename to src/embodirun/application/navigation/controllers/__init__.py diff --git a/src/embodirun/robots/unitree/go2/navigation/controllers/pulse.py b/src/embodirun/application/navigation/controllers/pulse.py similarity index 96% rename from src/embodirun/robots/unitree/go2/navigation/controllers/pulse.py rename to src/embodirun/application/navigation/controllers/pulse.py index e24d0a8..44a338a 100644 --- a/src/embodirun/robots/unitree/go2/navigation/controllers/pulse.py +++ b/src/embodirun/application/navigation/controllers/pulse.py @@ -5,12 +5,12 @@ import math from dataclasses import dataclass -from ..motion import ( +from embodirun.robots.mobile_base.motion import ( DEFAULT_PLANAR_VELOCITY_LIMITS, PlanarVelocityCommand, PlanarVelocityLimits, ) -from ..plan import Waypoint +from embodirun.robots.mobile_base.plan import Waypoint @dataclass(frozen=True, slots=True) diff --git a/src/embodirun/robots/unitree/go2/navigation/controllers/time_sync.py b/src/embodirun/application/navigation/controllers/time_sync.py similarity index 96% rename from src/embodirun/robots/unitree/go2/navigation/controllers/time_sync.py rename to src/embodirun/application/navigation/controllers/time_sync.py index cc0a345..1979759 100644 --- a/src/embodirun/robots/unitree/go2/navigation/controllers/time_sync.py +++ b/src/embodirun/application/navigation/controllers/time_sync.py @@ -4,10 +4,9 @@ import math +from embodirun.robots.mobile_base.motion import MobileBaseState from embodirun.utils import Pose2D -from ..motion import MobileBaseState - MAX_PROJECTION_S = 1.0 diff --git a/src/embodirun/robots/unitree/go2/navigation/controllers/velocity_lease.py b/src/embodirun/application/navigation/controllers/velocity_lease.py similarity index 91% rename from src/embodirun/robots/unitree/go2/navigation/controllers/velocity_lease.py rename to src/embodirun/application/navigation/controllers/velocity_lease.py index dd10798..d5efc3c 100644 --- a/src/embodirun/robots/unitree/go2/navigation/controllers/velocity_lease.py +++ b/src/embodirun/application/navigation/controllers/velocity_lease.py @@ -2,8 +2,8 @@ from __future__ import annotations -from ..interfaces import MobileBase, MobileBaseError -from ..motion import PlanarVelocityCommand +from embodirun.robots.mobile_base.interfaces import MobileBase, MobileBaseError +from embodirun.robots.mobile_base.motion import PlanarVelocityCommand class VelocityLease: diff --git a/src/embodirun/robots/unitree/go2/navigation/controllers/waypoint_follower.py b/src/embodirun/application/navigation/controllers/waypoint_follower.py similarity index 98% rename from src/embodirun/robots/unitree/go2/navigation/controllers/waypoint_follower.py rename to src/embodirun/application/navigation/controllers/waypoint_follower.py index d2b6d8d..fa94303 100644 --- a/src/embodirun/robots/unitree/go2/navigation/controllers/waypoint_follower.py +++ b/src/embodirun/application/navigation/controllers/waypoint_follower.py @@ -5,14 +5,13 @@ import math from dataclasses import dataclass -from embodirun.utils import Pose2D, compose_relative_pose, relative_pose - -from ..motion import ( +from embodirun.robots.mobile_base.motion import ( DEFAULT_PLANAR_VELOCITY_LIMITS, PlanarVelocityCommand, PlanarVelocityLimits, ) -from ..plan import WaypointPlan +from embodirun.robots.mobile_base.plan import WaypointPlan +from embodirun.utils import Pose2D, compose_relative_pose, relative_pose @dataclass(frozen=True, slots=True) diff --git a/src/embodirun/robots/unitree/go2/navigation/events.py b/src/embodirun/application/navigation/events.py similarity index 100% rename from src/embodirun/robots/unitree/go2/navigation/events.py rename to src/embodirun/application/navigation/events.py diff --git a/src/embodirun/robots/unitree/go2/navigation/reactive_session.py b/src/embodirun/application/navigation/reactive_session.py similarity index 96% rename from src/embodirun/robots/unitree/go2/navigation/reactive_session.py rename to src/embodirun/application/navigation/reactive_session.py index cb6eee6..141939a 100644 --- a/src/embodirun/robots/unitree/go2/navigation/reactive_session.py +++ b/src/embodirun/application/navigation/reactive_session.py @@ -7,6 +7,12 @@ import uuid from collections.abc import Callable +from embodirun.robots.mobile_base.interfaces import MobileBase, MobileBaseError, NavigationPolicy, ObservationSource +from embodirun.robots.mobile_base.motion import MobileBaseState +from embodirun.robots.mobile_base.observation import NavigationObservation +from embodirun.robots.mobile_base.plan import Waypoint, WaypointPlan +from embodirun.robots.mobile_base.request import NavigationRequest + from .config import ( DEFAULT_REACTIVE_NAVIGATION_SESSION_CONFIG, ReactiveNavigationSessionConfig, @@ -18,11 +24,6 @@ NavigationSessionEvent, NavigationSessionResult, ) -from .interfaces import MobileBase, MobileBaseError, NavigationPolicy, ObservationSource -from .motion import MobileBaseState -from .observation import NavigationObservation -from .plan import Waypoint, WaypointPlan -from .request import NavigationRequest from .telemetry import NavigationTelemetry diff --git a/src/embodirun/robots/unitree/go2/navigation/session.py b/src/embodirun/application/navigation/session.py similarity index 96% rename from src/embodirun/robots/unitree/go2/navigation/session.py rename to src/embodirun/application/navigation/session.py index f0a8b75..f7d5d92 100644 --- a/src/embodirun/robots/unitree/go2/navigation/session.py +++ b/src/embodirun/application/navigation/session.py @@ -8,6 +8,11 @@ import uuid from collections.abc import Callable +from embodirun.robots.mobile_base.interfaces import MobileBase, NavigationPolicy, ObservationSource +from embodirun.robots.mobile_base.motion import MobileBaseState +from embodirun.robots.mobile_base.observation import NavigationObservation +from embodirun.robots.mobile_base.plan import WaypointPlan +from embodirun.robots.mobile_base.request import NavigationRequest from embodirun.utils import Pose2D from .config import DEFAULT_NAVIGATION_SESSION_CONFIG, NavigationSessionConfig @@ -20,11 +25,6 @@ NavigationSessionEvent, NavigationSessionResult, ) -from .interfaces import MobileBase, NavigationPolicy, ObservationSource -from .motion import MobileBaseState -from .observation import NavigationObservation -from .plan import WaypointPlan -from .request import NavigationRequest from .telemetry import NavigationTelemetry diff --git a/src/embodirun/robots/unitree/go2/navigation/telemetry.py b/src/embodirun/application/navigation/telemetry.py similarity index 100% rename from src/embodirun/robots/unitree/go2/navigation/telemetry.py rename to src/embodirun/application/navigation/telemetry.py diff --git a/src/embodirun/bindings/unitree/go2/activevln/__init__.py b/src/embodirun/bindings/unitree/go2/activevln/__init__.py new file mode 100644 index 0000000..cf59c79 --- /dev/null +++ b/src/embodirun/bindings/unitree/go2/activevln/__init__.py @@ -0,0 +1 @@ +"""ActiveVLN HTTP-to-Go2 discrete navigation binding.""" diff --git a/src/embodirun/bindings/unitree/go2/activevln/__main__.py b/src/embodirun/bindings/unitree/go2/activevln/__main__.py new file mode 100644 index 0000000..ff3e2ec --- /dev/null +++ b/src/embodirun/bindings/unitree/go2/activevln/__main__.py @@ -0,0 +1,5 @@ +"""Run the ActiveVLN navigation CLI without installing a console script.""" + +from .cli import main + +raise SystemExit(main()) diff --git a/src/embodirun/bindings/unitree/go2/activevln/cli.py b/src/embodirun/bindings/unitree/go2/activevln/cli.py new file mode 100644 index 0000000..110df20 --- /dev/null +++ b/src/embodirun/bindings/unitree/go2/activevln/cli.py @@ -0,0 +1,282 @@ +"""CLI for Go2 RealSense -> onboard NX ActiveVLN -> full-chunk motion.""" + +from __future__ import annotations + +import argparse +import json +import math +import os +import signal +import sys +import threading +import uuid +from contextlib import ExitStack +from dataclasses import asdict, dataclass, field, replace +from pathlib import Path +from urllib.parse import urlsplit + +from embodirun.application.navigation.async_chunk_session import AsyncChunkNavigationSession, OverlapConfig +from embodirun.application.navigation.chunk_session import ChunkNavigationSession, ChunkSessionConfig +from embodirun.model_services.backends.embodiinfer.compat import connect_client +from embodirun.robots.unitree.go2.camera import Go2CameraClient +from embodirun.robots.unitree.go2.client import Go2ControlClient + +from .interactive import interact +from .policy import ActiveVLNPolicy, check_capabilities + + +@dataclass(frozen=True) +class NavigationConfig: + """Connection placeholders and bounded motion settings, with secrets in env vars.""" + + robot_url: str = "" + robot_token_env: str | None = None + camera_url: str = "" + control_url: str = "" + inference_url: str = "" + robot_id: str = "go2" + camera_token_env: str = "GO2_CAMERA_TOKEN" + control_token_env: str = "GO2_API_TOKEN" + inference_token_env: str = "ACTIVEVLN_BENCHMARK_TOKEN" + inference_timeout_s: float = 60.0 + camera_timeout_s: float = 2.0 + control_timeout_s: float = 0.5 + mode: str = "overlap" + session: ChunkSessionConfig = field(default_factory=ChunkSessionConfig) + overlap: OverlapConfig = field(default_factory=OverlapConfig) + + @classmethod + def load(cls, path: Path) -> NavigationConfig: + """Read strict JSON without connecting, installing, or changing the system.""" + value = json.loads(path.read_text()) + if not isinstance(value, dict): + raise ValueError("configuration must be a JSON object") + if not isinstance(value.get("robot_url", ""), str): + raise ValueError("robot_url must be a URL or an empty placeholder") + if value.get("robot_url"): + token_name = value.get("robot_token_env") or "GO2_API_TOKEN" + for key in ("camera_token_env", "control_token_env"): + if value.get(key) and value[key] != token_name: + raise ValueError(f"{key} conflicts with robot_token_env") + value[key] = token_name + for endpoint in ("camera_url", "control_url"): + if not isinstance(value.get(endpoint, ""), str): + raise ValueError(f"{endpoint} must be a URL or an empty placeholder") + if value.get(endpoint) and value[endpoint].rstrip("/") != value["robot_url"].rstrip("/"): + raise ValueError(f"{endpoint} conflicts with robot_url") + value[endpoint] = value["robot_url"] + session = ChunkSessionConfig(**value.pop("session", {})) + overlap = OverlapConfig(**value.pop("overlap", {})) + config = cls(**value, session=session, overlap=overlap) + for name in ("camera_token_env", "control_token_env", "inference_token_env"): + if not isinstance(getattr(config, name), str) or not getattr(config, name): + raise ValueError(f"{name} must name an environment variable") + if config.mode not in ("chunk", "overlap"): + raise ValueError("mode must be chunk or overlap") + for name in ("inference_timeout_s", "camera_timeout_s", "control_timeout_s"): + number = getattr(config, name) + if ( + isinstance(number, bool) + or not isinstance(number, (int, float)) + or not math.isfinite(number) + or number <= 0 + ): + raise ValueError(f"{name} must be finite and positive") + for name in ("robot_url", "camera_url", "control_url", "inference_url"): + value = getattr(config, name) + if not isinstance(value, str): + raise ValueError(f"{name} must be a URL or an empty placeholder") + parsed = urlsplit(value) + if value and ( + parsed.scheme not in ("http", "https") + or not parsed.hostname + or parsed.username + or parsed.password + or parsed.query + or parsed.fragment + or parsed.path not in ("", "/") + ): + raise ValueError(f"{name} must be an HTTP service root without credentials") + return config + + def require_endpoints(self) -> None: + """Fail before any network access while a deployment address is blank.""" + missing = [name for name in ("camera_url", "control_url", "inference_url") if not getattr(self, name)] + if missing: + raise ValueError("fill deployment endpoints first: " + ", ".join(missing)) + + +def _parser() -> argparse.ArgumentParser: + parser = argparse.ArgumentParser(prog="embodirun go2 activevln", description=__doc__) + sub = parser.add_subparsers(dest="command", required=True) + for name, description in ( + ("plan", "inspect configuration offline; blank endpoints are allowed"), + ("check", "read camera, robot state and model capabilities without motion"), + ("run", "run navigation; defaults to one observation/inference without motion"), + ("interactive", "accept successive instructions using the running model and owner services"), + ): + command = sub.add_parser(name, help=description) + command.add_argument("--config", type=Path, required=True) + command.add_argument( + "--mode", choices=("chunk", "overlap"), help="override synchronous or overlapping execution" + ) + command.add_argument( + "--overlap-lead-s", type=float, help="override seconds before motion ends to start inference" + ) + if name == "run": + command.add_argument("--instruction", required=True) + if name in {"run", "interactive"}: + command.add_argument("--execute", action="store_true", help="enable motion on an already armed owner") + command.add_argument("--output-jsonl", type=Path, help="create a new event log; never overwrite") + command.add_argument("--max-chunks", type=int, help="override the per-instruction chunk limit") + command.add_argument("--max-runtime-s", type=float, help="override the per-instruction time limit") + sub.add_parser("edge", help="forward to the existing Go2 probe/install/start/status/stop CLI") + return parser + + +def main(argv: list[str] | None = None) -> int: + """Connect existing edge/model services and run navigation with explicit motion opt-in.""" + arguments = list(sys.argv[1:] if argv is None else argv) + if arguments and arguments[0] == "edge": + from embodirun.deployment.go2.cli import main as edge_main + + return edge_main(arguments[1:]) + args = _parser().parse_args(arguments) + try: + config = NavigationConfig.load(args.config) + if args.mode is not None: + config = replace(config, mode=args.mode) + if args.overlap_lead_s is not None: + config = replace(config, overlap=replace(config.overlap, lead_s=args.overlap_lead_s)) + if args.command in {"run", "interactive"}: + overrides = { + key: getattr(args, key) for key in ("max_chunks", "max_runtime_s") if getattr(args, key) is not None + } + config = replace(config, session=replace(config.session, **overrides)) + if args.command == "plan": + print(json.dumps({"configuration": asdict(config), "motion_enabled": False}, indent=2)) + return 0 + config.require_endpoints() + if args.command == "run" and not args.instruction.strip(): + raise ValueError("instruction must be non-empty") + client = connect_client( + config.inference_url, + os.environ.get(config.inference_token_env), + timeout_s=config.inference_timeout_s, + ) + capabilities = check_capabilities(client, overlap=config.mode == "overlap") + camera = Go2CameraClient( + config.camera_url, + token=os.environ.get(config.camera_token_env), + timeout_s=config.camera_timeout_s, + require_depth=False, + ) + base = Go2ControlClient( + config.control_url, + token=os.environ.get(config.control_token_env), + timeout_s=config.control_timeout_s, + ) + if args.command == "check": + state = base.state() + observation = camera.capture(episode_id="go2-check", reset=True) + print( + json.dumps( + { + "camera_sequence": observation.sequence, + "depth_available": observation.depth is not None, + "state_sequence": state.sequence, + "active_lease": state.active_velocity_lease_id, + "inference": capabilities, + "motion_enabled": False, + }, + sort_keys=True, + ) + ) + return 0 + with ExitStack() as stack: + output = None + output_lock = threading.Lock() + if args.output_jsonl: + args.output_jsonl.parent.mkdir(parents=True, exist_ok=True) + output = stack.enter_context(args.output_jsonl.open("x", encoding="utf-8")) + + def emit(event: dict[str, object]) -> None: + line = json.dumps(event, ensure_ascii=False, allow_nan=False) + with output_lock: + print(line, flush=True) + if output is not None: + output.write(line + "\n") + output.flush() + + def interrupt(_signum: int, _frame: object) -> None: + # Termination must exit the process and disarm, not return to + # the interactive prompt as an operator's Ctrl+C would. + raise SystemExit(128 + signal.SIGTERM) + + old_handler = signal.signal(signal.SIGTERM, interrupt) + stack.callback(signal.signal, signal.SIGTERM, old_handler) + interactive = args.command == "interactive" + if interactive and args.execute: + base.preflight(require_release=True, require_renewal=config.mode == "overlap") + + def run_task(instruction: str) -> dict[str, object]: + if interactive and args.execute: + base.preflight(require_release=True, require_renewal=config.mode == "overlap") + episode_id = f"go2-{uuid.uuid4().hex}" + + def task_emit(event: dict[str, object]) -> None: + emit({**event, "episode_id": episode_id}) + + task_emit( + { + "event": "navigation_started", + "instruction": instruction, + "execute": args.execute, + "mode": config.mode, + } + ) + policy = ActiveVLNPolicy(client, robot_id=config.robot_id, event_sink=task_emit) + try: + if config.mode == "overlap": + session = AsyncChunkNavigationSession( + policy, camera, base, config=config.session, overlap=config.overlap, event_sink=task_emit + ) + else: + session = ChunkNavigationSession( + policy, camera, base, config=config.session, event_sink=task_emit + ) + return session.run( + instruction, + execute=args.execute, + episode_id=episode_id, + keep_motion_ready=interactive and args.execute, + ) + except KeyboardInterrupt: + task_emit({"event": "navigation_cancelled"}) + raise + finally: + # New remote session per instruction resets KV/history only; + # the external inference process keeps model weights loaded. + policy.close() + + if interactive: + print( + f"Motion {'ENABLED' if args.execute else 'disabled (dry-run)'}. " + f"Mode: {config.mode}. " + f"Task bounds: {config.session.max_chunks} chunks, {config.session.max_runtime_s:g} s " + "(in-flight inference cleanup may take longer).", + flush=True, + ) + return interact(run_task) + run_task(args.instruction) + return 0 + except KeyboardInterrupt: + print("navigation interrupted", file=sys.stderr) + return 130 + except Exception as error: + print(f"navigation failed: {type(error).__name__}: {error}", file=sys.stderr) + return 1 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/src/embodirun/bindings/unitree/go2/activevln/interactive.py b/src/embodirun/bindings/unitree/go2/activevln/interactive.py new file mode 100644 index 0000000..9ff0669 --- /dev/null +++ b/src/embodirun/bindings/unitree/go2/activevln/interactive.py @@ -0,0 +1,42 @@ +"""Serial terminal tasks over an already running model and hardware owner.""" + +from __future__ import annotations + +from collections.abc import Callable + + +def interact(run_task: Callable[[str], dict[str, object]]) -> int: + """Read a fresh instruction after each stopped task; propagate operational errors.""" + print("Enter an instruction; Ctrl+C cancels the current task. /quit exits, /help shows help.", flush=True) + while True: + try: + instruction = input("activevln> ").strip() + except (EOFError, KeyboardInterrupt): + print("\nInteractive navigation closed. Model and owner services remain running.", flush=True) + return 0 + if not instruction: + continue + if instruction in {"/quit", "/exit"}: + print("Interactive navigation closed. Model and owner services remain running.", flush=True) + return 0 + if instruction == "/help": + print( + "Each instruction starts a new navigation history. With --execute, tasks run until model STOP " + "or the configured chunk/time limit; otherwise each task only infers once. " + "Ctrl+C during a task stops it and returns here after inference cleanup; " + "Ctrl+C at this prompt exits. /quit exits. Errors exit without automatic re-arming.", + flush=True, + ) + continue + if instruction.startswith("/"): + print("Unknown command. Use /help or enter a navigation instruction.", flush=True) + continue + try: + result = run_task(instruction) + except KeyboardInterrupt: + print("Task cancelled; ready for another instruction.", flush=True) + continue + print(f"Task ended: {result['reason']} ({result['chunks']} chunks). Enter the next instruction.", flush=True) + + +__all__ = ["interact"] diff --git a/src/embodirun/bindings/unitree/go2/activevln/policy.py b/src/embodirun/bindings/unitree/go2/activevln/policy.py new file mode 100644 index 0000000..1c88a5e --- /dev/null +++ b/src/embodirun/bindings/unitree/go2/activevln/policy.py @@ -0,0 +1,187 @@ +"""Map typed ActiveVLN HTTP actions onto metric Go2 commands, without model imports.""" + +from __future__ import annotations + +import hashlib +import json +import math +import threading +import uuid +from collections.abc import Callable, Mapping, Sequence + +from embodirun.application.navigation.chunk_session import NavigationChunk +from embodirun.model_services.backends.embodiinfer.http import EmbodiInferHttpClient +from embodirun.model_services.contracts import ImagePayload, PolicyObservation, PolicyResult, Session +from embodirun.robots.mobile_base.discrete import NavigationCommand, NavigationCommandKind +from embodirun.robots.mobile_base.request import NavigationRequest + +ACTION_SPACE = "activevln.r2r.discrete.v1" +EXECUTION_PREFIX_SCHEMA = "activevln.execution_prefix.v1" + + +def check_capabilities(client: EmbodiInferHttpClient, *, overlap: bool = False) -> dict[str, object]: + """Require the batch-one ActiveVLN R2R contract before opening a session.""" + adapter = client.capabilities().get("adapter") + if not isinstance(adapter, Mapping) or adapter.get("action_space") != ACTION_SPACE: + raise ValueError(f"inference service must advertise {ACTION_SPACE}") + if adapter.get("model") != "activevln" or adapter.get("recurrent") is not True: + raise ValueError("inference service must advertise recurrent ActiveVLN") + if adapter.get("max_batch_size") != 1: + raise ValueError("Go2 requires the batch=1 ActiveVLN serving profile") + if overlap and adapter.get("execution_prefix") != EXECUTION_PREFIX_SCHEMA: + raise ValueError("async navigation requires an execution-prefix-aware ActiveVLN service") + return dict(adapter) + + +def navigation_chunk(result: PolicyResult, observation_sequence: int) -> NavigationChunk: + """Validate already-parsed [3,2] R2R rows and convert cm/degrees to metric commands. + + This does not parse model text. STOP ends execution even if later rows are + present; padding and action magnitudes must satisfy the published grammar. + """ + if result.action_space != ACTION_SPACE or len(result.actions) != 1: + raise ValueError("unexpected ActiveVLN action space or action count") + action = result.actions[0] + values = action.values + if action.kind != "discrete_chunk" or values.get("parsed_valid") is not True: + raise ValueError("ActiveVLN did not return a valid parsed discrete chunk") + rows = values.get("rows") + if not isinstance(rows, (list, tuple)) or len(rows) != 3: + raise ValueError("ActiveVLN rows must have shape [3,2]") + commands: list[NavigationCommand] = [] + padded = stopped = False + for row in rows: + if not isinstance(row, Sequence) or isinstance(row, (str, bytes)) or len(row) != 2: + raise ValueError("ActiveVLN rows must have shape [3,2]") + kind, value = row + if any(isinstance(x, bool) or not isinstance(x, (int, float)) or not math.isfinite(x) for x in row): + raise ValueError("action entries must be finite numbers") + if kind not in (-1, 0, 1, 2, 3): + raise ValueError("unknown discrete action ID") + allowed = (0,) if kind in (-1, 0) else ((25, 50, 75) if kind == 1 else (15, 30, 45)) + if value not in allowed: + raise ValueError("action magnitude exceeds the R2R grammar") + if kind == -1: + padded = True + continue + if padded: + raise ValueError("padding must be trailing") + if stopped: + continue + if kind == 0: + commands.append(NavigationCommand(NavigationCommandKind.STOP)) + stopped = True + elif kind == 1: + commands.append(NavigationCommand(NavigationCommandKind.MOVE_FORWARD, distance_m=value / 100)) + else: + direction = NavigationCommandKind.TURN_LEFT if kind == 2 else NavigationCommandKind.TURN_RIGHT + commands.append(NavigationCommand(direction, angle_deg=value)) + return NavigationChunk(observation_sequence, tuple(commands)) + + +class ActiveVLNPolicy: + """Serialize one remote recurrent session, including optional continuation context.""" + + def __init__( + self, + client: EmbodiInferHttpClient, + *, + robot_id: str = "go2", + event_sink: Callable[[dict[str, object]], None] | None = None, + ) -> None: + self.client, self.robot_id, self.event_sink = client, robot_id, event_sink + self.session: Session | None = None + self._step = 0 + self._episode: str | None = None + self._failed = False + self._lock = threading.RLock() + + def plan(self, request: NavigationRequest) -> NavigationChunk: + """Send one RGB observation and validate the committed response identity.""" + with self._lock: + return self._plan(request) + + def plan_after(self, request: NavigationRequest, remaining: tuple[NavigationCommand, ...]) -> NavigationChunk: + """Plan a suffix after the immutable previous chunk, without replaying its tail.""" + with self._lock: + if self._step == 0: + raise ValueError("overlap requires a committed previous model turn") + rows = [] + for command in remaining: + if command.kind is NavigationCommandKind.MOVE_FORWARD: + rows.append([1, float(command.distance_m * 100)]) + elif command.kind in (NavigationCommandKind.TURN_LEFT, NavigationCommandKind.TURN_RIGHT): + rows.append([2 if command.kind is NavigationCommandKind.TURN_LEFT else 3, float(command.angle_deg)]) + else: + raise ValueError("a committed STOP cannot have a continuation") + prefix = {"schema": EXECUTION_PREFIX_SCHEMA, "previous_step_id": self._step - 1, "remaining_actions": rows} + return self._plan(request, prefix) + + def _plan(self, request: NavigationRequest, prefix: dict[str, object] | None = None) -> NavigationChunk: + if self._failed: + raise RuntimeError("failed policy session cannot be reused") + observation = request.observation + try: + if self.session is None: + if not observation.reset: + raise ValueError("the first observation must reset episode history") + self.session = self.client.open_session( + robot_id=self.robot_id, + action_space=ACTION_SPACE, + metadata={"episode_id": observation.episode_id}, + ) + self._episode = observation.episode_id + elif observation.reset or observation.episode_id != self._episode: + raise ValueError("episode changed within a recurrent session") + image = observation.latest_rgb + response = self.client.step( + PolicyObservation( + session_id=self.session.session_id, + request_id=uuid.uuid4().hex, + step_id=self._step, + instruction=request.instruction, + # The frozen optimized NX adapter reserves slot zero for its + # single resident KV cache. This is not robot proprioception. + state={"benchmark_slot": 0}, + images=(ImagePayload("observation.images.rgb", image.media_type, image.data),), + metadata={ + "episode_id": self._episode, + "observation_sequence": observation.sequence, + **({"activevln_execution": prefix} if prefix is not None else {}), + }, + ) + ) + if response.session_revision != self.session.revision + 1: + raise ValueError("inference session revision did not advance by one") + chunk = navigation_chunk(response, observation.sequence) + if prefix is not None: + digest = hashlib.sha256( + json.dumps(prefix, sort_keys=True, separators=(",", ":"), allow_nan=False).encode() + ).hexdigest() + if response.actions[0].values.get("execution_prefix_sha256") != digest: + raise ValueError("inference did not acknowledge the executed prefix context") + self.session = Session(response.session_id, response.session_revision) + self._step += 1 + if self.event_sink is not None: + self.event_sink( + { + "event": "policy_result", + "step_id": response.step_id, + "session_revision": response.session_revision, + "policy_revision": response.policy_revision, + "timing": dict(response.timing), + "observation_sequence": observation.sequence, + } + ) + return chunk + except BaseException: + self._failed = True + raise + + def close(self) -> None: + """Release remote recurrent state, including after a rejected action.""" + with self._lock: + self._failed = True + if self.session is not None: + session, self.session = self.session, None + self.client.close(session.session_id) diff --git a/src/embodirun/bindings/unitree/go2/streamvln/__init__.py b/src/embodirun/bindings/unitree/go2/streamvln/__init__.py index eebac78..d084a2a 100644 --- a/src/embodirun/bindings/unitree/go2/streamvln/__init__.py +++ b/src/embodirun/bindings/unitree/go2/streamvln/__init__.py @@ -1,42 +1,12 @@ -"""Remote installation and lifecycle management for the Go2 edge agent.""" +"""StreamVLN policy-to-Go2 binding.""" from __future__ import annotations from importlib import import_module from typing import Any -__all__ = [ - "BINDING_DEFINITION", - "CameraStartOptions", - "CommandResult", - "ControlStartOptions", - "Go2AgentDeployer", - "ParamikoTransport", - "RemoteCommandError", - "RemoteTransport", - "ServiceName", - "ServiceSelection", - "SshConnection", - "StartOptions", - "StreamVLNGo2Mapper", - "main", -] - -_SYMBOL_MODULES = { - "main": ".cli", - "CameraStartOptions": ".options", - "ControlStartOptions": ".options", - "Go2AgentDeployer": ".deployer", - "ServiceName": ".options", - "ServiceSelection": ".options", - "StartOptions": ".options", - "CommandResult": ".transport", - "ParamikoTransport": ".transport", - "RemoteCommandError": ".transport", - "RemoteTransport": ".transport", - "SshConnection": ".transport", - "StreamVLNGo2Mapper": ".mapper", -} +__all__ = ["BINDING_DEFINITION", "StreamVLNGo2Mapper", "main"] +_SYMBOL_MODULES = {"main": ".cli", "StreamVLNGo2Mapper": ".mapper"} def __getattr__(name: str) -> Any: diff --git a/src/embodirun/bindings/unitree/go2/streamvln/cli.py b/src/embodirun/bindings/unitree/go2/streamvln/cli.py index 12ce8bc..983c213 100644 --- a/src/embodirun/bindings/unitree/go2/streamvln/cli.py +++ b/src/embodirun/bindings/unitree/go2/streamvln/cli.py @@ -1,264 +1,6 @@ -"""Command-line interface for deploying the Go2 edge agent over SSH.""" - -from __future__ import annotations - -import argparse -import getpass -import json -import os -import sys -from collections.abc import Callable, Mapping, Sequence -from pathlib import Path -from typing import cast - -from .deployer import Go2AgentDeployer -from .options import ( - CameraStartOptions, - ControlStartOptions, - ServiceSelection, - StartOptions, -) -from .transport import ParamikoTransport, RemoteTransport, SshConnection - -TransportFactory = Callable[[SshConnection], RemoteTransport] - - -def build_parser() -> argparse.ArgumentParser: - parser = argparse.ArgumentParser( - description="Install and manage repository-owned services on a Unitree Go2 computer." - ) - parser.add_argument("--host", required=True, help="SSH hostname or IP address") - parser.add_argument("--ssh-port", type=int, default=22) - parser.add_argument("--username", required=True, help="SSH username") - parser.add_argument( - "--remote-root", - default=".local/share/embodirun-go2-agent", - help="remote installation root, absolute or relative to the SSH user's home", - ) - parser.add_argument("--connect-timeout", type=float, default=10.0) - parser.add_argument("--command-timeout", type=float, default=30.0) - parser.add_argument( - "--accept-new-host-key", - action="store_true", - help="trust and persist a previously unseen SSH host key", - ) - parser.add_argument("--identity-file", type=Path, help="SSH private-key path") - auth = parser.add_mutually_exclusive_group() - auth.add_argument( - "--password", - help="SSH password (prefer --password-env or --ask-password to avoid shell history)", - ) - auth.add_argument("--password-env", metavar="NAME", help="environment variable with password") - auth.add_argument("--ask-password", action="store_true", help="prompt without echo") - - commands = parser.add_subparsers(dest="command", required=True) - probe = commands.add_parser("probe", help="verify SSH and the remote Python runtime") - probe.add_argument("--python", default="python3", help="remote Python executable") - - install = commands.add_parser("install", help="upload the current embodirun source") - install.add_argument( - "--package-root", - type=Path, - help="override the local embodirun package root (primarily for packaging tests)", - ) - - start = commands.add_parser("start", help="start control and/or camera services") - _add_service_selection(start) - start.add_argument("--python", default="python3", help="remote Python executable") - start.add_argument("--control-mode", choices=("live", "dry-run"), default="live") - start.add_argument("--interface", default="eno2", help="Unitree DDS network interface") - start.add_argument("--state-topic", default="rt/lf/sportmodestate") - start.add_argument( - "--cyclonedds-lib-dir", - help="remote directory containing the compatible libddsc.so.0", - ) - start.add_argument( - "--control-bind", - help="control bind address (default: the SSH --host value)", - ) - start.add_argument("--control-port", type=int, default=8080) - start.add_argument("--api-token", help="control API bearer token") - start.add_argument( - "--api-token-env", - metavar="NAME", - default="GO2_API_TOKEN", - help="token environment variable (default: GO2_API_TOKEN)", - ) - start.add_argument( - "--operator-ready", - action="store_true", - help="explicitly arm live posture/motion commands; omitted by default", - ) - start.add_argument("--camera-backend", choices=("realsense", "v4l2"), default="realsense") - start.add_argument("--realsense-serial") - start.add_argument( - "--depth-scale", - type=float, - help="verified meters per RealSense raw depth unit", - ) - start.add_argument( - "--camera-bind", - help="camera bind address (default: the SSH --host value)", - ) - start.add_argument("--camera-port", type=int, default=8765) - start.add_argument("--camera-token", help="camera API bearer token") - start.add_argument( - "--camera-token-env", - metavar="NAME", - default="GO2_CAMERA_TOKEN", - help="token environment variable (default: GO2_CAMERA_TOKEN)", - ) - start.add_argument("--camera-width", type=int, default=640) - start.add_argument("--camera-height", type=int, default=360) - start.add_argument("--camera-fps", type=int, default=15) - start.add_argument("--jpeg-fps", type=float, default=5.0) - start.add_argument("--camera-device", default="/dev/video4") - - status = commands.add_parser("status", help="show PID-backed service status") - _add_service_selection(status) - stop = commands.add_parser("stop", help="stop control and/or camera services") - _add_service_selection(stop) - return parser - - -def main( - argv: Sequence[str] | None = None, - *, - environ: Mapping[str, str] | None = None, - password_prompt: Callable[[str], str] = getpass.getpass, - transport_factory: TransportFactory = ParamikoTransport, -) -> int: - parser = build_parser() - args = parser.parse_args(argv) - environment = os.environ if environ is None else environ - - password = _resolve_password(args, environment, password_prompt) - secrets = [password] - - transport: RemoteTransport | None = None - try: - connection = SshConnection( - host=args.host, - port=args.ssh_port, - username=args.username, - password=password, - identity_file=args.identity_file, - connect_timeout_s=args.connect_timeout, - command_timeout_s=args.command_timeout, - accept_new_host_key=args.accept_new_host_key, - ) - transport = transport_factory(connection) - deployer = Go2AgentDeployer(transport, args.remote_root) - result: dict[str, object] - if args.command == "probe": - result = {"ok": True, "remote": deployer.probe(args.python)} - elif args.command == "install": - result = {"ok": True, "install": deployer.install(args.package_root)} - elif args.command == "start": - api_token = _resolve_named_secret(args.api_token, args.api_token_env, environment) - camera_token = _resolve_named_secret( - args.camera_token, - args.camera_token_env, - environment, - ) - secrets.extend([api_token, camera_token]) - options = _start_options(args, api_token=api_token, camera_token=camera_token) - result = {"ok": True, **deployer.start(options)} - elif args.command == "status": - result = {"ok": True, **deployer.status(args.service)} - elif args.command == "stop": - result = {"ok": True, **deployer.stop(args.service)} - else: # pragma: no cover - protected by argparse - raise RuntimeError(f"unsupported command: {args.command}") - except (OSError, RuntimeError, TypeError, ValueError) as exc: - message = _redact_many(str(exc), secrets) - print(json.dumps({"ok": False, "error": message}, ensure_ascii=False), file=sys.stderr) - return 1 - finally: - if transport is not None: - transport.close() - - print(json.dumps(result, ensure_ascii=False, sort_keys=True)) - return 0 - - -def _add_service_selection(parser: argparse.ArgumentParser) -> None: - parser.add_argument("--service", choices=("all", "control", "camera"), default="all") - - -def _resolve_password( - args: argparse.Namespace, - environment: Mapping[str, str], - password_prompt: Callable[[str], str], -) -> str | None: - if args.password is not None: - return args.password - if args.ask_password: - return password_prompt(f"SSH password for {args.username}@{args.host}: ") - variable = args.password_env or "GO2_SSH_PASSWORD" - return environment.get(variable) - - -def _resolve_named_secret( - literal: str | None, - variable: str | None, - environment: Mapping[str, str], -) -> str | None: - if literal is not None: - return literal - if variable: - return environment.get(variable) - return None - - -def _start_options( - args: argparse.Namespace, - *, - api_token: str | None, - camera_token: str | None, -) -> StartOptions: - service = cast(ServiceSelection, args.service) - control = None - if service in {"all", "control"}: - control = ControlStartOptions( - mode=args.control_mode, - interface=args.interface, - state_topic=args.state_topic, - cyclonedds_lib_dir=args.cyclonedds_lib_dir, - bind=args.control_bind or args.host, - port=args.control_port, - api_token=api_token, - operator_ready=args.operator_ready, - ) - camera = None - if service in {"all", "camera"}: - camera = CameraStartOptions( - backend=args.camera_backend, - realsense_serial=args.realsense_serial, - depth_scale=args.depth_scale, - bind=args.camera_bind or args.host, - port=args.camera_port, - camera_token=camera_token, - width=args.camera_width, - height=args.camera_height, - camera_fps=args.camera_fps, - jpeg_fps=args.jpeg_fps, - device=args.camera_device, - ) - return StartOptions( - python=args.python, - services=service, - control=control, - camera=camera, - ) - - -def _redact_many(text: str, secrets: Sequence[str | None]) -> str: - for secret in secrets: - if secret: - text = text.replace(secret, "") - return text +"""Compatibility CLI alias for ``embodirun go2 edge``.""" +from embodirun.deployment.go2.cli import main if __name__ == "__main__": raise SystemExit(main()) diff --git a/src/embodirun/bindings/unitree/go2/streamvln/deployer.py b/src/embodirun/bindings/unitree/go2/streamvln/deployer.py deleted file mode 100644 index f847d1d..0000000 --- a/src/embodirun/bindings/unitree/go2/streamvln/deployer.py +++ /dev/null @@ -1,130 +0,0 @@ -"""Install/probe facade for the repository-owned Unitree Go2 edge agent.""" - -from __future__ import annotations - -import hashlib -import json -import posixpath -from pathlib import Path - -from embodirun.deployment.executor import Command - -from .options import ServiceSelection, StartOptions -from .services import SERVICE_MODULES, Go2ServiceSupervisor -from .transport import RemoteTransport - -_IGNORED_DIRECTORY_NAMES = {"__pycache__", ".git", ".mypy_cache", ".pytest_cache"} -_IGNORED_FILE_SUFFIXES = {".pyc", ".pyo"} - - -class Go2AgentDeployer: - """Install the agent and delegate its lifecycle to a service supervisor.""" - - def __init__(self, transport: RemoteTransport, remote_root: str) -> None: - self.transport = transport - self.remote_root = transport.resolve_path(remote_root) - if self.remote_root == "/": - raise ValueError("remote root cannot be the filesystem root") - self.source_root = posixpath.join(self.remote_root, "src") - self.run_root = posixpath.join(self.remote_root, "run") - self.log_root = posixpath.join(self.remote_root, "logs") - self.services = Go2ServiceSupervisor( - transport, - source_root=self.source_root, - run_root=self.run_root, - log_root=self.log_root, - ) - - def probe(self, python: str = "python3") -> dict[str, object]: - version_result = self.transport.run(Command((python, "--version"))) - version_output = (version_result.stdout or version_result.stderr).strip() - prefix = "Python " - if not version_output.startswith(prefix): - raise RuntimeError("remote Python probe returned an invalid version") - platform = self.transport.run(Command(("uname", "-s"))).stdout.strip() - machine = self.transport.run(Command(("uname", "-m"))).stdout.strip() - if not platform or not machine: - raise RuntimeError("remote system probe returned incomplete information") - return { - "python": python, - "python_version": version_output[len(prefix) :], - "machine": machine, - "platform": platform, - } - - def install(self, package_root: Path | None = None) -> dict[str, object]: - local_root = (package_root or _default_package_root()).resolve() - _validate_package_root(local_root) - files = list(_iter_deployment_files(local_root)) - if not files: - raise RuntimeError(f"no deployable files found below {local_root}") - - remote_package = posixpath.join(self.source_root, "embodirun") - self.transport.make_dirs(remote_package) - self.transport.make_dirs(self.run_root, mode=0o700) - self.transport.make_dirs(self.log_root, mode=0o700) - - digest = hashlib.sha256() - for local_path in files: - relative = local_path.relative_to(local_root).as_posix() - payload = local_path.read_bytes() - digest.update(relative.encode("utf-8")) - digest.update(b"\0") - digest.update(payload) - self.transport.put_file(local_path, posixpath.join(remote_package, relative)) - - manifest = { - "format": 1, - "package": "embodirun", - "file_count": len(files), - "sha256": digest.hexdigest(), - "source_root": self.source_root, - "modules": SERVICE_MODULES, - } - self.transport.put_bytes( - (json.dumps(manifest, indent=2, sort_keys=True) + "\n").encode("utf-8"), - posixpath.join(self.remote_root, "deployment-manifest.json"), - mode=0o644, - ) - return manifest - - def start(self, options: StartOptions) -> dict[str, object]: - return self.services.start(options) - - def status(self, services: ServiceSelection = "all") -> dict[str, object]: - return self.services.status(services) - - def stop(self, services: ServiceSelection = "all") -> dict[str, object]: - return self.services.stop(services) - - -def _default_package_root() -> Path: - return Path(__file__).resolve().parents[3] - - -def _validate_package_root(path: Path) -> None: - if path.name != "embodirun" or not (path / "__init__.py").is_file(): - raise ValueError(f"package root is not an embodirun source tree: {path}") - for module in SERVICE_MODULES.values(): - if not _module_exists(path, module): - raise ValueError(f"dog-side agent module is missing: {module}") - - -def _module_exists(package_root: Path, module: str) -> bool: - relative = Path(*module.split(".")[1:]) - return (package_root / relative).is_dir() or (package_root / relative).with_suffix(".py").is_file() - - -def _iter_deployment_files(root: Path): - for path in sorted(root.rglob("*")): - relative_parts = path.relative_to(root).parts - if any(part in _IGNORED_DIRECTORY_NAMES for part in relative_parts): - continue - if path.is_symlink() or not path.is_file(): - continue - if path.suffix in _IGNORED_FILE_SUFFIXES or path.name == ".DS_Store": - continue - yield path - - -__all__ = ["Go2AgentDeployer"] diff --git a/src/embodirun/bindings/unitree/go2/streamvln/mapper.py b/src/embodirun/bindings/unitree/go2/streamvln/mapper.py index 2580af4..f408322 100644 --- a/src/embodirun/bindings/unitree/go2/streamvln/mapper.py +++ b/src/embodirun/bindings/unitree/go2/streamvln/mapper.py @@ -12,11 +12,11 @@ PolicyResult, ) from embodirun.robots import RobotAction, RobotObservation -from embodirun.robots.sensors.cameras import CameraFrame -from embodirun.robots.unitree.go2.navigation.discrete import ( +from embodirun.robots.mobile_base.discrete import ( NavigationCommand, NavigationCommandKind, ) +from embodirun.robots.sensors.cameras import CameraFrame POLICY_ACTION_SPACE = "streamvln.action_chunk.v1" diff --git a/src/embodirun/bindings/unitree/go2/streamvln/options.py b/src/embodirun/bindings/unitree/go2/streamvln/options.py deleted file mode 100644 index eb0a39d..0000000 --- a/src/embodirun/bindings/unitree/go2/streamvln/options.py +++ /dev/null @@ -1,109 +0,0 @@ -"""Validated options for starting Unitree Go2 edge services.""" - -from __future__ import annotations - -import ipaddress -from dataclasses import dataclass, field -from typing import Literal, cast - -ServiceName = Literal["control", "camera"] -ServiceSelection = Literal["all", "control", "camera"] - - -@dataclass(frozen=True) -class ControlStartOptions: - """Remote control-service arguments.""" - - mode: Literal["dry-run", "live"] = "live" - interface: str = "eno2" - state_topic: str = "rt/lf/sportmodestate" - cyclonedds_lib_dir: str | None = None - bind: str = "127.0.0.1" - port: int = 8080 - api_token: str | None = field(default=None, repr=False) - operator_ready: bool = False - - def __post_init__(self) -> None: - _validate_port(self.port, "control") - _validate_token_for_bind(self.bind, self.api_token, "control API") - if self.mode == "live" and not self.cyclonedds_lib_dir: - raise ValueError("live control requires --cyclonedds-lib-dir") - - -@dataclass(frozen=True) -class CameraStartOptions: - """Remote camera-service arguments.""" - - backend: Literal["realsense", "v4l2"] = "realsense" - realsense_serial: str | None = None - depth_scale: float | None = None - bind: str = "127.0.0.1" - port: int = 8765 - camera_token: str | None = field(default=None, repr=False) - width: int = 640 - height: int = 360 - camera_fps: int = 15 - jpeg_fps: float = 5.0 - device: str = "/dev/video4" - - def __post_init__(self) -> None: - _validate_port(self.port, "camera") - _validate_token_for_bind(self.bind, self.camera_token, "camera API") - if self.width <= 0 or self.height <= 0 or self.width % 2: - raise ValueError("camera dimensions must be positive and width must be even") - if self.camera_fps <= 0 or self.jpeg_fps <= 0: - raise ValueError("camera frame rates must be positive") - if self.backend == "realsense" and (self.depth_scale is None or self.depth_scale <= 0): - raise ValueError("RealSense camera requires an explicit positive --depth-scale") - - -@dataclass(frozen=True) -class StartOptions: - """Complete start request for one or both edge services.""" - - python: str - services: ServiceSelection = "all" - control: ControlStartOptions | None = None - camera: CameraStartOptions | None = None - - def __post_init__(self) -> None: - if not self.python.strip(): - raise ValueError("remote Python path cannot be empty") - if self.services in {"all", "control"} and self.control is None: - raise ValueError("control options are required for the selected services") - if self.services in {"all", "camera"} and self.camera is None: - raise ValueError("camera options are required for the selected services") - - -def selected_services(selection: ServiceSelection) -> list[ServiceName]: - if selection == "all": - return ["control", "camera"] - return [cast(ServiceName, selection)] - - -def _validate_port(port: int, label: str) -> None: - if not 1 <= port <= 65535: - raise ValueError(f"{label} port must be between 1 and 65535") - - -def _validate_token_for_bind(bind: str, token: str | None, label: str) -> None: - try: - loopback = bind.strip().lower() == "localhost" or ipaddress.ip_address(bind).is_loopback - except ValueError: - loopback = False - if not loopback and token is None: - raise ValueError(f"{label} token is required when binding beyond localhost") - if token is not None: - if len(token) < 32: - raise ValueError(f"{label} token must contain at least 32 characters") - if not token.isascii() or token.strip() != token or any(char.isspace() for char in token): - raise ValueError(f"{label} token must be ASCII without whitespace") - - -__all__ = [ - "CameraStartOptions", - "ControlStartOptions", - "ServiceName", - "ServiceSelection", - "StartOptions", -] diff --git a/src/embodirun/bindings/unitree/go2/streamvln/services.py b/src/embodirun/bindings/unitree/go2/streamvln/services.py deleted file mode 100644 index 00c3acf..0000000 --- a/src/embodirun/bindings/unitree/go2/streamvln/services.py +++ /dev/null @@ -1,190 +0,0 @@ -"""Map legacy Go2 service options onto the shared checked process supervisor.""" - -from __future__ import annotations - -import posixpath -from typing import Literal - -from embodirun.deployment.executor import Command -from embodirun.deployment.plan import ServiceSpec -from embodirun.deployment.supervisor import ProcessStatus, ServiceSupervisor - -from .options import ( - CameraStartOptions, - ControlStartOptions, - ServiceName, - ServiceSelection, - StartOptions, - selected_services, -) -from .transport import RemoteTransport - -SERVICE_MODULES: dict[ServiceName, str] = { - "control": "embodirun.robots.unitree.go2.agent.control", - "camera": "embodirun.robots.unitree.go2.agent.camera", -} - - -class Go2ServiceSupervisor: - """Start, inspect, and stop Go2 services through the shared supervisor.""" - - def __init__( - self, - transport: RemoteTransport, - *, - source_root: str, - run_root: str, - log_root: str, - ) -> None: - self.transport = transport - self.source_root = source_root - self.run_root = run_root - self.log_root = log_root - - def start(self, options: StartOptions) -> dict[str, object]: - results: dict[str, object] = {} - supervisor = self._supervisor(options.python) - for service in selected_services(options.services): - if service == "control": - assert options.control is not None - command, environment = self._control_command( - options.python, - options.control, - ) - endpoint = f"http://{options.control.bind}:{options.control.port}" - kind: Literal["control", "sensor"] = "control" - else: - assert options.camera is not None - command, environment = self._camera_command( - options.python, - options.camera, - ) - endpoint = f"http://{options.camera.bind}:{options.camera.port}" - kind = "sensor" - status = supervisor.start( - ServiceSpec( - service_id=service, - kind=kind, - node="go2", - environment_id="go2-agent", - endpoint=endpoint, - health_endpoint=f"{endpoint}/healthz", - command=Command(tuple(command), environment=environment), - ) - ) - results[service] = { - "state": status.state, - "pid": status.pid, - "log": status.log, - } - return {"services": results} - - def status(self, services: ServiceSelection = "all") -> dict[str, object]: - supervisor = self._supervisor("python3") - return { - "services": { - service: _status_payload(supervisor.status(service)) for service in selected_services(services) - } - } - - def stop(self, services: ServiceSelection = "all") -> dict[str, object]: - selected = selected_services(services) - selected.sort(key=lambda name: 0 if name == "control" else 1) - supervisor = self._supervisor("python3") - return {"services": {service: _status_payload(supervisor.stop(service)) for service in selected}} - - def _supervisor(self, python: str) -> ServiceSupervisor: - return ServiceSupervisor( - self.transport, - python=python, - agent_path=posixpath.join( - self.source_root, - "embodirun/services/host/supervisor.py", - ), - run_root=self.run_root, - log_root=self.log_root, - ) - - def _control_command( - self, - python: str, - options: ControlStartOptions, - ) -> tuple[list[str], dict[str, str]]: - command = [ - python, - "-m", - SERVICE_MODULES["control"], - "--mode", - options.mode, - "--interface", - options.interface, - "--state-topic", - options.state_topic, - "--host", - options.bind, - "--port", - str(options.port), - ] - if options.cyclonedds_lib_dir: - command.extend(["--cyclonedds-lib-dir", options.cyclonedds_lib_dir]) - if options.operator_ready: - command.append("--operator-ready") - environment = {"PYTHONPATH": self.source_root} - if options.api_token is not None: - environment["GO2_API_TOKEN"] = options.api_token - return command, environment - - def _camera_command( - self, - python: str, - options: CameraStartOptions, - ) -> tuple[list[str], dict[str, str]]: - command = [ - python, - "-m", - SERVICE_MODULES["camera"], - "--backend", - options.backend, - "--width", - str(options.width), - "--height", - str(options.height), - "--jpeg-fps", - str(options.jpeg_fps), - "--bind", - options.bind, - "--port", - str(options.port), - ] - if options.backend == "realsense": - assert options.depth_scale is not None - command.extend( - [ - "--realsense-fps", - str(options.camera_fps), - "--depth-calibrated", - "--rgb-depth-aligned", - "--depth-scale", - str(options.depth_scale), - ] - ) - if options.realsense_serial: - command.extend(["--realsense-serial", options.realsense_serial]) - else: - command.extend(["--device", options.device]) - environment = {"PYTHONPATH": self.source_root} - if options.camera_token is not None: - environment["GO2_CAMERA_TOKEN"] = options.camera_token - return command, environment - - -def _status_payload(status: ProcessStatus) -> dict[str, object]: - payload = {"state": status.state} - if status.pid is not None: - payload["pid"] = status.pid - if status.log is not None: - payload["log"] = status.log - return payload - - -__all__ = ["SERVICE_MODULES", "Go2ServiceSupervisor"] diff --git a/src/embodirun/bindings/unitree/go2/streamvln/transport.py b/src/embodirun/bindings/unitree/go2/streamvln/transport.py index 1d46af4..ca08b87 100644 --- a/src/embodirun/bindings/unitree/go2/streamvln/transport.py +++ b/src/embodirun/bindings/unitree/go2/streamvln/transport.py @@ -1,267 +1,9 @@ -"""SSH/SFTP transport boundary used by the Go2 deployment commands.""" - -from __future__ import annotations - -import contextlib -import os -import posixpath -import shlex -import stat -import uuid -from collections.abc import Callable -from dataclasses import dataclass, field -from pathlib import Path -from typing import Any, Protocol - -from embodirun.deployment.executor import Command - - -@dataclass(frozen=True) -class SshConnection: - """Connection settings with secrets deliberately excluded from ``repr``.""" - - host: str - username: str - port: int = 22 - password: str | None = field(default=None, repr=False) - identity_file: Path | None = None - connect_timeout_s: float = 10.0 - command_timeout_s: float = 30.0 - accept_new_host_key: bool = False - - def __post_init__(self) -> None: - if not self.host.strip(): - raise ValueError("SSH host cannot be empty") - if not self.username.strip(): - raise ValueError("SSH username cannot be empty") - if not 1 <= self.port <= 65535: - raise ValueError("SSH port must be between 1 and 65535") - if self.connect_timeout_s <= 0 or self.command_timeout_s <= 0: - raise ValueError("SSH timeouts must be positive") - - -@dataclass(frozen=True) -class CommandResult: - """Captured result of one remote command.""" - - exit_code: int - stdout: str = "" - stderr: str = "" - - -class RemoteCommandError(RuntimeError): - """A remote command failed, without retaining its potentially secret command.""" - - def __init__(self, exit_code: int, stderr: str = "") -> None: - detail = stderr.strip() - message = f"remote command failed with exit code {exit_code}" - if detail: - message = f"{message}: {detail}" - super().__init__(message) - self.exit_code = exit_code - - -class RemoteTransport(Protocol): - """Minimal transport surface; tests can provide an in-memory fake.""" - - def run(self, command: Command, *, check: bool = True) -> CommandResult: - """Execute one argv-based command on the remote host.""" - - def resolve_path(self, path: str) -> str: - """Resolve a remote path against the SSH user's home directory.""" - - def make_dirs(self, path: str, *, mode: int = 0o755) -> None: - """Create a remote directory tree.""" - - def put_file(self, local_path: Path, remote_path: str, *, mode: int = 0o644) -> None: - """Atomically upload a local file.""" - - def put_bytes(self, payload: bytes, remote_path: str, *, mode: int = 0o600) -> None: - """Atomically upload in-memory bytes.""" - - def close(self) -> None: - """Release the underlying connection.""" - - -class ParamikoTransport: - """Production SSH transport with Paramiko imported only when connected.""" - - def __init__( - self, - connection: SshConnection, - *, - client_factory: Callable[[], Any] | None = None, - ) -> None: - self.connection = connection - self._client_factory = client_factory - self._client: Any | None = None - self._sftp: Any | None = None - - def _connect(self) -> Any: - if self._client is not None: - return self._client - - if self._client_factory is None: - try: - import paramiko - except ImportError as exc: # pragma: no cover - environment dependent - raise RuntimeError( - "Paramiko is required for remote deployment; run `uv sync --frozen --no-dev --group host`" - ) from exc - client = paramiko.SSHClient() - client.load_system_host_keys() - policy = paramiko.AutoAddPolicy() if self.connection.accept_new_host_key else None - if policy is not None: - client.set_missing_host_key_policy(policy) - else: - client = self._client_factory() - - kwargs: dict[str, Any] = { - "hostname": self.connection.host, - "port": self.connection.port, - "username": self.connection.username, - "timeout": self.connection.connect_timeout_s, - "banner_timeout": self.connection.connect_timeout_s, - "auth_timeout": self.connection.connect_timeout_s, - "allow_agent": True, - "look_for_keys": self.connection.identity_file is None, - } - if self.connection.password is not None: - kwargs["password"] = self.connection.password - if self.connection.identity_file is not None: - kwargs["key_filename"] = os.fspath(self.connection.identity_file) - - try: - client.connect(**kwargs) - except Exception as exc: # noqa: BLE001 - sanitize third-party transport failures - # Paramiko does not normally echo credentials, but sanitize anyway in - # case a custom client or future dependency does. - message = _redact(str(exc), self.connection.password) - raise RuntimeError(f"SSH connection failed: {message}") from None - self._client = client - return client - - def _open_sftp(self) -> Any: - if self._sftp is None: - self._sftp = self._connect().open_sftp() - return self._sftp - - def run(self, command: Command, *, check: bool = True) -> CommandResult: - client = self._connect() - invocation = shlex.join(command.argv) - if command.environment: - assignments = " ".join( - f"{name}={shlex.quote(value)}" for name, value in sorted(command.environment.items()) - ) - invocation = f"env {assignments} {invocation}" - if command.cwd is not None: - invocation = f"cd {shlex.quote(command.cwd)} && {invocation}" - try: - stdin, stdout, stderr = client.exec_command( - invocation, - timeout=command.timeout_s or self.connection.command_timeout_s, - ) - if command.stdin is not None: - stdin.write(command.stdin) - stdin.flush() - stdin.channel.shutdown_write() - output = stdout.read().decode("utf-8", errors="replace") - error = stderr.read().decode("utf-8", errors="replace") - exit_code = int(stdout.channel.recv_exit_status()) - except Exception as exc: # noqa: BLE001 - normalize third-party channel failures - message = _redact(str(exc), self.connection.password) - raise RuntimeError(f"remote command transport failed: {message}") from None - - output = _redact(output, self.connection.password) - error = _redact(error, self.connection.password) - result = CommandResult(exit_code=exit_code, stdout=output, stderr=error) - if check and exit_code != 0: - raise RemoteCommandError(exit_code, error) - return result - - def resolve_path(self, path: str) -> str: - if not path or "\x00" in path: - raise ValueError("remote path cannot be empty or contain NUL") - sftp = self._open_sftp() - home = sftp.normalize(".") - if path == "~": - return home - if path.startswith("~/"): - path = posixpath.join(home, path[2:]) - elif not path.startswith("/"): - path = posixpath.join(home, path) - return posixpath.normpath(path) - - def make_dirs(self, path: str, *, mode: int = 0o755) -> None: - sftp = self._open_sftp() - normalized = posixpath.normpath(path) - if not normalized.startswith("/"): - raise ValueError("make_dirs requires an absolute remote path") - current = "/" - for component in normalized.strip("/").split("/"): - if not component: - continue - current = posixpath.join(current, component) - try: - attributes = sftp.stat(current) - if not stat.S_ISDIR(attributes.st_mode): - raise RuntimeError(f"remote path exists but is not a directory: {current}") - except OSError: - sftp.mkdir(current, mode=mode) - - def put_file(self, local_path: Path, remote_path: str, *, mode: int = 0o644) -> None: - self.make_dirs(posixpath.dirname(remote_path)) - temporary = _temporary_remote_path(remote_path) - sftp = self._open_sftp() - try: - sftp.put(os.fspath(local_path), temporary) - sftp.chmod(temporary, mode) - self._replace(sftp, temporary, remote_path) - except Exception: - _best_effort_remove(sftp, temporary) - raise - - def put_bytes(self, payload: bytes, remote_path: str, *, mode: int = 0o600) -> None: - self.make_dirs(posixpath.dirname(remote_path)) - temporary = _temporary_remote_path(remote_path) - sftp = self._open_sftp() - try: - with sftp.file(temporary, "wb") as remote_file: - remote_file.write(payload) - remote_file.flush() - sftp.chmod(temporary, mode) - self._replace(sftp, temporary, remote_path) - except Exception: - _best_effort_remove(sftp, temporary) - raise - - @staticmethod - def _replace(sftp: Any, source: str, destination: str) -> None: - try: - sftp.posix_rename(source, destination) - except (AttributeError, OSError): - _best_effort_remove(sftp, destination) - sftp.rename(source, destination) - - def close(self) -> None: - if self._sftp is not None: - self._sftp.close() - self._sftp = None - if self._client is not None: - self._client.close() - self._client = None - - -def _temporary_remote_path(path: str) -> str: - return f"{path}.tmp-{uuid.uuid4().hex}" - - -def _best_effort_remove(sftp: Any, path: str) -> None: - with contextlib.suppress(OSError): - sftp.remove(path) - - -def _redact(text: str, secret: str | None) -> str: - if secret: - return text.replace(secret, "") - return text +"""Compatibility imports; deployment now lives in embodirun.deployment.go2.""" + +from embodirun.deployment.go2.transport import ( # noqa: F401 + CommandResult, + ParamikoTransport, + RemoteCommandError, + RemoteTransport, + SshConnection, +) diff --git a/src/embodirun/deployment/go2/__init__.py b/src/embodirun/deployment/go2/__init__.py new file mode 100644 index 0000000..0937503 --- /dev/null +++ b/src/embodirun/deployment/go2/__init__.py @@ -0,0 +1 @@ +"""Model-independent deployment of the optional Go2 hardware owner.""" diff --git a/src/embodirun/deployment/go2/cli.py b/src/embodirun/deployment/go2/cli.py new file mode 100644 index 0000000..7e5d976 --- /dev/null +++ b/src/embodirun/deployment/go2/cli.py @@ -0,0 +1,163 @@ +"""Command-line interface for deploying the Go2 edge agent over SSH.""" + +from __future__ import annotations + +import argparse +import getpass +import json +import os +import sys +from collections.abc import Callable, Mapping, Sequence +from pathlib import Path + +from .deployer import Go2OwnerDeployer +from .transport import ParamikoTransport, RemoteTransport, SshConnection + +TransportFactory = Callable[[SshConnection], RemoteTransport] + + +def build_parser() -> argparse.ArgumentParser: + parser = argparse.ArgumentParser( + prog="embodirun go2 edge", description="Install and manage the unified Go2 hardware owner." + ) + parser.add_argument("--host", required=True, help="SSH hostname or IP address") + parser.add_argument("--ssh-port", type=int, default=22) + parser.add_argument("--username", required=True, help="SSH username") + parser.add_argument( + "--remote-root", + default=".local/share/embodirun-go2-owner", + help="remote installation root, absolute or relative to the SSH user's home", + ) + parser.add_argument("--connect-timeout", type=float, default=10.0) + parser.add_argument("--command-timeout", type=float, default=30.0) + parser.add_argument( + "--accept-new-host-key", + action="store_true", + help="trust and persist a previously unseen SSH host key", + ) + parser.add_argument("--identity-file", type=Path, help="SSH private-key path") + auth = parser.add_mutually_exclusive_group() + auth.add_argument( + "--password", + help="SSH password (prefer --password-env or --ask-password to avoid shell history)", + ) + auth.add_argument("--password-env", metavar="NAME", help="environment variable with password") + auth.add_argument("--ask-password", action="store_true", help="prompt without echo") + + commands = parser.add_subparsers(dest="command", required=True) + probe = commands.add_parser("probe", help="verify SSH and the remote Python runtime") + probe.add_argument("--python", default="python3", help="remote Python executable") + + install = commands.add_parser("install", help="upload the optional Go2 owner source") + install.add_argument( + "--package-root", + type=Path, + help="override the local embodirun_go2_owner package root (primarily for packaging tests)", + ) + + start = commands.add_parser("start", help="start the single Go2 hardware owner") + start.add_argument("--config", type=Path, required=True, help="local owner JSON configuration") + start.add_argument("--python", default="python3", help="owner Python (3.8+; vendor SDK environment)") + start.add_argument("--sdk-pythonpath", help="remote SDK source directory, if not installed") + start.add_argument("--operator-ready", action="store_true", help="explicitly arm motion at process startup") + start.add_argument("--supervisor-python", default="python3.10", help="supervisor Python (3.10+)") + for name in ("status", "stop"): + command = commands.add_parser(name) + command.add_argument("--supervisor-python", default="python3.10") + + return parser + + +def main( + argv: Sequence[str] | None = None, + *, + environ: Mapping[str, str] | None = None, + password_prompt: Callable[[str], str] = getpass.getpass, + transport_factory: TransportFactory = ParamikoTransport, +) -> int: + parser = build_parser() + args = parser.parse_args(argv) + environment = os.environ if environ is None else environ + + password = _resolve_password(args, environment, password_prompt) + secrets = [password] + + transport: RemoteTransport | None = None + try: + connection = SshConnection( + host=args.host, + port=args.ssh_port, + username=args.username, + password=password, + identity_file=args.identity_file, + connect_timeout_s=args.connect_timeout, + command_timeout_s=args.command_timeout, + accept_new_host_key=args.accept_new_host_key, + ) + transport = transport_factory(connection) + deployer = Go2OwnerDeployer(transport, args.remote_root) + result: dict[str, object] + if args.command == "probe": + result = {"ok": True, "remote": deployer.probe(args.python)} + elif args.command == "install": + result = {"ok": True, "install": deployer.install(args.package_root)} + elif args.command == "start": + settings = json.loads(args.config.read_text()) + if not isinstance(settings, dict) or not isinstance(settings.get("server", {}), dict): + raise ValueError("owner configuration and server must be objects") + token_name = settings.get("server", {}).get("token_env", "GO2_API_TOKEN") + if not isinstance(token_name, str): + raise ValueError("server.token_env must name an environment variable") + token = environment.get(token_name) + secrets.append(token) + result = { + "ok": True, + **deployer.start( + args.config, + python=args.python, + supervisor_python=args.supervisor_python, + sdk_pythonpath=args.sdk_pythonpath, + operator_ready=args.operator_ready, + token=token, + ), + } + elif args.command == "status": + result = {"ok": True, **deployer.status(args.supervisor_python)} + elif args.command == "stop": + result = {"ok": True, **deployer.stop(args.supervisor_python)} + else: # pragma: no cover - protected by argparse + raise RuntimeError(f"unsupported command: {args.command}") + except (OSError, RuntimeError, TypeError, ValueError) as exc: + message = _redact_many(str(exc), secrets) + print(json.dumps({"ok": False, "error": message}, ensure_ascii=False), file=sys.stderr) + return 1 + finally: + if transport is not None: + transport.close() + + print(json.dumps(result, ensure_ascii=False, sort_keys=True)) + return 0 + + +def _resolve_password( + args: argparse.Namespace, + environment: Mapping[str, str], + password_prompt: Callable[[str], str], +) -> str | None: + if args.password is not None: + return args.password + if args.ask_password: + return password_prompt(f"SSH password for {args.username}@{args.host}: ") + variable = args.password_env or "GO2_SSH_PASSWORD" + return environment.get(variable) + + +def _redact_many(text: str, secrets: Sequence[str | None]) -> str: + for secret in secrets: + if secret: + text = text.replace(secret, "") + return text + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/src/embodirun/deployment/go2/deployer.py b/src/embodirun/deployment/go2/deployer.py new file mode 100644 index 0000000..ef3c579 --- /dev/null +++ b/src/embodirun/deployment/go2/deployer.py @@ -0,0 +1,150 @@ +"""Deploy one optional Go2 owner, independently of any navigation policy.""" + +from __future__ import annotations + +import hashlib +import importlib.util +import json +import posixpath +from dataclasses import asdict +from pathlib import Path + +from embodirun.deployment import supervisor as supervisor_module +from embodirun.deployment.executor import Command +from embodirun.deployment.plan import ServiceSpec +from embodirun.deployment.supervisor import ServiceSupervisor + +from .transport import RemoteTransport + +OWNER_MODULE = "embodirun_go2_owner" + + +class Go2OwnerDeployer: + """Upload hardware code only and supervise one process with one lifecycle.""" + + def __init__(self, transport: RemoteTransport, remote_root: str) -> None: + self.transport = transport + self.remote_root = transport.resolve_path(remote_root) + if self.remote_root == "/": + raise ValueError("remote root cannot be the filesystem root") + self.source_root = posixpath.join(self.remote_root, "src") + self.run_root = posixpath.join(self.remote_root, "run") + self.log_root = posixpath.join(self.remote_root, "logs") + self.supervisor_path = posixpath.join(self.remote_root, "supervisor.py") + + def probe(self, python: str = "python3") -> dict[str, object]: + version = self.transport.run(Command((python, "--version"))) + output = (version.stdout or version.stderr).strip() + if not output.startswith("Python "): + raise RuntimeError("remote Python probe returned an invalid version") + return { + "python": python, + "python_version": output[7:], + "platform": self.transport.run(Command(("uname", "-s"))).stdout.strip(), + "machine": self.transport.run(Command(("uname", "-m"))).stdout.strip(), + } + + def install(self, package_root: Path | None = None) -> dict[str, object]: + root = (package_root or _default_package_root()).resolve() + if root.name != OWNER_MODULE or not (root / "__main__.py").is_file(): + raise ValueError("package root must be the embodirun_go2_owner source directory") + self.transport.make_dirs(self.run_root, mode=0o700) + self.transport.make_dirs(self.log_root, mode=0o700) + digest = hashlib.sha256() + files = [ + path for path in sorted(root.rglob("*.py")) if not path.is_symlink() and "__pycache__" not in path.parts + ] + for path in files: + relative = path.relative_to(root).as_posix() + digest.update(relative.encode() + b"\0" + path.read_bytes()) + self.transport.put_file(path, posixpath.join(self.source_root, OWNER_MODULE, relative)) + # The shared supervisor is standalone stdlib code; no Host package is uploaded. + self.transport.put_file(Path(supervisor_module.__file__), self.supervisor_path) + manifest = { + "format": 2, + "package": OWNER_MODULE, + "file_count": len(files), + "sha256": digest.hexdigest(), + "source_root": self.source_root, + } + self.transport.put_bytes( + json.dumps(manifest, indent=2).encode(), posixpath.join(self.remote_root, "deployment-manifest.json") + ) + return manifest + + def _supervisor(self, python: str) -> ServiceSupervisor: + return ServiceSupervisor( + self.transport, + python=python, + agent_path=self.supervisor_path, + run_root=self.run_root, + log_root=self.log_root, + ) + + def start( + self, + config: Path, + *, + python: str = "python3", + supervisor_python: str = "python3.10", + operator_ready: bool = False, + sdk_pythonpath: str | None = None, + token: str | None = None, + ) -> dict[str, object]: + value = json.loads(config.read_text()) + if not isinstance(value, dict) or set(value) - {"server", "control", "camera"}: + raise ValueError("expected an owner configuration with server, control and camera") + server = value.get("server", {}) + if not isinstance(server, dict): + raise ValueError("server must be an object") + host, port = server.get("host", "127.0.0.1"), server.get("port", 8080) + token_name = server.get("token_env", "GO2_API_TOKEN") + if ( + not isinstance(token_name, str) + or not token_name + or token_name + in { + "PYTHONPATH", + "PATH", + "LD_LIBRARY_PATH", + "EMBODIRUN_SERVICE_ID", + } + ): + raise ValueError("server.token_env must name a dedicated credential environment variable") + remote_config = posixpath.join(self.remote_root, "owner.json") + environment = {"PYTHONPATH": self.source_root + (":" + sdk_pythonpath if sdk_pythonpath else "")} + if token: + environment[token_name] = token + self.transport.put_bytes(json.dumps(value).encode(), remote_config, mode=0o600) + argv = (python, "-m", OWNER_MODULE, "--config", remote_config) + # Validate on the vendor interpreter without constructing SDK/camera resources. + self.transport.run(Command((*argv, "--validate"), environment=environment)) + endpoint = f"http://{host}:{port}" + service = ServiceSpec( + service_id="go2", + kind="control", + node="go2", + environment_id="go2-owner", + endpoint=endpoint, + health_endpoint=endpoint + "/health", + command=Command((*argv, *(("--operator-ready",) if operator_ready else ())), environment=environment), + ) + status = self._supervisor(supervisor_python).start(service) + return {"services": {"go2": asdict(status)}} + + def status(self, supervisor_python: str = "python3.10") -> dict[str, object]: + return {"services": {"go2": asdict(self._supervisor(supervisor_python).status("go2"))}} + + def stop(self, supervisor_python: str = "python3.10") -> dict[str, object]: + return {"services": {"go2": asdict(self._supervisor(supervisor_python).stop("go2"))}} + + +def _default_package_root() -> Path: + for parent in Path(__file__).resolve().parents: + candidate = parent / "integrations/go2_owner/src" / OWNER_MODULE + if (candidate / "__main__.py").is_file(): + return candidate + spec = importlib.util.find_spec(OWNER_MODULE) + if spec is not None and spec.origin is not None: + return Path(spec.origin).parent + raise ValueError("install integrations/go2_owner locally or pass --package-root to its source directory") diff --git a/src/embodirun/deployment/go2/transport.py b/src/embodirun/deployment/go2/transport.py new file mode 100644 index 0000000..1d46af4 --- /dev/null +++ b/src/embodirun/deployment/go2/transport.py @@ -0,0 +1,267 @@ +"""SSH/SFTP transport boundary used by the Go2 deployment commands.""" + +from __future__ import annotations + +import contextlib +import os +import posixpath +import shlex +import stat +import uuid +from collections.abc import Callable +from dataclasses import dataclass, field +from pathlib import Path +from typing import Any, Protocol + +from embodirun.deployment.executor import Command + + +@dataclass(frozen=True) +class SshConnection: + """Connection settings with secrets deliberately excluded from ``repr``.""" + + host: str + username: str + port: int = 22 + password: str | None = field(default=None, repr=False) + identity_file: Path | None = None + connect_timeout_s: float = 10.0 + command_timeout_s: float = 30.0 + accept_new_host_key: bool = False + + def __post_init__(self) -> None: + if not self.host.strip(): + raise ValueError("SSH host cannot be empty") + if not self.username.strip(): + raise ValueError("SSH username cannot be empty") + if not 1 <= self.port <= 65535: + raise ValueError("SSH port must be between 1 and 65535") + if self.connect_timeout_s <= 0 or self.command_timeout_s <= 0: + raise ValueError("SSH timeouts must be positive") + + +@dataclass(frozen=True) +class CommandResult: + """Captured result of one remote command.""" + + exit_code: int + stdout: str = "" + stderr: str = "" + + +class RemoteCommandError(RuntimeError): + """A remote command failed, without retaining its potentially secret command.""" + + def __init__(self, exit_code: int, stderr: str = "") -> None: + detail = stderr.strip() + message = f"remote command failed with exit code {exit_code}" + if detail: + message = f"{message}: {detail}" + super().__init__(message) + self.exit_code = exit_code + + +class RemoteTransport(Protocol): + """Minimal transport surface; tests can provide an in-memory fake.""" + + def run(self, command: Command, *, check: bool = True) -> CommandResult: + """Execute one argv-based command on the remote host.""" + + def resolve_path(self, path: str) -> str: + """Resolve a remote path against the SSH user's home directory.""" + + def make_dirs(self, path: str, *, mode: int = 0o755) -> None: + """Create a remote directory tree.""" + + def put_file(self, local_path: Path, remote_path: str, *, mode: int = 0o644) -> None: + """Atomically upload a local file.""" + + def put_bytes(self, payload: bytes, remote_path: str, *, mode: int = 0o600) -> None: + """Atomically upload in-memory bytes.""" + + def close(self) -> None: + """Release the underlying connection.""" + + +class ParamikoTransport: + """Production SSH transport with Paramiko imported only when connected.""" + + def __init__( + self, + connection: SshConnection, + *, + client_factory: Callable[[], Any] | None = None, + ) -> None: + self.connection = connection + self._client_factory = client_factory + self._client: Any | None = None + self._sftp: Any | None = None + + def _connect(self) -> Any: + if self._client is not None: + return self._client + + if self._client_factory is None: + try: + import paramiko + except ImportError as exc: # pragma: no cover - environment dependent + raise RuntimeError( + "Paramiko is required for remote deployment; run `uv sync --frozen --no-dev --group host`" + ) from exc + client = paramiko.SSHClient() + client.load_system_host_keys() + policy = paramiko.AutoAddPolicy() if self.connection.accept_new_host_key else None + if policy is not None: + client.set_missing_host_key_policy(policy) + else: + client = self._client_factory() + + kwargs: dict[str, Any] = { + "hostname": self.connection.host, + "port": self.connection.port, + "username": self.connection.username, + "timeout": self.connection.connect_timeout_s, + "banner_timeout": self.connection.connect_timeout_s, + "auth_timeout": self.connection.connect_timeout_s, + "allow_agent": True, + "look_for_keys": self.connection.identity_file is None, + } + if self.connection.password is not None: + kwargs["password"] = self.connection.password + if self.connection.identity_file is not None: + kwargs["key_filename"] = os.fspath(self.connection.identity_file) + + try: + client.connect(**kwargs) + except Exception as exc: # noqa: BLE001 - sanitize third-party transport failures + # Paramiko does not normally echo credentials, but sanitize anyway in + # case a custom client or future dependency does. + message = _redact(str(exc), self.connection.password) + raise RuntimeError(f"SSH connection failed: {message}") from None + self._client = client + return client + + def _open_sftp(self) -> Any: + if self._sftp is None: + self._sftp = self._connect().open_sftp() + return self._sftp + + def run(self, command: Command, *, check: bool = True) -> CommandResult: + client = self._connect() + invocation = shlex.join(command.argv) + if command.environment: + assignments = " ".join( + f"{name}={shlex.quote(value)}" for name, value in sorted(command.environment.items()) + ) + invocation = f"env {assignments} {invocation}" + if command.cwd is not None: + invocation = f"cd {shlex.quote(command.cwd)} && {invocation}" + try: + stdin, stdout, stderr = client.exec_command( + invocation, + timeout=command.timeout_s or self.connection.command_timeout_s, + ) + if command.stdin is not None: + stdin.write(command.stdin) + stdin.flush() + stdin.channel.shutdown_write() + output = stdout.read().decode("utf-8", errors="replace") + error = stderr.read().decode("utf-8", errors="replace") + exit_code = int(stdout.channel.recv_exit_status()) + except Exception as exc: # noqa: BLE001 - normalize third-party channel failures + message = _redact(str(exc), self.connection.password) + raise RuntimeError(f"remote command transport failed: {message}") from None + + output = _redact(output, self.connection.password) + error = _redact(error, self.connection.password) + result = CommandResult(exit_code=exit_code, stdout=output, stderr=error) + if check and exit_code != 0: + raise RemoteCommandError(exit_code, error) + return result + + def resolve_path(self, path: str) -> str: + if not path or "\x00" in path: + raise ValueError("remote path cannot be empty or contain NUL") + sftp = self._open_sftp() + home = sftp.normalize(".") + if path == "~": + return home + if path.startswith("~/"): + path = posixpath.join(home, path[2:]) + elif not path.startswith("/"): + path = posixpath.join(home, path) + return posixpath.normpath(path) + + def make_dirs(self, path: str, *, mode: int = 0o755) -> None: + sftp = self._open_sftp() + normalized = posixpath.normpath(path) + if not normalized.startswith("/"): + raise ValueError("make_dirs requires an absolute remote path") + current = "/" + for component in normalized.strip("/").split("/"): + if not component: + continue + current = posixpath.join(current, component) + try: + attributes = sftp.stat(current) + if not stat.S_ISDIR(attributes.st_mode): + raise RuntimeError(f"remote path exists but is not a directory: {current}") + except OSError: + sftp.mkdir(current, mode=mode) + + def put_file(self, local_path: Path, remote_path: str, *, mode: int = 0o644) -> None: + self.make_dirs(posixpath.dirname(remote_path)) + temporary = _temporary_remote_path(remote_path) + sftp = self._open_sftp() + try: + sftp.put(os.fspath(local_path), temporary) + sftp.chmod(temporary, mode) + self._replace(sftp, temporary, remote_path) + except Exception: + _best_effort_remove(sftp, temporary) + raise + + def put_bytes(self, payload: bytes, remote_path: str, *, mode: int = 0o600) -> None: + self.make_dirs(posixpath.dirname(remote_path)) + temporary = _temporary_remote_path(remote_path) + sftp = self._open_sftp() + try: + with sftp.file(temporary, "wb") as remote_file: + remote_file.write(payload) + remote_file.flush() + sftp.chmod(temporary, mode) + self._replace(sftp, temporary, remote_path) + except Exception: + _best_effort_remove(sftp, temporary) + raise + + @staticmethod + def _replace(sftp: Any, source: str, destination: str) -> None: + try: + sftp.posix_rename(source, destination) + except (AttributeError, OSError): + _best_effort_remove(sftp, destination) + sftp.rename(source, destination) + + def close(self) -> None: + if self._sftp is not None: + self._sftp.close() + self._sftp = None + if self._client is not None: + self._client.close() + self._client = None + + +def _temporary_remote_path(path: str) -> str: + return f"{path}.tmp-{uuid.uuid4().hex}" + + +def _best_effort_remove(sftp: Any, path: str) -> None: + with contextlib.suppress(OSError): + sftp.remove(path) + + +def _redact(text: str, secret: str | None) -> str: + if secret: + return text.replace(secret, "") + return text diff --git a/src/embodirun/model_services/backends/embodiinfer/compat.py b/src/embodirun/model_services/backends/embodiinfer/compat.py new file mode 100644 index 0000000..558fa3e --- /dev/null +++ b/src/embodirun/model_services/backends/embodiinfer/compat.py @@ -0,0 +1,67 @@ +"""Use the current HTTP client with the schemas advertised by frozen policy servers.""" + +from __future__ import annotations + +import json +from collections.abc import Mapping + +from ...protocols.http import HttpResponse, HttpTransport, UrllibHttpTransport +from .http import EmbodiInferHttpClient + + +def _legacy_metadata(raw: bytes, kind: str) -> bytes: + metadata = json.loads(raw) + if metadata.get("schema") != f"embodiinfer.policy.{kind}.v1": + raise ValueError("unexpected outgoing policy schema") + metadata["schema"] = f"vvla.policy.{kind}.v1" + return json.dumps(metadata, allow_nan=False, separators=(",", ":")).encode("utf-8") + + +class _SchemaTransport: + def __init__(self, transport: HttpTransport) -> None: + self.transport = transport + self.legacy = False + + def request( + self, + method: str, + url: str, + *, + headers: Mapping[str, str], + body: bytes | None, + timeout_s: float, + maximum_bytes: int, + ) -> HttpResponse: + if self.legacy and method == "POST" and body is not None: + if url.endswith("/v1/sessions"): + body = _legacy_metadata(body, "session") + elif url.endswith("/steps"): + # The client puts JSON metadata first. Preserve all following + # multipart bytes, including images and their headers, exactly. + header, separator, remainder = body.partition(b"\r\n\r\n") + metadata, boundary, images = remainder.partition(b"\r\n--") + if not separator or not boundary or b'name="metadata"' not in header: + raise ValueError("unexpected outgoing policy multipart layout") + body = header + separator + _legacy_metadata(metadata, "step") + boundary + images + return self.transport.request( + method, url, headers=headers, body=body, timeout_s=timeout_s, maximum_bytes=maximum_bytes + ) + + +def connect_client( + endpoint: str, token: str | None, *, timeout_s: float = 5.0, transport: HttpTransport | None = None +) -> EmbodiInferHttpClient: + """Check health and select the advertised v1 schema before opening any session. + + Frozen pre-rename inference revisions advertise ``vvla.policy.capabilities.v1``. + Only their outgoing schema fields are translated; observations, image bytes, + response validation and the current runtime's HTTP client stay unchanged. + """ + wire = _SchemaTransport(transport if transport is not None else UrllibHttpTransport()) + client = EmbodiInferHttpClient(endpoint, token=token, timeout_s=timeout_s, transport=wire) + client.health() + schema = client.capabilities().get("schema") + if schema not in ("embodiinfer.policy.capabilities.v1", "vvla.policy.capabilities.v1"): + raise ValueError(f"unsupported policy service capabilities schema: {schema!r}") + wire.legacy = schema == "vvla.policy.capabilities.v1" + return client diff --git a/src/embodirun/robots/README.md b/src/embodirun/robots/README.md index fb05051..b59fd41 100644 --- a/src/embodirun/robots/README.md +++ b/src/embodirun/robots/README.md @@ -1,9 +1,13 @@ # Physical robot boundary -This domain owns vendor SDK bindings, sensor and control clients, and the -small services deployed on a robot. It implements task-facing interfaces such -as `robots.unitree.go2.navigation.MobileBase` and `ObservationSource`. +This domain owns robot adapters and sensor/control clients. SDK processes and +optional hardware dependencies live in independently installed `integrations` +packages. Go2 hardware is owned by `integrations/go2_owner`, outside the Host. -It does not load models or translate model-native outputs. Model semantics -belong to `models`; translating those outputs into task plans belongs to -`policies`; closed-loop execution belongs to `tasks`. +`robots/mobile_base` defines shared motion, observation and navigation contracts +used by Go2, simulators and `application/navigation`. Go2-specific HTTP clients +and adaptation remain in `robots/unitree/go2`. + +Model communication belongs to `model_services`; policy-to-robot translation +belongs to `bindings`; navigation execution loops belong to `application/navigation`. +Hardware deployment belongs to `deployment/go2`, independent of model choice. diff --git a/src/embodirun/robots/mobile_base/__init__.py b/src/embodirun/robots/mobile_base/__init__.py new file mode 100644 index 0000000..3efd22f --- /dev/null +++ b/src/embodirun/robots/mobile_base/__init__.py @@ -0,0 +1,24 @@ +"""Shared mobile-base state, action and observation contracts.""" + +from .discrete import NavigationCommand, NavigationCommandKind +from .frames import EncodedDepthFrame, EncodedRGBFrame +from .interfaces import MobileBase, MobileBaseError, NavigationPolicy, ObservationSource +from .motion import MobileBaseState, PlanarVelocityCommand, PlanarVelocityLimits +from .observation import NavigationObservation +from .request import NavigationRequest + +__all__ = [ + "NavigationCommand", + "NavigationCommandKind", + "EncodedDepthFrame", + "EncodedRGBFrame", + "MobileBase", + "MobileBaseError", + "NavigationPolicy", + "ObservationSource", + "MobileBaseState", + "PlanarVelocityCommand", + "PlanarVelocityLimits", + "NavigationObservation", + "NavigationRequest", +] diff --git a/src/embodirun/robots/unitree/go2/navigation/_validation.py b/src/embodirun/robots/mobile_base/_validation.py similarity index 100% rename from src/embodirun/robots/unitree/go2/navigation/_validation.py rename to src/embodirun/robots/mobile_base/_validation.py diff --git a/src/embodirun/robots/mobile_base/discrete.py b/src/embodirun/robots/mobile_base/discrete.py new file mode 100644 index 0000000..a862cae --- /dev/null +++ b/src/embodirun/robots/mobile_base/discrete.py @@ -0,0 +1,108 @@ +"""Metric discrete-navigation commands for the Go2 embodiment.""" + +from __future__ import annotations + +import math +from collections.abc import Mapping +from dataclasses import dataclass +from enum import Enum + +from ..adapter import RobotAction + + +class NavigationCommandKind(str, Enum): + STOP = "stop" + MOVE_FORWARD = "move_forward" + TURN_LEFT = "turn_left" + TURN_RIGHT = "turn_right" + + +@dataclass(frozen=True, slots=True) +class NavigationCommand: + """One bounded metric navigation command for a Go2 target.""" + + kind: NavigationCommandKind + distance_m: float = 0.0 + angle_deg: float = 0.0 + + def __post_init__(self) -> None: + if not isinstance(self.kind, NavigationCommandKind): + raise TypeError("navigation command kind is invalid") + for name in ("distance_m", "angle_deg"): + value = getattr(self, name) + if isinstance(value, bool) or not isinstance(value, (int, float)): + raise TypeError(f"navigation command {name} must be numeric") + number = float(value) + if not math.isfinite(number) or number < 0: + raise ValueError(f"navigation command {name} must be finite and non-negative") + object.__setattr__(self, name, number) + + if self.kind is NavigationCommandKind.MOVE_FORWARD: + if self.distance_m <= 0 or self.angle_deg != 0: + raise ValueError("move_forward requires distance_m and no angle_deg") + elif self.kind in { + NavigationCommandKind.TURN_LEFT, + NavigationCommandKind.TURN_RIGHT, + }: + if self.angle_deg <= 0 or self.distance_m != 0: + raise ValueError("turn commands require angle_deg and no distance_m") + elif self.distance_m != 0 or self.angle_deg != 0: + raise ValueError("stop must not include a distance or angle") + + def to_action_values(self) -> dict[str, object]: + values: dict[str, object] = {"command": self.kind.value} + if self.kind is NavigationCommandKind.MOVE_FORWARD: + values["distance_m"] = self.distance_m + elif self.kind in { + NavigationCommandKind.TURN_LEFT, + NavigationCommandKind.TURN_RIGHT, + }: + values["angle_deg"] = self.angle_deg + return values + + @classmethod + def from_robot_action(cls, action: RobotAction) -> NavigationCommand: + if not isinstance(action, RobotAction): + raise TypeError("navigation action must be a RobotAction") + values = action.values + if not isinstance(values, Mapping): + raise TypeError("navigation action values must be an object") + values = dict(values) + command = values.get("command") + try: + kind = NavigationCommandKind(command) + except (TypeError, ValueError): + available = ", ".join(item.value for item in NavigationCommandKind) + raise ValueError(f"navigation action command must be one of: {available}") from None + + allowed = {"command"} + distance_m = 0.0 + angle_deg = 0.0 + if kind is NavigationCommandKind.MOVE_FORWARD: + allowed.add("distance_m") + distance_m = _number(values.get("distance_m"), "distance_m") + elif kind in { + NavigationCommandKind.TURN_LEFT, + NavigationCommandKind.TURN_RIGHT, + }: + allowed.add("angle_deg") + angle_deg = _number(values.get("angle_deg"), "angle_deg") + unknown = sorted(set(values) - allowed) + if unknown: + raise ValueError("unknown navigation action fields: " + ", ".join(unknown)) + return cls(kind=kind, distance_m=distance_m, angle_deg=angle_deg) + + +def _number(value: object, name: str) -> float: + if isinstance(value, bool) or not isinstance(value, (int, float)): + raise TypeError(f"navigation action {name} must be numeric") + result = float(value) + if not math.isfinite(result) or result <= 0: + raise ValueError(f"navigation action {name} must be finite and positive") + return result + + +__all__ = [ + "NavigationCommand", + "NavigationCommandKind", +] diff --git a/src/embodirun/robots/unitree/go2/navigation/frames.py b/src/embodirun/robots/mobile_base/frames.py similarity index 100% rename from src/embodirun/robots/unitree/go2/navigation/frames.py rename to src/embodirun/robots/mobile_base/frames.py diff --git a/src/embodirun/robots/unitree/go2/navigation/interfaces.py b/src/embodirun/robots/mobile_base/interfaces.py similarity index 86% rename from src/embodirun/robots/unitree/go2/navigation/interfaces.py rename to src/embodirun/robots/mobile_base/interfaces.py index be7558d..a0d4e98 100644 --- a/src/embodirun/robots/unitree/go2/navigation/interfaces.py +++ b/src/embodirun/robots/mobile_base/interfaces.py @@ -59,9 +59,17 @@ def update_velocity_lease( def stop(self) -> None: ... +@runtime_checkable +class ReleasableMobileBase(Protocol): + """Optional scoped stop that preserves existing authority after healthy tasks.""" + + def release_velocity_lease(self, lease_id: str) -> None: ... + + __all__ = [ "MobileBase", "MobileBaseError", "NavigationPolicy", "ObservationSource", + "ReleasableMobileBase", ] diff --git a/src/embodirun/robots/unitree/go2/navigation/motion.py b/src/embodirun/robots/mobile_base/motion.py similarity index 100% rename from src/embodirun/robots/unitree/go2/navigation/motion.py rename to src/embodirun/robots/mobile_base/motion.py diff --git a/src/embodirun/robots/unitree/go2/navigation/observation.py b/src/embodirun/robots/mobile_base/observation.py similarity index 100% rename from src/embodirun/robots/unitree/go2/navigation/observation.py rename to src/embodirun/robots/mobile_base/observation.py diff --git a/src/embodirun/robots/unitree/go2/navigation/plan.py b/src/embodirun/robots/mobile_base/plan.py similarity index 100% rename from src/embodirun/robots/unitree/go2/navigation/plan.py rename to src/embodirun/robots/mobile_base/plan.py diff --git a/src/embodirun/robots/unitree/go2/navigation/request.py b/src/embodirun/robots/mobile_base/request.py similarity index 100% rename from src/embodirun/robots/unitree/go2/navigation/request.py rename to src/embodirun/robots/mobile_base/request.py diff --git a/src/embodirun/robots/unitree/go2/__init__.py b/src/embodirun/robots/unitree/go2/__init__.py index 453c2cb..39f17b4 100644 --- a/src/embodirun/robots/unitree/go2/__init__.py +++ b/src/embodirun/robots/unitree/go2/__init__.py @@ -1,8 +1,4 @@ -"""Canonical Unitree Go2 hardware bindings and robot-resident agent. - -The host-only bindings stay lazy because ``agent`` is deployed to the Go2's -Python 3.8 environment and must be importable without the host task stack. -""" +"""Host-side Go2 adapters and clients; hardware ownership lives in integrations/go2_owner.""" from __future__ import annotations diff --git a/src/embodirun/robots/unitree/go2/adapter.py b/src/embodirun/robots/unitree/go2/adapter.py index ecb03a9..61da46b 100644 --- a/src/embodirun/robots/unitree/go2/adapter.py +++ b/src/embodirun/robots/unitree/go2/adapter.py @@ -6,10 +6,11 @@ from collections.abc import Mapping from typing import Any +from embodirun.robots.mobile_base.motion import MobileBaseState, PlanarVelocityCommand + from ...adapter import RobotAction, RobotAdapter, RobotObservation from .client import Go2ClientError, Go2ControlClient from .config import Go2Config -from .navigation.motion import MobileBaseState, PlanarVelocityCommand GO2_ACTION_SPACE = "unitree.go2.planar_velocity.v1" diff --git a/src/embodirun/robots/unitree/go2/agent/__init__.py b/src/embodirun/robots/unitree/go2/agent/__init__.py deleted file mode 100644 index 0e59498..0000000 --- a/src/embodirun/robots/unitree/go2/agent/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Robot-resident Go2 camera and control services (Python 3.8 compatible).""" diff --git a/src/embodirun/robots/unitree/go2/agent/camera/__init__.py b/src/embodirun/robots/unitree/go2/agent/camera/__init__.py deleted file mode 100644 index 2f763ba..0000000 --- a/src/embodirun/robots/unitree/go2/agent/camera/__init__.py +++ /dev/null @@ -1,52 +0,0 @@ -"""Dog-side RGB/RGB-D capture service for Unitree Go2 deployments. - -The public package intentionally exposes the dependency-free contracts and -service assembly. OpenCV, NumPy, and pyrealsense2 remain lazy hardware-path -imports, so importing this module is safe on deployment controllers. -""" - -from .arguments import parse_args -from .cli import CameraServiceRuntime, build_runtime, main -from .depth_store import DepthStore -from .encoding import analyze_z16_depth, encode_z16_as_png -from .frame_store import FrameStore -from .pipe_io import read_exact_with_timeout -from .realsense import RealSenseWorker -from .server import CameraHTTPServer -from .settings import CameraServiceConfig, validate_bind_token -from .types import ( - CameraStreamError, - DepthAnalysis, - DepthSnapshot, - FrameSnapshot, - VideoProfile, -) -from .v4l2 import V4L2YUYVSource, V4L2Z16Source -from .v4l2_format import parse_v4l2_format -from .workers import CameraWorker, DepthWorker - -__all__ = [ - "CameraHTTPServer", - "CameraServiceConfig", - "CameraServiceRuntime", - "CameraStreamError", - "CameraWorker", - "DepthAnalysis", - "DepthSnapshot", - "DepthStore", - "DepthWorker", - "FrameSnapshot", - "FrameStore", - "RealSenseWorker", - "V4L2YUYVSource", - "V4L2Z16Source", - "VideoProfile", - "analyze_z16_depth", - "build_runtime", - "encode_z16_as_png", - "main", - "parse_args", - "parse_v4l2_format", - "read_exact_with_timeout", - "validate_bind_token", -] diff --git a/src/embodirun/robots/unitree/go2/agent/camera/__main__.py b/src/embodirun/robots/unitree/go2/agent/camera/__main__.py deleted file mode 100644 index 51878ce..0000000 --- a/src/embodirun/robots/unitree/go2/agent/camera/__main__.py +++ /dev/null @@ -1,5 +0,0 @@ -"""Run the Go2 camera agent with ``python -m ...agent.camera``.""" - -from .cli import main - -raise SystemExit(main()) diff --git a/src/embodirun/robots/unitree/go2/agent/camera/argument_types.py b/src/embodirun/robots/unitree/go2/agent/camera/argument_types.py deleted file mode 100644 index 1086c34..0000000 --- a/src/embodirun/robots/unitree/go2/agent/camera/argument_types.py +++ /dev/null @@ -1,98 +0,0 @@ -"""Argument and environment parsers for the Go2 camera CLI.""" - -from __future__ import annotations - -import argparse -import re -from typing import Mapping, Optional, Tuple # noqa: UP035 - -ENV_PREFIX = "GO2_CAMERA_" -_PROFILE_PATTERN = re.compile(r"^(?P\d+)x(?P\d+)@(?P\d+)$") - - -def positive_int(value: str) -> int: - parsed = int(value) - if parsed <= 0: - raise argparse.ArgumentTypeError("must be positive") - return parsed - - -def positive_float(value: str) -> float: - parsed = float(value) - if parsed <= 0: - raise argparse.ArgumentTypeError("must be positive") - return parsed - - -def port_number(value: str) -> int: - parsed = int(value) - if not 0 <= parsed <= 65535: - raise argparse.ArgumentTypeError("must be between 0 and 65535") - return parsed - - -def camera_profile(value: str) -> Tuple[int, int, int]: # noqa: UP006 - """Parse a compact ``WIDTHxHEIGHT@FPS`` profile.""" - - match = _PROFILE_PATTERN.fullmatch(value.strip().lower()) - if match is None: - raise argparse.ArgumentTypeError("must use WIDTHxHEIGHT@FPS, for example 640x360@15") - width = int(match.group("width")) - height = int(match.group("height")) - fps = int(match.group("fps")) - if width <= 0 or height <= 0 or fps <= 0: - raise argparse.ArgumentTypeError("profile dimensions and FPS must be positive") - return width, height, fps - - -def environment_bool(environment: Mapping[str, str], name: str, default: bool = False) -> bool: - value = environment.get(name) - if value is None: - return default - normalized = value.strip().lower() - if normalized in {"1", "true", "yes", "on"}: - return True - if normalized in {"0", "false", "no", "off"}: - return False - raise ValueError(f"{name} must be one of true/false, yes/no, on/off, or 1/0") - - -def environment_value( - environment: Mapping[str, str], - name: str, - default: Optional[str] = None, # noqa: UP045 -) -> Optional[str]: # noqa: UP045 - return environment.get(f"{ENV_PREFIX}{name}", default) - - -def add_boolean_option( - parser: argparse.ArgumentParser, - name: str, - *, - default: bool, - help_text: Optional[str] = None, # noqa: UP045 -) -> None: - """Add ``--flag``/``--no-flag`` without Python 3.9-only argparse APIs.""" - - destination = name.replace("-", "_") - group = parser.add_mutually_exclusive_group() - group.add_argument(f"--{name}", dest=destination, action="store_true", help=help_text) - group.add_argument( - f"--no-{name}", - dest=destination, - action="store_false", - help=argparse.SUPPRESS, - ) - parser.set_defaults(**{destination: default}) - - -__all__ = [ - "ENV_PREFIX", - "add_boolean_option", - "camera_profile", - "environment_bool", - "environment_value", - "port_number", - "positive_float", - "positive_int", -] diff --git a/src/embodirun/robots/unitree/go2/agent/camera/arguments.py b/src/embodirun/robots/unitree/go2/agent/camera/arguments.py deleted file mode 100644 index be8ac0c..0000000 --- a/src/embodirun/robots/unitree/go2/agent/camera/arguments.py +++ /dev/null @@ -1,222 +0,0 @@ -"""CLI assembly for the Go2 camera service.""" - -from __future__ import annotations - -import argparse -import os -from collections.abc import Mapping, Sequence -from typing import Optional - -from .argument_types import ( - ENV_PREFIX, - add_boolean_option, - camera_profile, - environment_bool, - environment_value, - port_number, - positive_float, - positive_int, -) -from .settings import CameraServiceConfig - - -def build_parser(environment: Mapping[str, str]) -> argparse.ArgumentParser: - parser = argparse.ArgumentParser( - description=( - "Serve fresh Go2 RGB-D frames. The RealSense backend uses one " - "pipeline and aligns depth to color; split V4L2 is diagnostic-only." - ) - ) - parser.add_argument( - "--backend", - choices=("v4l2", "realsense"), - default=environment_value(environment, "BACKEND", "v4l2"), - ) - parser.add_argument( - "--host", - "--bind", - dest="host", - default=environment_value(environment, "HOST", "127.0.0.1"), - help="HTTP bind host (GO2_CAMERA_HOST)", - ) - parser.add_argument( - "--port", - type=port_number, - default=environment_value(environment, "PORT", "8765"), - help="HTTP port (GO2_CAMERA_PORT)", - ) - parser.add_argument( - "--token", - default=environment_value(environment, "TOKEN"), - help="bearer token (prefer GO2_CAMERA_TOKEN to avoid process-list exposure)", - ) - parser.add_argument( - "--serial", - "--realsense-serial", - dest="serial", - default=environment_value(environment, "SERIAL"), - help="optional RealSense serial (GO2_CAMERA_SERIAL)", - ) - parser.add_argument( - "--profile", - type=camera_profile, - default=environment_value(environment, "PROFILE", "640x360@15"), - metavar="WIDTHxHEIGHT@FPS", - help="requested RGB-D profile (GO2_CAMERA_PROFILE)", - ) - parser.add_argument("--width", type=positive_int, default=environment_value(environment, "WIDTH")) - parser.add_argument("--height", type=positive_int, default=environment_value(environment, "HEIGHT")) - parser.add_argument( - "--fps", - "--realsense-fps", - dest="fps", - type=positive_int, - default=environment_value(environment, "FPS"), - help="capture FPS override (GO2_CAMERA_FPS)", - ) - parser.add_argument( - "--depth-scale", - type=positive_float, - default=environment_value(environment, "DEPTH_SCALE"), - help="confirmed meters per Z16 unit (GO2_CAMERA_DEPTH_SCALE)", - ) - try: - depth_calibrated_default = environment_bool(environment, f"{ENV_PREFIX}DEPTH_CALIBRATED") - aligned_default = environment_bool(environment, f"{ENV_PREFIX}RGB_DEPTH_ALIGNED") - access_log_default = environment_bool(environment, f"{ENV_PREFIX}ACCESS_LOG") - except ValueError as error: - parser.error(str(error)) - add_boolean_option(parser, "depth-calibrated", default=depth_calibrated_default) - add_boolean_option( - parser, - "rgb-depth-aligned", - default=aligned_default, - help_text="diagnostic operator claim; RealSense alignment is verified automatically", - ) - add_boolean_option(parser, "access-log", default=access_log_default) - parser.add_argument("--device", default=environment_value(environment, "DEVICE", "/dev/video4")) - parser.add_argument( - "--warmup-frames", - type=int, - default=environment_value(environment, "WARMUP_FRAMES", "10"), - ) - parser.add_argument( - "--jpeg-quality", - type=int, - default=environment_value(environment, "JPEG_QUALITY", "85"), - ) - parser.add_argument( - "--jpeg-fps", - type=positive_float, - default=environment_value(environment, "JPEG_FPS", "5"), - ) - parser.add_argument( - "--retry-delay", - type=positive_float, - default=environment_value(environment, "RETRY_DELAY", "2"), - ) - parser.add_argument( - "--frame-timeout", - type=positive_float, - default=environment_value(environment, "FRAME_TIMEOUT", "2"), - ) - parser.add_argument( - "--format-timeout", - type=positive_float, - default=environment_value(environment, "FORMAT_TIMEOUT", "5"), - ) - parser.add_argument( - "--max-frame-age", - type=positive_float, - default=environment_value(environment, "MAX_FRAME_AGE", "2"), - ) - parser.add_argument( - "--depth-device", - default=environment_value(environment, "DEPTH_DEVICE", "/dev/video0"), - ) - parser.add_argument( - "--depth-width", - type=positive_int, - default=environment_value(environment, "DEPTH_WIDTH"), - ) - parser.add_argument( - "--depth-height", - type=positive_int, - default=environment_value(environment, "DEPTH_HEIGHT"), - ) - parser.add_argument( - "--depth-warmup-frames", - type=int, - default=environment_value(environment, "DEPTH_WARMUP_FRAMES", "10"), - ) - parser.add_argument( - "--depth-fps", - type=positive_float, - default=environment_value(environment, "DEPTH_FPS", "10"), - ) - parser.add_argument( - "--max-depth-age", - type=positive_float, - default=environment_value(environment, "MAX_DEPTH_AGE", "0.5"), - ) - parser.add_argument( - "--max-depth-m", - type=positive_float, - default=environment_value(environment, "MAX_DEPTH_M", "10"), - ) - return parser - - -def parse_args( - argv: Optional[Sequence[str]] = None, # noqa: UP045 - *, - environ: Optional[Mapping[str, str]] = None, # noqa: UP045 -) -> CameraServiceConfig: - """Resolve CLI values over ``GO2_CAMERA_*`` environment defaults.""" - - environment = os.environ if environ is None else environ - parser = build_parser(environment) - namespace = parser.parse_args(argv) - profile_width, profile_height, profile_fps = namespace.profile - width = profile_width if namespace.width is None else namespace.width - height = profile_height if namespace.height is None else namespace.height - fps = profile_fps if namespace.fps is None else namespace.fps - depth_width = width if namespace.depth_width is None else namespace.depth_width - depth_height = height if namespace.depth_height is None else namespace.depth_height - config = CameraServiceConfig( - backend=namespace.backend, - host=namespace.host, - port=namespace.port, - token=namespace.token, - serial=namespace.serial, - width=width, - height=height, - fps=fps, - device=namespace.device, - warmup_frames=namespace.warmup_frames, - jpeg_quality=namespace.jpeg_quality, - jpeg_fps=namespace.jpeg_fps, - retry_delay=namespace.retry_delay, - frame_timeout=namespace.frame_timeout, - format_timeout=namespace.format_timeout, - max_frame_age=namespace.max_frame_age, - depth_device=namespace.depth_device, - depth_width=depth_width, - depth_height=depth_height, - depth_warmup_frames=namespace.depth_warmup_frames, - depth_scale=namespace.depth_scale, - depth_calibrated=namespace.depth_calibrated, - rgb_depth_alignment_claimed=namespace.rgb_depth_aligned, - depth_fps=namespace.depth_fps, - max_depth_age=namespace.max_depth_age, - max_depth_m=namespace.max_depth_m, - access_log=namespace.access_log, - ) - try: - config.validate() - except ValueError as error: - parser.error(str(error)) - return config - - -__all__ = ["build_parser", "parse_args"] diff --git a/src/embodirun/robots/unitree/go2/agent/camera/cli.py b/src/embodirun/robots/unitree/go2/agent/camera/cli.py deleted file mode 100644 index a4dc40a..0000000 --- a/src/embodirun/robots/unitree/go2/agent/camera/cli.py +++ /dev/null @@ -1,205 +0,0 @@ -"""Command-line entrypoint for the dog-side Go2 camera service.""" - -from __future__ import annotations - -import json -import signal -import threading -from dataclasses import dataclass -from typing import Dict, Optional, Protocol, Sequence # noqa: UP035 - -from .arguments import parse_args -from .depth_store import DepthStore -from .frame_store import FrameStore -from .realsense import RealSenseWorker -from .server import CameraHTTPServer -from .settings import CameraServiceConfig -from .v4l2 import V4L2YUYVSource, V4L2Z16Source -from .workers import CameraWorker, DepthWorker - - -class CaptureWorker(Protocol): - def start(self) -> None: ... - - def stop(self) -> None: ... - - def join(self, timeout: Optional[float] = None) -> None: ... # noqa: UP045 - - -@dataclass(frozen=True) -class CameraServiceRuntime: - server: CameraHTTPServer - rgb_worker: CaptureWorker - depth_worker: Optional[CaptureWorker] # noqa: UP045 - device_name: str - - -def build_runtime(config: CameraServiceConfig) -> CameraServiceRuntime: - """Construct stores, capture workers, and the HTTP server without starting them.""" - - config.validate() - frame_store = FrameStore(device=config.initial_device) - depth_store: Optional[DepthStore] = None # noqa: UP045 - depth_worker: Optional[CaptureWorker] = None # noqa: UP045 - - if config.backend == "realsense": - assert config.depth_scale is not None - depth_store = DepthStore( - config.width, - config.height, - device=config.initial_device, - backend="realsense", - ) - rgb_worker: CaptureWorker = RealSenseWorker( - frame_store=frame_store, - depth_store=depth_store, - width=config.width, - height=config.height, - fps=config.fps, - expected_depth_scale=config.depth_scale, - jpeg_quality=config.jpeg_quality, - jpeg_fps=config.jpeg_fps, - frame_timeout=config.frame_timeout, - retry_delay=config.retry_delay, - serial=config.serial, - max_depth_m=config.max_depth_m, - ) - else: - - def rgb_source_factory() -> V4L2YUYVSource: - return V4L2YUYVSource( - device=config.device, - width=config.width, - height=config.height, - warmup_frames=config.warmup_frames, - frame_timeout=config.frame_timeout, - format_timeout=config.format_timeout, - ) - - rgb_worker = CameraWorker( - store=frame_store, - source_factory=rgb_source_factory, - width=config.width, - height=config.height, - jpeg_quality=config.jpeg_quality, - jpeg_fps=config.jpeg_fps, - retry_delay=config.retry_delay, - ) - if config.depth_calibrated: - assert config.depth_scale is not None - depth_store = DepthStore( - config.depth_width, - config.depth_height, - device=config.depth_device, - backend="v4l2", - ) - depth_store.set_registration(False, False, config.depth_scale) - - def depth_source_factory() -> V4L2Z16Source: - return V4L2Z16Source( - device=config.depth_device, - width=config.depth_width, - height=config.depth_height, - warmup_frames=config.depth_warmup_frames, - frame_timeout=config.frame_timeout, - format_timeout=config.format_timeout, - ) - - depth_worker = DepthWorker( - store=depth_store, - source_factory=depth_source_factory, - width=config.depth_width, - height=config.depth_height, - depth_scale=config.depth_scale, - sample_fps=config.depth_fps, - retry_delay=config.retry_delay, - max_depth_m=config.max_depth_m, - ) - - server = CameraHTTPServer( - (config.host, config.port), - store=frame_store, - max_frame_age=config.max_frame_age, - depth_store=depth_store, - max_depth_age=config.max_depth_age, - api_token=config.token, - calibration_confirmed=config.depth_calibrated, - rgb_depth_alignment_claimed=config.rgb_depth_alignment_claimed, - backend=config.backend, - depth_scale_m=config.depth_scale, - depth_device=(config.initial_device if config.backend == "realsense" else config.depth_device), - access_log=config.access_log, - ) - return CameraServiceRuntime( - server=server, - rgb_worker=rgb_worker, - depth_worker=depth_worker, - device_name=config.initial_device, - ) - - -def _startup_payload( - config: CameraServiceConfig, - runtime: CameraServiceRuntime, -) -> Dict[str, object]: # noqa: UP006 - host, port = runtime.server.server_address[:2] - base_url = f"http://{host}:{port}" - return { - "backend": config.backend, - "camera_device": runtime.device_name, - "profile": config.profile, - "authenticated": config.token is not None, - "health_url": f"{base_url}/health", - "frame_url": f"{base_url}/frame.jpg", - "depth_url": f"{base_url}/depth.json", - "depth_png_url": f"{base_url}/depth.png", - "observation_url": f"{base_url}/observation.json", - } - - -def main(argv: Optional[Sequence[str]] = None) -> int: # noqa: UP045 - """Run the service until SIGINT/SIGTERM; hardware is opened by workers.""" - - config = parse_args(argv) - runtime = build_runtime(config) - - def request_exit(_signum: int, _frame: object) -> None: - raise KeyboardInterrupt - - if threading.current_thread() is threading.main_thread(): - signal.signal(signal.SIGTERM, request_exit) - signal.signal(signal.SIGINT, request_exit) - - rgb_started = False - depth_started = False - try: - runtime.rgb_worker.start() - rgb_started = True - if runtime.depth_worker is not None: - runtime.depth_worker.start() - depth_started = True - print( - json.dumps( - _startup_payload(config, runtime), - ensure_ascii=False, - sort_keys=True, - ), - flush=True, - ) - runtime.server.serve_forever(poll_interval=0.25) - except KeyboardInterrupt: - pass - finally: - runtime.server.server_close() - if rgb_started: - runtime.rgb_worker.stop() - if runtime.depth_worker is not None and depth_started: - runtime.depth_worker.stop() - if rgb_started: - runtime.rgb_worker.join(timeout=3.0) - if runtime.depth_worker is not None and depth_started: - runtime.depth_worker.join(timeout=3.0) - return 0 - - -__all__ = ["CameraServiceRuntime", "build_runtime", "main"] diff --git a/src/embodirun/robots/unitree/go2/agent/camera/server.py b/src/embodirun/robots/unitree/go2/agent/camera/server.py deleted file mode 100644 index 6cbe0ae..0000000 --- a/src/embodirun/robots/unitree/go2/agent/camera/server.py +++ /dev/null @@ -1,52 +0,0 @@ -"""HTTP server assembly for the dog-side Go2 camera service.""" - -from __future__ import annotations - -from http.server import ThreadingHTTPServer -from typing import Optional, Tuple # noqa: UP035 - -from . import http_handler -from .depth_store import DepthStore -from .frame_store import FrameStore -from .observation import CameraObservationService -from .settings import validate_bind_token - - -class CameraHTTPServer(ThreadingHTTPServer): - allow_reuse_address = True - daemon_threads = True - - def __init__( - self, - server_address: Tuple[str, int], # noqa: UP006 - store: FrameStore, - max_frame_age: float, - depth_store: Optional[DepthStore] = None, # noqa: UP045 - max_depth_age: float = 0.5, - api_token: Optional[str] = None, # noqa: UP045 - calibration_confirmed: bool = False, - rgb_depth_alignment_claimed: bool = False, - backend: str = "v4l2", - registration_verified: bool = False, - depth_scale_m: Optional[float] = None, # noqa: UP045 - depth_device: Optional[str] = None, # noqa: UP045 - access_log: bool = False, - ) -> None: - validate_bind_token(str(server_address[0]), api_token) - self.frame_store = store - self.max_frame_age = max_frame_age - self.depth_store = depth_store - self.max_depth_age = max_depth_age - self.api_token = api_token - self.calibration_confirmed = calibration_confirmed - self.rgb_depth_alignment_claimed = rgb_depth_alignment_claimed - self.backend = backend - self.registration_verified = registration_verified - self.depth_scale_m = depth_scale_m - self.depth_device = depth_device - self.access_log = access_log - self.observations = CameraObservationService(self) - super().__init__(server_address, http_handler.CameraRequestHandler) - - -__all__ = ["CameraHTTPServer"] diff --git a/src/embodirun/robots/unitree/go2/agent/camera/settings.py b/src/embodirun/robots/unitree/go2/agent/camera/settings.py deleted file mode 100644 index 2f77c06..0000000 --- a/src/embodirun/robots/unitree/go2/agent/camera/settings.py +++ /dev/null @@ -1,102 +0,0 @@ -"""Validated settings for the Go2 camera service.""" - -from __future__ import annotations - -import ipaddress -from dataclasses import dataclass -from typing import Optional - - -def is_loopback_bind(host: str) -> bool: - candidate = host.strip().lower() - if candidate == "localhost": - return True - if candidate.startswith("[") and candidate.endswith("]"): - candidate = candidate[1:-1] - try: - return ipaddress.ip_address(candidate).is_loopback - except ValueError: - return False - - -def validate_bind_token(host: str, token: Optional[str]) -> None: # noqa: UP045 - """Require a strong bearer token when exposing the service off-host.""" - - if token is not None: - try: - token.encode("ascii") - except UnicodeEncodeError as error: - raise ValueError("camera token must contain only ASCII characters") from error - if len(token) < 32: - raise ValueError("camera token must contain at least 32 characters") - if token.strip() != token or any(character.isspace() for character in token): - raise ValueError("camera token must not contain whitespace") - if not is_loopback_bind(host) and token is None: - raise ValueError("camera token is required when binding beyond localhost") - - -@dataclass(frozen=True) -class CameraServiceConfig: - backend: str - host: str - port: int - token: Optional[str] # noqa: UP045 - serial: Optional[str] # noqa: UP045 - width: int - height: int - fps: int - device: str - warmup_frames: int - jpeg_quality: int - jpeg_fps: float - retry_delay: float - frame_timeout: float - format_timeout: float - max_frame_age: float - depth_device: str - depth_width: int - depth_height: int - depth_warmup_frames: int - depth_scale: Optional[float] # noqa: UP045 - depth_calibrated: bool - rgb_depth_alignment_claimed: bool - depth_fps: float - max_depth_age: float - max_depth_m: float - access_log: bool - - @property - def profile(self) -> str: - return f"{self.width}x{self.height}@{self.fps}" - - @property - def initial_device(self) -> str: - if self.backend != "realsense": - return self.device - return "realsense" if not self.serial else f"realsense:{self.serial}" - - def validate(self) -> None: - if self.backend not in {"v4l2", "realsense"}: - raise ValueError("backend must be v4l2 or realsense") - if not self.host.strip(): - raise ValueError("host must not be empty") - validate_bind_token(self.host, self.token) - if self.width % 2: - raise ValueError("width must be even for packed YUYV diagnostics") - if self.warmup_frames < 0 or self.depth_warmup_frames < 0: - raise ValueError("warmup frame counts must be non-negative") - if not 1 <= self.jpeg_quality <= 100: - raise ValueError("jpeg quality must be between 1 and 100") - if self.depth_calibrated and self.depth_scale is None: - raise ValueError("depth calibration requires an explicit depth scale") - if self.depth_scale is not None and not self.depth_calibrated: - raise ValueError("depth scale requires explicit depth calibration") - if self.rgb_depth_alignment_claimed and not self.depth_calibrated: - raise ValueError("RGB-depth alignment claim requires depth calibration") - if self.backend == "realsense" and not self.depth_calibrated: - raise ValueError("realsense backend requires explicit depth calibration") - if self.backend == "realsense" and (self.width != self.depth_width or self.height != self.depth_height): - raise ValueError("realsense backend requires matching RGB/depth dimensions") - - -__all__ = ["CameraServiceConfig", "is_loopback_bind", "validate_bind_token"] diff --git a/src/embodirun/robots/unitree/go2/agent/control/__init__.py b/src/embodirun/robots/unitree/go2/agent/control/__init__.py deleted file mode 100644 index 41da77b..0000000 --- a/src/embodirun/robots/unitree/go2/agent/control/__init__.py +++ /dev/null @@ -1,35 +0,0 @@ -"""Robot-resident, bounded Unitree Go2 control service.""" - -from .cli import build_parser, config_from_args, main -from .config import ControlServerConfig -from .executor import ActionExecutor -from .http import Go2RequestHandler, valid_api_token_for_bind -from .sdk2 import ( - UnitreeTransport, - dds_library_has_unsafe_iceoryx, - ensure_cyclonedds_library_dir, - loaded_dds_library_path, -) -from .server import create_http_server, serve_control_api -from .transport import DryRunTransport, RobotTransport -from .types import ApiError, RobotState - -__all__ = [ - "ActionExecutor", - "ApiError", - "ControlServerConfig", - "DryRunTransport", - "Go2RequestHandler", - "RobotState", - "RobotTransport", - "UnitreeTransport", - "build_parser", - "config_from_args", - "create_http_server", - "dds_library_has_unsafe_iceoryx", - "ensure_cyclonedds_library_dir", - "loaded_dds_library_path", - "main", - "serve_control_api", - "valid_api_token_for_bind", -] diff --git a/src/embodirun/robots/unitree/go2/agent/control/__main__.py b/src/embodirun/robots/unitree/go2/agent/control/__main__.py deleted file mode 100644 index 1f3e1eb..0000000 --- a/src/embodirun/robots/unitree/go2/agent/control/__main__.py +++ /dev/null @@ -1,5 +0,0 @@ -"""Run the robot-resident Go2 control service.""" - -from .cli import main - -raise SystemExit(main()) diff --git a/src/embodirun/robots/unitree/go2/agent/control/cli.py b/src/embodirun/robots/unitree/go2/agent/control/cli.py deleted file mode 100644 index a937274..0000000 --- a/src/embodirun/robots/unitree/go2/agent/control/cli.py +++ /dev/null @@ -1,174 +0,0 @@ -"""Command-line entry point for the robot-resident Go2 control service.""" - -from __future__ import annotations - -import argparse -import os -import sys -from collections.abc import Mapping, Sequence - -from .config import MIN_EXTERNAL_TOKEN_CHARS, ControlServerConfig -from .executor import ActionExecutor -from .http import valid_api_token_for_bind -from .sdk2 import UnitreeTransport, ensure_cyclonedds_library_dir -from .server import serve_control_api -from .transport import DryRunTransport, RobotTransport - - -def _env_bool(environ: Mapping[str, str], name: str, default: bool = False) -> bool: - raw = environ.get(name) - if raw is None: - return default - normalized = raw.strip().lower() - if normalized in {"1", "true", "yes", "on"}: - return True - if normalized in {"0", "false", "no", "off"}: - return False - raise ValueError(f"{name} must be a boolean value") - - -def build_parser(environ: Mapping[str, str] | None = None) -> argparse.ArgumentParser: - """Build a parser whose deployment defaults can all come from env vars.""" - - env = os.environ if environ is None else environ - parser = argparse.ArgumentParser( - description="Bounded HTTP control service for a Unitree Go2", - ) - parser.add_argument( - "--mode", - choices=("dry-run", "live"), - default=env.get("GO2_CONTROL_MODE", "dry-run"), - help="transport mode (env: GO2_CONTROL_MODE)", - ) - parser.add_argument( - "--host", - default=env.get("GO2_CONTROL_HOST", "127.0.0.1"), - help="HTTP bind host/IP (env: GO2_CONTROL_HOST)", - ) - parser.add_argument( - "--port", - type=int, - default=env.get("GO2_CONTROL_PORT", "8080"), - help="HTTP bind port (env: GO2_CONTROL_PORT)", - ) - parser.add_argument( - "--interface", - default=env.get("GO2_DDS_INTERFACE"), - help="DDS network interface; required in live mode (env: GO2_DDS_INTERFACE)", - ) - parser.add_argument( - "--state-topic", - default=env.get("GO2_STATE_TOPIC", "rt/lf/sportmodestate"), - help="SportModeState DDS topic (env: GO2_STATE_TOPIC)", - ) - parser.add_argument( - "--cyclonedds-lib-dir", - default=env.get("GO2_CYCLONEDDS_LIB_DIR"), - help=("directory containing the compatible libddsc.so.0; required in live mode (env: GO2_CYCLONEDDS_LIB_DIR)"), - ) - parser.add_argument( - "--token", - default=env.get("GO2_API_TOKEN"), - help="bearer token; prefer GO2_API_TOKEN to avoid process-list exposure", - ) - operator_ready = parser.add_mutually_exclusive_group() - operator_ready.add_argument( - "--operator-ready", - dest="operator_ready", - action="store_true", - help=( - "attest that the robot is standing and its area is clear; required " - "for live motion (env: GO2_OPERATOR_READY)" - ), - ) - operator_ready.add_argument( - "--no-operator-ready", - dest="operator_ready", - action="store_false", - help="revoke an operator-ready value inherited from the environment", - ) - parser.set_defaults(operator_ready=_env_bool(env, "GO2_OPERATOR_READY")) - parser.add_argument( - "--rpc-timeout", - type=float, - default=env.get("GO2_SDK_RPC_TIMEOUT", "2.0"), - help="SDK2 RPC timeout in seconds (env: GO2_SDK_RPC_TIMEOUT)", - ) - return parser - - -def config_from_args(args: argparse.Namespace) -> ControlServerConfig: - return ControlServerConfig( - mode=args.mode, - host=args.host, - port=args.port, - interface=args.interface, - state_topic=args.state_topic, - cyclonedds_lib_dir=args.cyclonedds_lib_dir, - token=args.token, - operator_ready=args.operator_ready, - rpc_timeout_s=args.rpc_timeout, - ) - - -def main(argv: Sequence[str] | None = None) -> int: - """Start the service; suitable for ``python -m ...control``.""" - - try: - parser = build_parser() - arguments = parser.parse_args(argv) - config = config_from_args(arguments) - except (TypeError, ValueError) as exc: - print(f"invalid Go2 control configuration: {exc}", file=sys.stderr) - return 2 - - if not valid_api_token_for_bind(config.host, config.token): - print( - f"--token/GO2_API_TOKEN must contain at least " - f"{MIN_EXTERNAL_TOKEN_CHARS} non-whitespace characters when binding " - "beyond localhost", - file=sys.stderr, - ) - return 2 - - required_dds_lib_dir = None - if config.mode == "live": - try: - assert config.cyclonedds_lib_dir is not None - required_dds_lib_dir = ensure_cyclonedds_library_dir( - config.cyclonedds_lib_dir, - reexec_args=None if argv is None else list(argv), - ) - except Exception as exc: # noqa: BLE001 - process boundary reports config failure - print(f"invalid CycloneDDS library directory: {exc}", file=sys.stderr) - return 2 - - try: - transport: RobotTransport - if config.mode == "live": - assert config.interface is not None - transport = UnitreeTransport( - config.interface, - config.state_topic, - rpc_timeout_s=config.rpc_timeout_s, - required_dds_lib_dir=required_dds_lib_dir, - ) - else: - transport = DryRunTransport() - except Exception as exc: # noqa: BLE001 - process boundary reports SDK failure - print(f"failed to initialize transport: {exc}", file=sys.stderr) - return 1 - - executor = ActionExecutor( - transport, - operator_motion_ready=config.operator_ready or config.mode == "dry-run", - ) - try: - serve_control_api(config, executor) - except Exception as exc: # noqa: BLE001 - process boundary reports server failure - print(f"Go2 control server failed: {exc}", file=sys.stderr) - return 1 - return 0 - - -__all__ = ["build_parser", "config_from_args", "main"] diff --git a/src/embodirun/robots/unitree/go2/agent/control/server.py b/src/embodirun/robots/unitree/go2/agent/control/server.py deleted file mode 100644 index 5bee9b5..0000000 --- a/src/embodirun/robots/unitree/go2/agent/control/server.py +++ /dev/null @@ -1,75 +0,0 @@ -"""HTTP server lifecycle and signal-safe final StopMove handling.""" - -from __future__ import annotations - -import signal -import threading -from http.server import ThreadingHTTPServer -from types import FrameType - -from .config import ControlServerConfig -from .executor import ActionExecutor -from .http import make_request_handler -from .sdk2 import loaded_dds_library_path - - -def create_http_server( - config: ControlServerConfig, - executor: ActionExecutor, -) -> ThreadingHTTPServer: - handler = make_request_handler(executor, config.token) - return ThreadingHTTPServer((config.host, config.port), handler) - - -def serve_control_api( - config: ControlServerConfig, - executor: ActionExecutor, - *, - install_signal_handlers: bool = True, -) -> None: - """Serve until shutdown and always close the executor/transport.""" - - try: - server = create_http_server(config, executor) - except BaseException: - executor.close() - raise - - stopping = threading.Event() - - def shutdown(signum: int, _frame: FrameType | None) -> None: - if stopping.is_set(): - return - stopping.set() - print(f"received signal {signum}; stopping robot and server", flush=True) - - def stop_and_shutdown() -> None: - try: - executor.stop("signal") - except Exception as exc: # noqa: BLE001 - signal shutdown must continue - print(f"signal StopMove failed: {exc}", flush=True) - finally: - server.shutdown() - - threading.Thread( - target=stop_and_shutdown, - daemon=True, - name="go2-signal-shutdown", - ).start() - - if install_signal_handlers: - signal.signal(signal.SIGINT, shutdown) - signal.signal(signal.SIGTERM, shutdown) - - details = f"Go2 API listening on http://{config.host}:{config.port} mode={config.mode} interface={config.interface}" - if config.mode == "live": - details += f" dds_library={loaded_dds_library_path()}" - print(details, flush=True) - try: - server.serve_forever(poll_interval=0.2) - finally: - server.server_close() - executor.close(send_stop=not stopping.is_set()) - - -__all__ = ["create_http_server", "serve_control_api"] diff --git a/src/embodirun/robots/unitree/go2/camera.py b/src/embodirun/robots/unitree/go2/camera.py index 7e7010e..08f7c74 100644 --- a/src/embodirun/robots/unitree/go2/camera.py +++ b/src/embodirun/robots/unitree/go2/camera.py @@ -3,10 +3,11 @@ from __future__ import annotations import math +import time from collections.abc import Mapping from typing import Any -from embodirun.robots.unitree.go2.navigation import ( +from embodirun.robots.mobile_base import ( EncodedDepthFrame, EncodedRGBFrame, NavigationObservation, @@ -42,54 +43,74 @@ def _sequence(value: object, name: str) -> int: class Go2CameraClient: - def __init__(self, base_url: str, *, token: str | None = None, timeout_s: float = 2.0): + def __init__(self, base_url: str, *, token: str | None = None, timeout_s: float = 2.0, require_depth: bool = True): + self.require_depth = require_depth self.http = JsonHttpClient(base_url, token=token, timeout_s=timeout_s) - def _capture_rgbd( + def _capture( self, *, episode_id: str, reset: bool, robot_state: Mapping[str, object], ) -> NavigationObservation: + started = time.monotonic() try: - payload = self.http.request_json("GET", "/observation.json", maximum_bytes=MAX_CAMERA_RESPONSE_BYTES) + path = "/observation.json" if self.require_depth else "/observation/rgb.json" + payload = self.http.request_json("GET", path, maximum_bytes=MAX_CAMERA_RESPONSE_BYTES) except HttpClientError as error: raise Go2CameraError(str(error)) from error - if payload.get("navigation_ready") is not True: + received = time.monotonic() + timing = {} + if "frame_age_s" in payload: + age = _finite(payload["frame_age_s"], "frame_age_s") + if age < 0: + raise Go2CameraError("frame_age_s must be non-negative") + # The server's monotonic publish age avoids cross-host wall-clock + # synchronization. Half the round trip bounds network uncertainty; + # camera exposure/encoding delay still requires hardware calibration. + timing = { + "captured_at_monotonic_s": (started + received) / 2 - age, + "capture_uncertainty_s": (received - started) / 2, + } + if payload.get("navigation_ready" if self.require_depth else "observation_ready") is not True: raise Go2CameraError("camera is not navigation-ready") sequence = _sequence(payload.get("sequence"), "observation.sequence") captured_at = _finite(payload.get("captured_at_unix"), "captured_at_unix") rgb_value = _object(payload.get("rgb"), "rgb") - depth_value = _object(payload.get("depth"), "depth") if _sequence(rgb_value.get("sequence"), "rgb.sequence") != sequence: raise Go2CameraError("RGB sequence does not match observation") - if _sequence(depth_value.get("sequence"), "depth.sequence") != sequence: - raise Go2CameraError("depth sequence does not match observation") try: rgb_data = decode_data_url(rgb_value.get("data_url"), "image/jpeg", maximum_bytes=12 * 1024 * 1024) - depth_data = decode_data_url(depth_value.get("data_url"), "image/png", maximum_bytes=16 * 1024 * 1024) except DataUrlError as error: raise Go2CameraError(str(error)) from error width = _sequence(rgb_value.get("width"), "rgb.width") height = _sequence(rgb_value.get("height"), "rgb.height") - depth_metadata = { - key: value - for key, value in depth_value.items() - if key not in {"data_url", "sequence", "captured_at_unix", "width", "height", "scale_m"} - } frame = EncodedRGBFrame(sequence, captured_at, rgb_data, width=width, height=height) - depth = EncodedDepthFrame( - sequence=sequence, - captured_at_s=captured_at, - data=depth_data, - width=_sequence(depth_value.get("width", width), "depth.width"), - height=_sequence(depth_value.get("height", height), "depth.height"), - scale_m=_finite(depth_value.get("scale_m"), "depth.scale_m"), - registered_to_rgb=depth_value.get("registered_to_rgb", True) is True, - encoding=depth_value.get("encoding", "uint16"), - metadata=depth_metadata, - ) + depth = None + if self.require_depth: + depth_value = _object(payload.get("depth"), "depth") + if _sequence(depth_value.get("sequence"), "depth.sequence") != sequence: + raise Go2CameraError("depth sequence does not match observation") + try: + data = decode_data_url(depth_value.get("data_url"), "image/png", maximum_bytes=16 * 1024 * 1024) + except DataUrlError as error: + raise Go2CameraError(str(error)) from error + depth = EncodedDepthFrame( + sequence=sequence, + captured_at_s=captured_at, + data=data, + width=_sequence(depth_value.get("width", width), "depth.width"), + height=_sequence(depth_value.get("height", height), "depth.height"), + scale_m=_finite(depth_value.get("scale_m"), "depth.scale_m"), + registered_to_rgb=depth_value.get("registered_to_rgb", True) is True, + encoding=depth_value.get("encoding", "uint16"), + metadata={ + key: value + for key, value in depth_value.items() + if key not in {"data_url", "sequence", "captured_at_unix", "width", "height", "scale_m"} + }, + ) return NavigationObservation( episode_id=episode_id, sequence=sequence, @@ -97,6 +118,7 @@ def _capture_rgbd( rgb_frames=(frame,), depth=depth, robot_state=robot_state, + metadata=timing, ) def capture( @@ -106,7 +128,7 @@ def capture( reset: bool, robot_state: Mapping[str, object] | None = None, ) -> NavigationObservation: - return self._capture_rgbd( + return self._capture( episode_id=episode_id, reset=reset, robot_state={} if robot_state is None else robot_state, diff --git a/src/embodirun/robots/unitree/go2/client.py b/src/embodirun/robots/unitree/go2/client.py index a6dbcbe..ad41b63 100644 --- a/src/embodirun/robots/unitree/go2/client.py +++ b/src/embodirun/robots/unitree/go2/client.py @@ -6,8 +6,8 @@ from collections.abc import Mapping, Sequence from typing import Any -from embodirun.robots.unitree.go2.navigation.interfaces import MobileBaseError -from embodirun.robots.unitree.go2.navigation.motion import MobileBaseState, PlanarVelocityCommand +from embodirun.robots.mobile_base.interfaces import MobileBaseError +from embodirun.robots.mobile_base.motion import MobileBaseState, PlanarVelocityCommand from embodirun.utils import HttpClientError, JsonHttpClient, Pose2D @@ -102,7 +102,7 @@ def state(self, *, require_fresh: bool = True) -> MobileBaseState: payload = self._request("GET", "/v1/state") return self._state_from_payload(payload, require_fresh=require_fresh) - def preflight(self) -> MobileBaseState: + def preflight(self, *, require_renewal: bool = False, require_release: bool = False) -> MobileBaseState: """Require an idle, explicitly armed live control service. This check is read-only. The control API independently rechecks the @@ -111,6 +111,16 @@ def preflight(self) -> MobileBaseState: """ payload = self._request("GET", "/v1/state") + if ( + require_renewal + and _object(payload.get("capabilities", {}), "capabilities").get("stream_lease_renewal") is not True + ): + raise Go2ClientError("async navigation requires stream_lease_renewal; update the control agent") + if ( + require_release + and _object(payload.get("capabilities", {}), "capabilities").get("stream_lease_release") is not True + ): + raise Go2ClientError("interactive navigation requires stream_lease_release; update the Go2 owner") state = self._state_from_payload(payload, require_fresh=True) if payload.get("closing") is True: raise Go2ClientError("control service is closing") @@ -137,7 +147,10 @@ def start_velocity_lease(self, command: PlanarVelocityCommand, *, duration_s: fl raise Go2ClientError("control service did not return an action_id") return action_id - def update_velocity_lease(self, action_id: str, command: PlanarVelocityCommand) -> None: + def update_velocity_lease( + self, action_id: str, command: PlanarVelocityCommand, *, remaining_s: float | None = None + ) -> None: + """Update velocity; optionally renew a stream lease's bounded remaining horizon.""" result = self._request( "POST", "/v1/actions", @@ -147,11 +160,23 @@ def update_velocity_lease(self, action_id: str, command: PlanarVelocityCommand) "vx": command.vx_mps, "vy": command.vy_mps, "yaw_rate": command.yaw_rate_rps, + **({"remaining_s": remaining_s} if remaining_s is not None else {}), }, ) if result.get("accepted") is not True: raise Go2ClientError("velocity update was not accepted") + def release_velocity_lease(self, lease_id: str) -> None: + """Stop only our stream lease; never restore revoked operator readiness.""" + result = self._request("POST", "/v1/actions", {"action": "release_move", "action_id": lease_id}) + if ( + result.get("accepted") is not True + or result.get("stopped") is not True + or result.get("action_id") != lease_id + or result.get("operator_motion_ready") is not True + ): + raise Go2ClientError("control service did not confirm safe lease release; check operator readiness") + def stop(self) -> None: result = self._request("POST", "/v1/stop", {}) if result.get("stopped") is not True: diff --git a/src/embodirun/robots/unitree/go2/config.py b/src/embodirun/robots/unitree/go2/config.py index c5f0370..bf2f88f 100644 --- a/src/embodirun/robots/unitree/go2/config.py +++ b/src/embodirun/robots/unitree/go2/config.py @@ -8,7 +8,8 @@ from typing import Any from urllib.parse import urlsplit -from .navigation.motion import PlanarVelocityLimits +from embodirun.robots.mobile_base.motion import PlanarVelocityLimits + from .profile import MAX_LINEAR_SPEED_MPS, MAX_YAW_RATE_RPS diff --git a/src/embodirun/robots/unitree/go2/navigation/__init__.py b/src/embodirun/robots/unitree/go2/navigation/__init__.py index f04e35d..ac34993 100644 --- a/src/embodirun/robots/unitree/go2/navigation/__init__.py +++ b/src/embodirun/robots/unitree/go2/navigation/__init__.py @@ -1,98 +1 @@ -"""Canonical task values, interfaces, and closed loops for mobile navigation.""" - -from ._validation import NavigationContractError -from .config import ( - DEFAULT_NAVIGATION_SESSION_CONFIG, - DEFAULT_REACTIVE_NAVIGATION_SESSION_CONFIG, - NavigationSessionConfig, - ReactiveNavigationSessionConfig, -) -from .controllers import ( - DEFAULT_VELOCITY_PULSE_CONFIG, - DEFAULT_WAYPOINT_FOLLOWER_CONFIG, - MAX_PROJECTION_S, - FollowerSample, - VelocityLease, - VelocityPulseConfig, - WaypointFollowerConfig, - WorldWaypointFollower, - capture_pose, - project_pose_to_time, - relative_target_to_velocity, - waypoint_to_velocity_pulse, -) -from .discrete import NavigationCommand, NavigationCommandKind -from .events import ( - NavigationEndReason, - NavigationSessionError, - NavigationSessionEvent, - NavigationSessionResult, -) -from .frames import MAX_IMAGE_BYTES, EncodedDepthFrame, EncodedRGBFrame -from .interfaces import MobileBase, MobileBaseError, NavigationPolicy, ObservationSource -from .motion import ( - DEFAULT_PLANAR_VELOCITY_LIMITS, - MobileBaseState, - PlanarVelocityCommand, - PlanarVelocityLimits, -) -from .observation import MAX_RGB_CONTEXT, NavigationObservation -from .plan import ( - MAX_OUTPUT_VALID_FOR_S, - MAX_WAYPOINT_COORDINATE_M, - MAX_WAYPOINTS, - NavigationResult, - Waypoint, - WaypointPlan, -) -from .reactive_session import ReactiveNavigationSession -from .request import NavigationRequest -from .session import NavigationSession - -__all__ = [ - "DEFAULT_NAVIGATION_SESSION_CONFIG", - "DEFAULT_PLANAR_VELOCITY_LIMITS", - "DEFAULT_REACTIVE_NAVIGATION_SESSION_CONFIG", - "DEFAULT_VELOCITY_PULSE_CONFIG", - "DEFAULT_WAYPOINT_FOLLOWER_CONFIG", - "MAX_IMAGE_BYTES", - "MAX_OUTPUT_VALID_FOR_S", - "MAX_PROJECTION_S", - "MAX_RGB_CONTEXT", - "MAX_WAYPOINTS", - "MAX_WAYPOINT_COORDINATE_M", - "EncodedDepthFrame", - "EncodedRGBFrame", - "FollowerSample", - "MobileBase", - "MobileBaseError", - "MobileBaseState", - "NavigationCommand", - "NavigationCommandKind", - "NavigationContractError", - "NavigationEndReason", - "NavigationObservation", - "NavigationPolicy", - "NavigationRequest", - "NavigationResult", - "NavigationSession", - "NavigationSessionConfig", - "NavigationSessionError", - "NavigationSessionEvent", - "NavigationSessionResult", - "ObservationSource", - "PlanarVelocityCommand", - "PlanarVelocityLimits", - "ReactiveNavigationSession", - "ReactiveNavigationSessionConfig", - "VelocityLease", - "VelocityPulseConfig", - "Waypoint", - "WaypointFollowerConfig", - "WaypointPlan", - "WorldWaypointFollower", - "capture_pose", - "project_pose_to_time", - "relative_target_to_velocity", - "waypoint_to_velocity_pulse", -] +"""Compatibility namespace for Go2 navigation commands.""" diff --git a/src/embodirun/robots/unitree/go2/navigation/discrete.py b/src/embodirun/robots/unitree/go2/navigation/discrete.py index f9ffb0a..37d2597 100644 --- a/src/embodirun/robots/unitree/go2/navigation/discrete.py +++ b/src/embodirun/robots/unitree/go2/navigation/discrete.py @@ -1,108 +1,5 @@ -"""Metric discrete-navigation commands for the Go2 embodiment.""" +"""Compatibility imports for shared mobile-base navigation commands.""" -from __future__ import annotations +from embodirun.robots.mobile_base.discrete import NavigationCommand, NavigationCommandKind -import math -from collections.abc import Mapping -from dataclasses import dataclass -from enum import Enum - -from ....adapter import RobotAction - - -class NavigationCommandKind(str, Enum): - STOP = "stop" - MOVE_FORWARD = "move_forward" - TURN_LEFT = "turn_left" - TURN_RIGHT = "turn_right" - - -@dataclass(frozen=True, slots=True) -class NavigationCommand: - """One bounded metric navigation command for a Go2 target.""" - - kind: NavigationCommandKind - distance_m: float = 0.0 - angle_deg: float = 0.0 - - def __post_init__(self) -> None: - if not isinstance(self.kind, NavigationCommandKind): - raise TypeError("navigation command kind is invalid") - for name in ("distance_m", "angle_deg"): - value = getattr(self, name) - if isinstance(value, bool) or not isinstance(value, (int, float)): - raise TypeError(f"navigation command {name} must be numeric") - number = float(value) - if not math.isfinite(number) or number < 0: - raise ValueError(f"navigation command {name} must be finite and non-negative") - object.__setattr__(self, name, number) - - if self.kind is NavigationCommandKind.MOVE_FORWARD: - if self.distance_m <= 0 or self.angle_deg != 0: - raise ValueError("move_forward requires distance_m and no angle_deg") - elif self.kind in { - NavigationCommandKind.TURN_LEFT, - NavigationCommandKind.TURN_RIGHT, - }: - if self.angle_deg <= 0 or self.distance_m != 0: - raise ValueError("turn commands require angle_deg and no distance_m") - elif self.distance_m != 0 or self.angle_deg != 0: - raise ValueError("stop must not include a distance or angle") - - def to_action_values(self) -> dict[str, object]: - values: dict[str, object] = {"command": self.kind.value} - if self.kind is NavigationCommandKind.MOVE_FORWARD: - values["distance_m"] = self.distance_m - elif self.kind in { - NavigationCommandKind.TURN_LEFT, - NavigationCommandKind.TURN_RIGHT, - }: - values["angle_deg"] = self.angle_deg - return values - - @classmethod - def from_robot_action(cls, action: RobotAction) -> NavigationCommand: - if not isinstance(action, RobotAction): - raise TypeError("navigation action must be a RobotAction") - values = action.values - if not isinstance(values, Mapping): - raise TypeError("navigation action values must be an object") - values = dict(values) - command = values.get("command") - try: - kind = NavigationCommandKind(command) - except (TypeError, ValueError): - available = ", ".join(item.value for item in NavigationCommandKind) - raise ValueError(f"navigation action command must be one of: {available}") from None - - allowed = {"command"} - distance_m = 0.0 - angle_deg = 0.0 - if kind is NavigationCommandKind.MOVE_FORWARD: - allowed.add("distance_m") - distance_m = _number(values.get("distance_m"), "distance_m") - elif kind in { - NavigationCommandKind.TURN_LEFT, - NavigationCommandKind.TURN_RIGHT, - }: - allowed.add("angle_deg") - angle_deg = _number(values.get("angle_deg"), "angle_deg") - unknown = sorted(set(values) - allowed) - if unknown: - raise ValueError("unknown navigation action fields: " + ", ".join(unknown)) - return cls(kind=kind, distance_m=distance_m, angle_deg=angle_deg) - - -def _number(value: object, name: str) -> float: - if isinstance(value, bool) or not isinstance(value, (int, float)): - raise TypeError(f"navigation action {name} must be numeric") - result = float(value) - if not math.isfinite(result) or result <= 0: - raise ValueError(f"navigation action {name} must be finite and positive") - return result - - -__all__ = [ - "NavigationCommand", - "NavigationCommandKind", -] +__all__ = ["NavigationCommand", "NavigationCommandKind"] diff --git a/src/embodirun/services/host/cli/cli.py b/src/embodirun/services/host/cli/cli.py index 34bec32..9ec5d9f 100644 --- a/src/embodirun/services/host/cli/cli.py +++ b/src/embodirun/services/host/cli/cli.py @@ -12,7 +12,7 @@ from embodirun.deployment.executor import Executor, executor_for from embodirun.deployment.plan import ServiceError, build_plan -from .command import control, down, example, init, probe, run, sync, up, validate +from .command import control, down, example, go2, init, probe, run, sync, up, validate from .context import CommandContext, state_path from .progress import ConsoleProgressReporter @@ -27,6 +27,7 @@ def build_parser() -> argparse.ArgumentParser: ) commands = parser.add_subparsers(dest="command", required=True) example.register(commands) + go2.register(commands) validate.register(commands) probe.register(commands) init.register(commands) @@ -43,11 +44,14 @@ def main( *, executor_factory: Callable[[NodeConfig], Executor] = executor_for, ) -> int: + arguments = list(sys.argv[1:] if argv is None else argv) + if len(arguments) >= 2 and arguments[0] == "go2" and arguments[1] in {"activevln", "edge"}: + return go2.run(argparse.Namespace(binding=arguments[1], binding_args=arguments[2:])) parser = build_parser() - args = parser.parse_args(argv) - if args.command == "example": + args = parser.parse_args(arguments) + if args.command in {"example", "go2"}: try: - return example.run(args) + return (example if args.command == "example" else go2).run(args) except (OSError, RuntimeError, ValueError) as error: print(f"embodirun: error: {error}", file=sys.stderr) return 2 diff --git a/src/embodirun/services/host/cli/command/go2.py b/src/embodirun/services/host/cli/command/go2.py new file mode 100644 index 0000000..72792f7 --- /dev/null +++ b/src/embodirun/services/host/cli/command/go2.py @@ -0,0 +1,25 @@ +"""Route Go2 policy bindings through the installed EmbodiRun command.""" + +from __future__ import annotations + +import argparse +from typing import Any + + +def register(commands: Any) -> None: + """Register the robot/model path without importing hardware dependencies.""" + parser = commands.add_parser("go2", help="Go2 navigation and edge services") + bindings = parser.add_subparsers(dest="binding", required=True) + for name, help_text in (("activevln", "ActiveVLN navigation"), ("edge", "Go2 hardware owner deployment")): + parser = bindings.add_parser(name, add_help=False, help=help_text) + parser.add_argument("binding_args", nargs=argparse.REMAINDER) + + +def run(args: argparse.Namespace) -> int: + """Invoke the binding without requiring deployment YAML.""" + if args.binding == "edge": + from embodirun.deployment.go2.cli import main + else: + from embodirun.bindings.unitree.go2.activevln.cli import main + + return main(args.binding_args) diff --git a/third_party/embodiinfer b/third_party/embodiinfer index 1d4221a..c5a312f 160000 --- a/third_party/embodiinfer +++ b/third_party/embodiinfer @@ -1 +1 @@ -Subproject commit 1d4221ab3d632be73cbb98df4713e642067e00a4 +Subproject commit c5a312f93c033face70b8a056ec67b8dc56da276