Skip to content

MCAP Logger

SUMMARY

MCAPLogger captures every message published on a Zenoh (BabyROS) network into a single .mcap file — with no per-topic configuration. Use it to record robot runs, replay them for debugging, and convert them into training datasets.

Live Feed
rgb
imu
jts
dep
 
MCAP
Logger
Output
run.mcap00:00
rgb
imu
jts
dep
216.0 MB · 18000 msgs

MCAP is an open container format for robotics data — timestamped, multi-channel, seekable, and self-describing. MCAPLogger records the entire network in one call. Reading back is a single generator.

Install

bash
pip install telekinesis-dataengine

Import

python
from telekinesis.dataengine import MCAPLogger

Capabilities

FeatureDescription
Universal captureSubscribes to "**" by default — every topic on the Zenoh session, at any rate.
No configurationNo per-topic schema registration, no format negotiation. Open it and record.
Self-describing outputMCAP embeds channel schemas alongside data — files are readable without the original code.
Seekable playbackRead back messages in recording order with a single generator call.
Multi-rate supportHandles heterogeneous publish rates — cameras at 30 Hz, IMU at 100 Hz, joints at 5 Hz — in one file.

Quick Start

python
import babyros
from telekinesis.dataengine import MCAPLogger

# ------------------------------------------------
# 1. Start publishers on the Zenoh network
# ------------------------------------------------
camera_pub = babyros.node.Publisher(topic="camera/rgb")
joint_pub  = babyros.node.Publisher(topic="robot/joint_states")

# ------------------------------------------------
# 2. Record everything to an MCAP file
# ------------------------------------------------
with MCAPLogger("results/run.mcap") as logger:
    for step in range(100):
        camera_pub.publish(frame)
        joint_pub.publish(joint_states)

# ------------------------------------------------
# 3. Read back in recording order
# ------------------------------------------------
for topic, obj in MCAPLogger.read("results/run.mcap"):
    print(topic, obj)
MCAPLogger API Reference
Full constructor options, read() parameters, and a multi-rate pipeline example.
Read more →