Metadata-Version: 2.5
Name: xdof-sdk
Version: 0.1.0rc1
Summary: Read and visualize xdof-delivered data: MCAP topic names, protobuf schemas, and a Rerun viewer.
Author-email: Michael Luo <mluogh@xdof.ai>
Requires-Python: >=3.10
Requires-Dist: mcap-protobuf-support<1.0.0,>=0.5.3
Requires-Dist: mcap<2.0.0,>=1.2.2
Requires-Dist: numpy>=1.0.0
Requires-Dist: protobuf>=6.31.1
Provides-Extra: all
Requires-Dist: av>=12.0.0; extra == 'all'
Requires-Dist: rerun-sdk==0.28.1; extra == 'all'
Requires-Dist: scipy>=1.10.0; extra == 'all'
Provides-Extra: viz
Requires-Dist: av>=12.0.0; extra == 'viz'
Requires-Dist: rerun-sdk==0.28.1; extra == 'viz'
Requires-Dist: scipy>=1.10.0; extra == 'viz'
Description-Content-Type: text/markdown

# xdof-sdk

Read and visualize data delivered by xdof.

## Installation

```bash
pip install xdof-sdk          # MCAP topic names + protobuf schemas
pip install "xdof-sdk[viz]"   # + Rerun viewer
```

## Visualization

Open an episode (a directory of MCAPs, or a single `.mcap`) in Rerun:

```bash
xdof-viz /path/to/episode/
xdof-viz /path/to/episode/ --headless --open-browser   # serve the web viewer instead
```

## Reading MCAPs

Delivered MCAPs embed their protobuf schemas, so the `mcap` package decodes them directly. The same
messages are importable from `xdof_sdk.proto`, and standard topic names live in `xdof_sdk.constants`.

```python
from mcap.reader import make_reader
from mcap_protobuf.decoder import DecoderFactory

TOPIC = "/left-arm-state"  # any protobuf channel listed in your delivery's format spec

with open("episode.mcap", "rb") as f:
    reader = make_reader(f, decoder_factories=[DecoderFactory()])
    for _, channel, message, decoded in reader.iter_decoded_messages(topics=[TOPIC]):
        print(message.log_time, decoded)
```

`0.0.1rc13` is the last release that includes the `Trajectory` loader (`xdof_sdk.data`).
