DocsReference

Speak Contour in five minutes.

A first look at the reference client: connect a sensor, stream normalized frames, record and replay. The code below sketches the intended design. Nothing here ships yet.

01

Install

The client will be a single Python package, with the reader, writer, and device profiles for everything in the Atlas.

pippip install contour
uvuv add contour
02

Stream a sensor

Connect by profile id and iterate the stream. Every frame is already normalized, no per-vendor parsing, no unit conversion.

quickstart.py
import contour

device = contour.connect("wuji_glove")

for frame in device.stream():
    taxels = frame.taxels      # (N,) normalized pressure
    pose = frame.pose          # (7,) position + orientation
    t = frame.timestamp

    if taxels.max() > 0.2:
        print("contact", round(t, 3))
03

Record & replay

A recording is just a stream written to disk. Because it's in Contour, a session captured on one sensor replays, and trains, on any other.

record.py
import contour

with contour.record("grasp.contour") as rec:
    for frame in contour.connect("wuji_glove").stream():
        rec.write(frame)

# later, anywhere
dataset = contour.read("grasp.contour")