Skip to main content

Data recording and replay utilities for Dexmate robots (MCAP + video)

Project description

dexdata

Data recording and replay utilities for Dexmate robots. Reads and writes MCAP episode data (robot state/action, RGB cameras, depth) with Protobuf serialization, and encodes cameras to video.

Install

pip install -e .            # core: MCAP read/write
pip install -e ".[convert]"   # adds torch + torchcodec for video_writer

Requires Python 3.11.

Layout

  • dexdata.mcap_utilsTeleopMcapWriter, TeleopMcapReader, Episode, EpisodeMetadata. Self-contained.
  • dexdata.video_writer — torch + torchcodec-backed parallel/serial video encoder (opt-in via [video] extra).

Quick read

from pathlib import Path
from dexdata.mcap_utils import TeleopMcapReader

reader = TeleopMcapReader(Path("/path/to/episode_dir"))
episode = reader.load_episode()
data = episode.to_numpy_dict()   # flat {key: np.ndarray} for training
fps = reader.metadata.record_rate_hz

An episode directory contains state_action.mcap, zero or more camera_*.mcap / depth_*.mcap, and info.json.

Scripts

  • scripts/example_mcap_read.py <episode_dir> — dump an episode to its numpy-dict form and print key shapes/dtypes.
  • scripts/mcap_to_video.py --episode_path <dir> — render a 2×2 camera grid to concatenated.mp4. FPS defaults to robot.record_rate_hz from info.json.
  • scripts/mcap_viz.py — Rerun-based episode visualization helper (RerunViz).

Protobuf schemas

Schemas live in src/dexdata/mcap_utils/proto/. Compiled *_pb2.py modules are checked in; regenerate with:

cd src/dexdata/mcap_utils/proto && ./compile_proto.sh

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dexdata-0.1.0-py3-none-any.whl (113.0 kB view details)

Uploaded Python 3

File details

Details for the file dexdata-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dexdata-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 113.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dexdata-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 da4c716d181ea113678107a1d04fbcec6258b25026039473a1e98de02b5f6d8c
MD5 3bc36a4891376d3c30d1407410bd3eb2
BLAKE2b-256 788530b287e97af9e1d8fddc523ee93c59c0e8a5604541734beb4464ab437fa0

See more details on using hashes here.

Provenance

The following attestation bundles were made for dexdata-0.1.0-py3-none-any.whl:

Publisher: pypi.yml on dexmate-ai/dexdata

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page