Now recruiting capture teams worldwide. Get paid to record first-person video of real work.

Apply to capture

Guide

How to Convert UMI Data to MCAP

An array-to-channel mapping, step list and checks for writing a UMI Zarr replay buffer as an MCAP file, from the UMI repository and the MCAP sources.
By the Firsthand capture teamLast updated November 27, 2026

Short answer

The UMI repository writes a Zarr replay buffer, dataset.zarr.zip, with per-step arrays and episode_ends. An MCAP file holds timestamped messages on channels, each optionally tied to a schema. Converting means writing each array and camera frame as messages with timestamps you supply. Neither source documents a UMI-to-MCAP converter.

Last reviewed:

What does the UMI pipeline output?

The official UMI repository (opens in a new tab) documents one training format. Its README runs scripts_slam_pipeline/07_generate_replay_buffer.py with an output path ending in dataset.zarr.zip, and training points task.dataset_path at that file. The README mentions Zarr only: it names no MCAP, RLDS or LeRobot output. The UMI Zarr replay buffer entry is the definition.

The ReplayBuffer class asserts a data group and a meta group, an episode_ends array in meta, and a first dimension in every data array equal to the last value of episode_ends. All episodes are concatenated along the first axis. For each gripper i the script writes robot{i}_eef_pos, robot{i}_eef_rot_axis_angle, robot{i}_gripper_width, robot{i}_demo_start_pose and robot{i}_demo_end_pose, and for each camera j camera{j}_rgb. It writes no action, IMU or timestamp array, and no task text, reward or success and failure labels.

Images are not the original video: the script inpaints tags, masks the gripper, resizes to an output resolution set by an option (default 224,224) and stores uint8 RGB frames, one frame per chunk, with a JPEG XL codec the repo registers. The UMI paper (opens in a new tab) describes a handheld gripper with a wrist-mounted fisheye camera and visual-inertial pose tracking.

What is an MCAP file?

The MCAP documentation (opens in a new tab) describes a modular container for heterogeneous timestamped data, able to hold multiple streams in a single file. The specification (opens in a new tab) calls it a container for timestamped pub/sub messages with arbitrary serialization formats, and the MCAP repository (opens in a new tab) calls it serialization-agnostic. Its main records are:

  • Message: a channel ID, an optional sequence, a log_time, a publish_time and data bytes. Times are uint64 nanoseconds since a user-understood epoch.
  • Channel: an ID, a schema ID (0 means no schema), a topic, a mandatory message_encoding and a string-to-string metadata map.
  • Schema: an ID that must not be zero, a name, an encoding and the schema data.
  • Chunk: a batch of records with optional lz4 or zstd compression. For indexed files, messages should be in chunks.
  • Metadata (named string pairs) and Attachment (name, media type, data; never inside a chunk).

Files are self-contained because schemas are embedded, and writing is append-only. The MCAP file format glossary entry covers the container from the site side. The specification mentions no episodes, actions or rewards, so how a UMI episode looks inside MCAP is a choice.

Is there an official UMI-to-MCAP converter?

Not in the sources read. The UMI README documents Zarr only. The MCAP repository lists official libraries in C++, Go, Python, JavaScript/TypeScript, Swift and Rust, plus a command-line tool to inspect, merge and split files; none of it names UMI. Conversion is therefore an approach a lab implements itself, with an official MCAP library as the writer, and every channel name below is an illustrative choice. See UMI dataset formats for all four formats, and the sibling guides for LeRobot and RLDS.

How do a UMI Zarr replay buffer and an MCAP file compare?

Structural facts from the UMI repository and the MCAP specification. The sources state no read speed or file size, so none is implied.
AspectUMI Zarr replay bufferMCAP file
StructureZarr root: a data group of arrays and a meta group.Header, data section of records, optional summary, Footer.
OrganisationNamed arrays sharing one first dimension, indexed by step.Messages on channels; channels need not line up.
TimeNo timestamp array written by the script.log_time and publish_time on every message.
Episodesmeta/episode_ends.No episode record; a convention you choose.
TypesA dtype per array (float32 pose and width, uint8 images).message_encoding per channel and an optional schema.
Imagesuint8 RGB arrays with a JPEG XL codec.Payload bytes in an encoding you choose.
ExtrasNone written by the script.Metadata and Attachment records; lz4 or zstd chunks.

Structural facts from the UMI repository and the MCAP specification. The sources state no read speed or file size, so none is implied.

How do UMI arrays map to MCAP channels and messages?

This mapping is a proposal, not an official one. Array names are as the repo names them. Topic names are illustrative choices a lab makes; neither source defines any. Not stated means the sources are silent.

