iron-fleet
Robot hardware abstraction layer for QuantyCat.
iron-fleet provides a consistent interface for robot arms, camera/perception utilities,
calibration helpers, and deployment-side safety/policy components. The current repo
includes working support for:
- SO-101 real hardware via lerobot (
so101) - Camera discovery and capture on Linux and macOS
- Calibration helpers for AprilTag, checkerboard, hand-eye, and transforms
License
Copyright (c) 2026 QuantyCat. All Rights Reserved.
This is proprietary software. Unauthorized copying, modification, distribution, or use is strictly prohibited. See LICENSE for details.
Repository layout
inference/
└── openpi/ # Entry points: inference.sh, setup.sh
iron_fleet/
├── robots/ # Robot interfaces and implementations
│ └── lerobot/ # SO-101/LeRobot adapter, go_home, run_robot, setup
├── openpi/ # Policy server, openpi runner, state adapter, gain clip
├── calibration/ # AprilTag, checkerboard, hand-eye, transforms
├── perception/ # Camera config loading and camera manager
└── robot_registry/ # Driver registry (used by prime-radiant)
vendor/
└── openpi/ # Cloned by inference/openpi/setup.sh (not checked in)
tests/ # Unit and smoke tests
OpenPI training config is intentionally not maintained here. The canonical
Quantycat OpenPI training patches live in quantycat-positronic under
models/openpi/vendor_patches/; iron-fleet owns deployment/inference.
Python version
- Python 3.10+
Installation
Standard editable install
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -e .
Development install
pip install -e ".[dev]"
This installs the package plus development tooling such as pytest, black, ruff,
and mypy.
Optional extras
RealSense support
pip install -e ".[realsense]"
SO-101 real hardware support
pip install -e ".[so101]"
Running tests
python3 -m pytest -q
The current checked-in test suite is focused on camera/perception behavior:
python3 -m pytest tests/test_camera_manager.py -v
Robot smoke tests should live under tests/ when they are added for a simulator or
hardware setup.
Quick usage examples
List available robot types
from iron_fleet.robot_registry import RobotRegistry
print(RobotRegistry.list_registered())
Expected registered types currently include:
so101(register your driver with@RobotRegistry.register("so101"))
Load camera config from YAML
robot:
type: so101
cameras:
wrist:
serial: "ABC123"
resolution: [480, 360]
third_view:
serial: "XYZ789"
resolution: [640, 480]
from iron_fleet.perception.config import load_camera_configs
configs = load_camera_configs("robot.yaml")
print(configs)
Use CameraManager
from iron_fleet.perception import CameraManager
configs = {
"wrist": {"serial": "ABC123", "resolution": [480, 360]},
"third_view": {"serial": "XYZ789", "resolution": [640, 480]},
}
cam = CameraManager(configs)
cam.start()
frames = cam.get_frames()
print(frames.keys())
cam.stop()
Supported Drivers
Robot drivers
SO-101 (LeRobot), YAM, xArm, UR, Franka, Kinova Gen3, and AgileX Piper; see Robot adapters and deterministic moves.
Camera and perception notes
iron_fleet.perception.camera_manager supports:
- Linux camera discovery through
/dev/video*+udevadm - macOS camera discovery through AVFoundation +
system_profilerwhen available - optional Intel RealSense enumeration when
pyrealsense2is installed
Important details:
- Camera configs require both
serialandresolution - Resolution must be
[width, height] - On Linux, odd-numbered
/dev/video*nodes are skipped because they are often metadata nodes rather than frame-producing devices
Adding a new robot
- Add an adapter under
iron_fleet/robots/arms/: subclassStreamingArmand implement_hw_open,_hw_close,_hw_read_arm,_hw_write_arm(and aGripperif the arm has one). Import the vendor SDK inside_hw_openwithrequire(...)so the module imports without it. - Register it and list it in
_BUILTIN_ROBOTS(iron_fleet/robot_registry/robot_registry.py):
from iron_fleet.robot_registry import RobotRegistry
@RobotRegistry.register("your_robot")
class YourArm(StreamingArm):
...
- Add the SDK as a pyproject extra.
- Add a test against a fake SDK module (see
tests/test_streaming_arms.py).
Developer notes
- Prefer installation through
pyproject.toml(pip install -e .) rather thansetup.py. - The helper script
compileinstalls the dev extra and runs the checked-in tests.
Known assumptions
- Real robot safety, workspace limits, and production deployment policies should be validated outside this repo before commanding hardware
Robot adapters and deterministic moves
Every robot is a RobotAdapter (iron_fleet/robots/base.py), picked by the
deployment yaml's robot.type through iron_fleet.robot_registry:
robot.type |
Adapter | SDK (pyproject extra) | Run on hardware? |
|---|---|---|---|
so101 |
robots/lerobot/adapter.py |
LeRobot (.venvs/lerobot) |
yes |
yam |
robots/arms/yam.py |
i2rt (see driver install hint) | not yet |
xarm |
robots/arms/xarm.py |
xarm-python-sdk (.[xarm]) |
not yet |
ur |
robots/arms/ur.py (+ Robotiq) |
ur-rtde (.[ur]) |
not yet |
franka |
robots/arms/franka.py |
panda-python (.[franka]) |
not yet |
kinova |
robots/arms/kinova.py |
kortex_api (wheel from Kinova) | not yet |
piper |
robots/arms/piper.py |
pyAgxArm (see driver install hint) | not yet |
The robots/arms adapters share StreamingArm (robots/arms/streaming.py):
a background loop reads the joints and steps the command toward the latest
target at a capped joint speed (max_joint_speed, rad/s), and a separate
thread drives the gripper so a slow gripper never stalls the arm. Positions
are radians for arm joints, then the gripper in 0 (closed) .. 1 (open).
Each module's docstring shows its yaml keys; they match the constructor's
arguments, e.g.
robot:
type: yam
channel: can0
gripper_type: linear_4310
Adding an arm: subclass StreamingArm, implement _hw_open, _hw_close,
_hw_read_arm, _hw_write_arm (plus a Gripper if it has one), register it
with @RobotRegistry.register("<type>"), and add it to _BUILTIN_ROBOTS.
iron_fleet.run drives any of them. E.g. turn Qubit's base 50 degrees from
where it is (in a venv with the robot's SDK; .venvs/lerobot for an SO-101):
.venvs/lerobot/bin/python -m iron_fleet.run rotate --robot Qubit --joint shoulder_pan --degrees 50
Live inference (SO-101 + OpenPI)
Two venvs: openpi venv serves the policy over WebSocket; lerobot venv controls the robot.
Set up once per machine:
bash inference/openpi/setup.sh # creates .venvs/openpi, clones vendor/openpi
bash iron_fleet/robots/lerobot/setup.sh # creates .venvs/lerobot
Run inference from the QuantyCat console Run tab. Runtime settings come from
$QUANTYCAT_DEPLOYMENTS/profiles/openpi_run.json; missing profile is an error.
Set control.policy_trajectory_hz to the policy's normal trajectory rate to preserve
its timing, or lower it to time-dilate policy motion while retaining the configured
robot command-loop rate. The value is required and cannot exceed
1 / control.control_period_s.
Key env vars:
| Variable | Default | Purpose |
|---|---|---|
CHECKPOINT |
none — must be set, or pass --checkpoint <path> |
checkpoint to load |
CONFIG |
$QUANTYCAT_DEPLOYMENTS/profiles/openpi_run.json |
deployment config |
SERVER_PORT |
8765 |
WebSocket port between policy server and robot control |
Known issues
- OpenCV 4.6 + high-res segfault — handled in
iron_fleet/calibration/apriltag.pyby resizing frames to ≤1280px before detection. - macOS AVFoundation serial ordering — use
pr-assign-cameras(from prime-radiant) for visual confirmation rather than relying on serial matching alone.
QuantyCat Core and legacy service
QuantyCat Core is now the backend for the Python SDK and Prime Radiant Small UI.
Use quantycat setup to start/reuse Core. Iron Fleet supplies its hardware
adapters and kinematics; a second Iron Fleet service is not needed for that flow.
iron_fleet/legacy/quantycat_service.py is retained for legacy SDK JSON definitions,
hand-guiding compatibility, and adapter contract tests. Core still imports shared
setup adapters, model/error types, validation, and device locking from
quantycat_runtime; that folder is not dead code and must not be deleted as part
of cleanup. Do not run the two services against the same physical robot.
Legacy service only
The earlier robot execution developed inside quantycat-library lives in
iron_fleet.quantycat_runtime. The public quantycat package is an HTTP client;
it does not import this runtime or distribute hardware algorithms.
pip install -e '.[so101]'
python -m iron_fleet.legacy.quantycat_service --host 127.0.0.1 --port 8765
The old module path remains a thin compatibility shim. You can also use the
installed iron-fleet-serve entry point. The prepared workstation
environment is .venvs/quantycat-service. Starting the service does not open
hardware. It reuses the saved SDK JSON store by default; --config-dir chooses a
separate server-owned store. Existing console/deployment files are unchanged.
The service exposes versioned JSON operations, server-owned setup/robot sessions, calibration uploads, command results, request deduplication, and session leases. The client sends heartbeats. Expired resources are closed only when cleanup succeeds. No motion request is automatically retried. Model adapters are installed and registered privately here, not by remote client code.
IRON_FLEET_API_TOKEN enables bearer authentication; a token is required for
non-loopback binding. The development server needs authenticated HTTPS ingress
before remote hosting. USB hardware still needs a runtime/agent near the device.
Tests (with the sibling SDK installed for HTTP integration tests):
pytest -q tests/test_quantycat_service.py tests/quantycat_runtime
These tests use fake hardware. The service boundary does not change controller speeds, targets, calibration, or existing home/motion settings on startup.
Metadata
Release files for iron-fleet 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iron_fleet-0.1.0-cp312-cp312-manylinux_2_38_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.38+ x86-64 | Details for iron_fleet-0.1.0-cp312-cp312-manylinux_2_38_x86_64.whl |
Release files / iron_fleet-0.1.0-cp312-cp312-manylinux_2_38_x86_64.whl
| Download URL | iron_fleet-0.1.0-cp312-cp312-manylinux_2_38_x86_64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.12 Linux glibc 2.38+ x86-64 |
|
SHA-256 checksum How to use checksums |
c84301f1b33cd75a6051c3c195191dec3a78e18c648942392e387dea0da0b95c
|
|
BLAKE2b-256 checksum How to use checksums |
6327cdc4d10864d58d92f897bcce92a11772e6caa0b4024722ce398da2778321
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.12
|
Security for iron-fleet 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.