Skip to main content
Real-time sensor data (tactile, IMU, hand tracking, and more) is ephemeral—recording persists it to files for offline analysis, algorithm debugging, or dataset building. Wuji SDK includes a built-in recording engine that synchronously writes multi-channel sensor data to MCAP files. The workflow takes three steps:
  1. Create a recorder — Create a TopicRecorder and choose a compression algorithm
  2. Register channels — Call recorder.record(sub) to register subscription channels, supporting device and global resources in the same session
  3. Start recording — Call await recorder.start(path) to begin recording, which returns a RecordingHandle for control
During recording, pause and resume at any time, or use episode switching to split a continuous capture into separate files. The engine includes built-in recording monitoring that tracks frame drop rate, inter-frame jitter, and sync offset in real time. When recording stops, a recording summary is returned with aggregate statistics.
For runnable code, see the Examples at the bottom of this page.

Compression Options

Choose a compression algorithm with the compression parameter when creating TopicRecorder:

Message Timestamps

Each message in the MCAP file carries two time fields. log_time is when the host received the frame. publish_time comes from the frame’s FrameHeader timestamp_us, converted to nanoseconds, so it preserves the event time on the device. Keeping the two apart lets downstream tools align streams on publish_time without transport and queuing latency for messages that carry a valid device-side timestamp. Messages that fall back to the host receive time are not covered by this alignment. Resources without a FrameHeader (such as plain scalar parameters) and frames whose timestamp_us is 0 fall back to the host receive time for publish_time. The meaning of timestamp_us depends on the time sync state. See Time Synchronization.

Recording Global Resources

Cross-device merged global resources (such as coordinate transforms) can also be recorded, mixed with device resources:

Pause and Resume

Pause and resume recording at any time. Device data continues to stream while paused, but nothing is written to the file.

Episode Switching

Call start() multiple times on the same TopicRecorder to switch output files without re-registering channels. Use this to split a continuous capture session into separate recording segments:

Recording Monitoring

Monitor data quality metrics in real time during recording:
For the full field list, including per-channel health details in channels, see Common Data Types — QualityMetrics.

Quality Alerts

The recording engine includes a built-in SPC alert mechanism that triggers when quality metrics exceed thresholds for a sustained period:

Recording Status

Monitor the runtime state of a recording:

Recording Summary

handle.stop() returns a RecordingSummary with recording statistics:

Examples

Demonstrates pause/resume, recording monitoring, episode switching, and recording summary:
Expected output:

Interface List

The recording engine ships in the Python API only, so the code samples on this page are Python only. A C program can reach the same frames through wuji_<device>_subscribe_<stream>(), but the on-disk format, quality statistics, and episode switching are up to the application. See the C Interface Reference for the subscription APIs.