Illustrative array-to-channel mapping, one message per step per channel. That is the simplest reading of the buffer, not a requirement of either format.
UMI array (as the repo names it)What it holdsMCAP channel and schema approach (illustrative, the lab choice)Notes
camera{j}_rgbuint8 RGB frame per step (default 224,224).One channel per camera, e.g. umi/camera0/image; schema yours.Payload format not stated. Record dtype, shape and channel order.
robot{i}_eef_posEnd-effector position, float32.Pose channel per gripper, e.g. umi/robot0/eef_pose.Units and frame not stated; take them from your capture spec.
robot{i}_eef_rot_axis_angleRotation, axis-angle as the repo names it, float32.Same pose channel, or its own.The task config uses 6D rotation for training; MCAP states none.
robot{i}_gripper_widthOne float32 per step.Scalar channel, e.g. umi/robot0/gripper_width.Unit not stated in the script; record it in the schema.
robot{i}_demo_start_pose, robot{i}_demo_end_poseDemo start and end pose, repeated every step.A Metadata record per episode.Metadata values are strings, so serialise numbers.
meta/episode_endsEpisode end offsets (int64).Not a channel; used to cut the arrays.MCAP stores no such offsets.
Timestamps, IMU, task text, labelsNot in the replay buffer.Timestamps become log_time; the rest become channels, Metadata or Attachments.Need your capture spec or raw session data. Names and rates not stated.

Illustrative array-to-channel mapping, one message per step per channel. That is the simplest reading of the buffer, not a requirement of either format.

The sources describe no ROS topic convention for UMI, so none is claimed. If your tooling expects specific topic names, types or rates, take them from its documentation and rename the mapping.

How do you choose schemas and message encodings?

The UMI sources define no message encoding, because the replay buffer is Zarr. The MCAP format registry (opens in a new tab) lists, for message_encoding, ros1, cdr, protobuf, flatbuffer, capnproto, cbor, msgpack and json, and for schema encodings protobuf, flatbuffer, capnproto, ros1msg, ros2msg, ros2idl, omgidl and jsonschema, plus an empty string. The choice is yours and should follow the tooling that will read the file.

  • Schema ID 0 means no schema; an empty schema encoding is allowed only for self-describing encodings such as json, and some encodings, for example protobuf, need a schema.
  • A Schema must occur before any Channel that uses it, and a Channel before its messages.
  • If the Header profile is ros2, the registry requires cdr, a ros2msg or ros2idl schema and offered_qos_profiles in channel metadata; for ros1 it requires ros1 and ros1msg. An empty profile is also allowed.

How do you set timestamps and mark episodes?

Timestamps are the hardest part. Every MCAP message needs a log_time, and publish_time must equal it when no separate time exists. The replay-buffer script writes no timestamp array and the sources state no frame rate, so times cannot be recovered from the file alone.

  • Take times from your capture spec or the raw session data, not from an assumed rate. With only step indices, say so in the file.
  • Pick one epoch for the dataset and record it in Metadata.
  • Put every channel on the same clock, or readers cannot line up camera and pose.

MCAP has no episode record, and the replay buffer has episode_ends. Use one file per episode, or several episodes per file separated by Metadata records or a small boundary channel. Chunks are batches for compression and indexing, not semantic units, so they are a poor boundary. Document the choice; another team cannot infer it. Outcome labels, task text and demo poses fit Metadata, Attachments or a labels channel.

What are the steps to convert UMI data to MCAP?

These steps are an approach assembled from the two sets of sources, not a documented UMI procedure. Write each decision in your spec first.

  • Open the replay buffer, list the arrays under data and read meta/episode_ends.
  • Slice every array into episodes with episode_ends, and check each array has the same number of steps per episode.
  • Choose channels and illustrative topic names, one channel per camera.
  • Choose message encodings from the registry and define a schema per channel.
  • Decide log times from the capture spec or raw session data, with one epoch.
  • Decide episode marking: one file per episode, or Metadata records and a boundary channel.
  • Put calibration files in Attachments and episode-level values in Metadata.
  • Write the file with an official MCAP library, schemas and channels first, messages in chunks for an indexed file.
  • Read it back and compare it with the replay buffer using the checks below.

No writer code is shown, because the exact API calls were not verified for a UMI case. Follow the official library documentation for your language and test on a small batch first.

How do you handle camera images?

Reading the camera arrays needs the JPEG XL codec the repo registers, so use the repo code to decode. The result is uint8 frames at the output resolution the script was run with, already reduced from the recording. For more detail, regenerate from the raw session videos.

