Metadata-Version: 2.4
Name: rfabric-yam-bridge
Version: 0.1.0
Summary: Standalone bridge that exposes i2rt YAM arms over the rFabric realtime control UDS, with no lerobot dependency.
Project-URL: Homepage, https://rfabric.io
Project-URL: Repository, https://github.com/rfabric/rfabric
Author-email: rFabric <engineering@rfabric.io>
License: Apache-2.0
Keywords: i2rt,rfabric,robotics,teleoperation,yam
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: i2rt>=1.1.0
Requires-Dist: numpy>=1.24
Requires-Dist: rfabric-control-wire>=0.1.0
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Description-Content-Type: text/markdown

# rfabric-yam-bridge

Standalone bridge between the rFabric realtime control UDS and an i2rt YAM
arm (single or bimanual). Pip-install this package on the robot host, run
the `rfabric-yam-bridge` CLI as a systemd unit, and the rFabric agent will
drive your YAM the moment an operator session opens — no lerobot install
required.

## Install

```bash
pip install rfabric-yam-bridge
```

## Run

Single arm (one CAN bus):

```bash
rfabric-yam-bridge \
    --can-channel can0 \
    --gripper linear_4310 \
    --socket-path /run/rfabric/control.sock
```

Bimanual (two CAN buses, one per arm):

```bash
rfabric-yam-bridge \
    --left-channel can0  --left-gripper linear_4310 \
    --right-channel can1 --right-gripper linear_4310 \
    --socket-path /run/rfabric/control.sock
```

The bridge:

- Binds the UDS, accepts a single client (the rFabric agent), and
  decodes inbound length-prefixed CBOR `Frame`s.
- Maps every operator payload kind (`joint_targets`, `joint_deltas`,
  `joint_velocity`, `end_effector`, `stop`, `home`) into the same
  per-arm latest target / latest velocity, integrated by a single
  fixed-rate tick (default 100 Hz) into `MotorChainRobot.command_joint_pos`.
- Mirrors live joint state back to the operator UI as `state` frames at
  `--state-publish-hz` (default 30 Hz).
- Drops any per-arm command stream older than `--watchdog-ms` so the arm
  freezes when the operator UI stutters; the i2rt motor 400 ms safety
  timeout is the second line of defence.

The wire format is the same one consumed by the lerobot `rfabric_remote`
teleoperator — both surfaces share the `rfabric-control-wire` package.
