Metadata-Version: 2.4
Name: touchlab-slip-model
Version: 1.1.0
Summary: Slip detection for Touchlab fingertip sensors: license activation and live touch/slip detection, no ROS2 required
Author-email: Touchlab Limited <abi@touchlab.io>
License-Expression: LicenseRef-Touchlab-Proprietary
Project-URL: Homepage, https://touchlab.io
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
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: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography>=41
Requires-Dist: requests>=2.28
Requires-Dist: torch<2.15,>=2.0
Requires-Dist: numpy>=1.21
Requires-Dist: touchlab-comm-py<0.3,>=0.2.3
Requires-Dist: touchlab-license-server<2,>=1.1.0
Dynamic: license-file

# touchlab-slip-model

Slip detection for Touchlab fingertip sensors. Reads your fingertips
directly over USB and reports touch, slip or no touch for each finger, live,
in your terminal or as JSON. No ROS2 needed.

Using it needs a purchase code from Touchlab. If you don't have one, contact
support@touchlab.io.

## Requirements

- Linux (x86_64 or aarch64, e.g. Jetson) or Windows (64-bit), Python 3.9 to 3.14
- Touchlab fingertip(s) connected over USB, either through the Touchlab master board
  (1 to 5 fingertips, fingertip set to SPI protocol) or a Touchlab interface board
  (1 fingertip, set to USB (binary) protocol)
- A purchase code, e.g. `SLIP-XXXX-XXXX-XXXX`
- Internet access for activation only; everything after that runs offline

## Install

```bash
pip install touchlab-slip-model
```

This also installs `touchlab-license-server` (the local license check) and
the hardware driver `touchlab-comm-py`.

PyTorch is a dependency. On a machine without an NVIDIA GPU, install the
much smaller CPU-only build first:

```bash
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install touchlab-slip-model
```

## 1. Activate (once per fingertip, needs internet)

With the fingertips connected, give your board's serial port
(`/dev/ttyACM0` on Linux, e.g. `COM3` on Windows):

```bash
touchlab-activate --key SLIP-XXXX-XXXX-XXXX --port /dev/ttyACM0
```

This reads the connected fingertip's serial number and activates it. With
several fingertips connected, it lists them; pick one with
`--sn <serial>`, or activate all of them with `--all-fingertips` (for hand
bundles). If you know the serial, you can skip the port:

```bash
touchlab-activate --key SLIP-XXXX-XXXX-XXXX --sn <fingertip-serial>
```

The license is saved in `.config/touchlab/licenses/` in your home folder.

## 2. Run slip detection

```bash
touchlab-slip-detect --port /dev/ttyACM0
```

```
[hand_slip_detection] thumb (index 0) TL50140B9E...: licensed -- 88 day(s) left (expires 2026-12-25T10:00:00Z)
[hand_slip_detection] thumb (index 0) TL50140B9E...: starting inference
[hand_slip_detection] Running. Ctrl+C to stop.

global=touch    thumb=touch
global=slip     thumb=slip
```

Only licensed, connected fingertips run. Add `--json` for one JSON object per
line:

```json
{"fingers": {"thumb": {"state": "slip", "confidence": [0.01, 0.98, 0.01]}}, "global_state": "slip"}
```

The calibration for your fingertips is built in and chosen automatically
from the slots they're plugged into (1 to 5 fingertips). To use your own
calibration file instead, pass `--calibration <file>`.

`touchlab-slip-detect --help` lists the other options. The defaults match the
shipped model.

## Licenses

Before each run, `touchlab-slip-detect` checks every connected fingertip and
shows how many days its license has left, with a warning in the last 14
days. To check without running:

```bash
touchlab-license-server list
```

**Renewing:** buy a renewal, then run `touchlab-activate` with the new code
and the same serial. **New computer:** install and run `touchlab-activate`
with your original code and serial again; this doesn't use up an activation
and keeps your license's expiry date.

## Support

support@touchlab.io

The model ships encrypted and only loads with a valid license for the
connected fingertip. This software is proprietary; use is governed by the
license agreement in `LICENSE`.

Copyright (c) 2026 Touchlab Limited. All Rights Reserved.