The MCAP sources state no required image encoding. A frame can travel as raw array bytes described by the schema, or as compressed image bytes with the codec named in the schema or channel metadata; either is a lab choice. Chunk compression with lz4 or zstd is available, but no ratio is stated, so measure it. Give each camera its own channel.

How do you check the converted file?

  • Message counts per channel match the matching array length or episode length; a Statistics record holds channel_message_counts.
  • First and last log_time cover the same interval on every channel.
  • Every channel with a schema ID has a Schema record, and a reader decodes a sample from each.
  • Episode marking gives the same count and lengths as meta/episode_ends.
  • Epoch, spec reference and labels are present in Metadata.

Use a reader library or the command-line tool for a first look. A file can pass every structural check and still carry a poor trajectory, so run the UMI data quality checklist before conversion too.

What can go wrong in conversion?

  • Invented timestamps from an assumed rate make a replay look real when it is not.
  • Messages outside chunks cannot be indexed, per the specification.
  • Wrong record order: schemas before channels before messages, and no schema with ID 0.
  • Encoding mismatch between the Channel record and the message bytes.
  • Metadata is string-only; numbers need a documented serialisation.
  • Streams written on different clocks cannot be aligned.
  • A ros2 profile without cdr, a ROS schema and QoS metadata breaks the registry rules.
  • Treating MCAP as a training layout: it is a container of timestamped messages, not episodes of steps.

MCAP, RLDS or LeRobot: which target should you convert to?

Pick by what reads the file. MCAP records and replays timestamped streams. RLDS holds episodes of steps; the UMI-to-RLDS guide maps the replay buffer onto it. LeRobot stores episodes as Parquet plus per-camera video; see the UMI-to-LeRobot guide. The UMI sources recommend none of them. The site states no MCAP to LeRobot converter; see MCAP vs LeRobot and MCAP vs HDF5. If you need a log container and a training layout, name both in the spec.

How does Firsthand deliver custom UMI-style data?

Firsthand runs custom UMI data collection: UMI-style handheld gripper demonstrations recorded to your task spec in real homes, workplaces and factories, through our network of capture providers, on rigs we source and ship. Delivered per episode: gripper-camera video, 6-DoF end-effector trajectory, continuous gripper width, IMU, timestamps, task and episode metadata, and success and failure labels. Paired head-mounted egocentric video is available on request.

This is fast, on-demand custom UMI data collection at scale through a network of thousands of capture providers, for a consistent, recurring data flow to labs. The site lists six delivery formats on the formats index: RLDS, LeRobot, WebDataset, HDF5 and zarr, Rerun .rrd and the episode schema. It also states MCAP delivery for egocentric stereo data; see egocentric stereo data in MCAP. MCAP or UMI-compatible Zarr for UMI-style episodes is not stated, so delivery format is scoped on request, as are force/torque, tactile and gripper depth. See UMI data collection services, what UMI is and how UMI variants differ, or request a custom UMI dataset.

Firsthand is not affiliated with, endorsed by or related to the UMI authors, the MCAP maintainers, their institutions or any gripper or camera maker.

FAQ

How to Convert UMI Data to MCAP, answered.

01

Can UMI data be stored in MCAP?

Yes in principle, once converted. The UMI replay buffer is Zarr, and MCAP holds timestamped messages on channels, so each array and camera frame must be written as messages with timestamps you supply. Neither official source documents a UMI-specific path.

02

Does UMI ship an MCAP converter?

No converter is documented in the UMI README, which mentions Zarr only, and the MCAP sources do not name UMI. You implement the conversion with an official MCAP library as the writer.

03

What is an MCAP channel?

Per the MCAP specification, a Channel record defines an encoded stream of messages on a topic, with an ID, a schema ID (0 means no schema), a mandatory message encoding and a string metadata map. Every message refers to one channel.

04

Which message encoding should UMI data use in MCAP?

The UMI sources define none. The MCAP registry lists ros1, cdr, protobuf, flatbuffer, capnproto, cbor, msgpack and json; the choice follows the tooling that will read the file.

05

Does the UMI replay buffer contain timestamps?

The script writes no timestamp array and the sources read state no frame rate. Every MCAP message needs a log time, so take times from your capture spec or the raw session data.

06

Can Firsthand deliver UMI-style data in MCAP format?

The site states MCAP delivery for egocentric stereo data, but not for UMI-style data, so delivery format is scoped on request. Name your format in the request.

07

Where can I get custom UMI data?

From Firsthand custom UMI data collection: UMI-style handheld gripper demonstrations recorded to your task spec, at scale through a network of thousands of capture providers. Delivery format is scoped on request.

Sources

Where is this documented?

Check it against the sample pack.

40 episodes across 4 environments, delivered in the exact schema these guides describe.