Skip to main content
Collect data saves a LeRobot dataset by default. Set Recording format to mcap to save each episode as its own MCAP file instead. Open the files in Foxglove, replay them with ros2 bag, or read them in Python with the mcap and mcap-ros2-support packages. Each file holds:
  • every camera’s video, encoded to H.264 or H.265 once on the robot and stored as is;
  • each camera’s calibration, and the head camera’s IMU;
  • the joints, commands, headset input and, on Jelly, the base;
  • the full transform tree, from the base to every camera, with the camera mounts measured on your Axol when it has a camera calibration;
  • the episode’s ID, task, operator, robot, software version, outcome and calibration.
Every sample is stored at its own time, on one clock. Nothing is resampled and no frame is repeated to fill a gap.

Turn it on

  1. In the control panel, open Settings, then Recording, and set Recording format to mcap. On the command line, add --format mcap.
  2. Choose the video size and rate. In Axol settings, open Cameras and set Recording resolution. Set Recording fps under Settings, then Recording. For 1920x1200 at 60 fps, choose HD1200 and 60.
  3. In the Collect data form, type your name or ID in Operator. It is saved in every episode and kept for the next session.
  4. To save more details with every episode, fill in Episode metadata in the same form, as key=value pairs separated by commas. For example: task_id=pick-12, site=lab-2. On the command line, use --episode_metadata.
  5. Calibrate the cameras, so episodes place them from measurements.
Streaming resolution only sets the headset’s picture. Collect data captures at the larger of the two resolutions, so you can record at HD1200 and stream SVGA to keep the headset and the Jetson’s encoders lighter. MCAP video codec, under Settings, then Recording, picks the codec: h264 (the default) plays in a web browser on any computer, and h265 makes smaller files. On the command line, use --mcap_video_codec. MCAP recording works with Collect data on Axol. Mantis, Collect DAgger data and Run policy save LeRobot datasets. Push to HuggingFace Hub doesn’t apply to MCAP episodes.

Where the files go

Episodes are saved in the Dataset root folder, in a subfolder named after the Repo ID: episode_000000.mcap, episode_000001.mcap, and so on. A new session in the same folder continues the numbering. Use a new Repo ID for MCAP recording. Collect data won’t write MCAP episodes into a folder that holds a LeRobot dataset. A file appears only when you save the episode. A discarded take leaves nothing behind. Plan for storage. Every frame is a keyframe, so each 1920x1200 camera at 60 fps records about 50 Mbit/s with H.264, or 40 Mbit/s with H.265. With four cameras and H.264 that is about 25 MB/s, or 90 GB per hour of recording (72 GB with H.265). Collect data won’t start an episode with less than 2 GB free.

Topics

The /base topics appear on Axol on Jelly only. Time stamps are Unix time. Each message’s log time is its header stamp.

Joint names

/joint_states and /joint_command use the URDF’s joint names, so the URDF in /robot_description places every link. The URDF links each mesh to its file on GitHub, at the release of the software that recorded the episode. Foxglove loads them when the computer is online, so the 3D panel shows the robot model. To show it, add a URDF layer to the 3D panel and set its source to the /robot_description topic. The right arm uses the same names with right_. Arm positions are in radians, with zero at the rest pose. /tf moves the fingers with the URDF’s left_finger_1_joint. To get its position in metres, use finger_closed_m + opening × (finger_open_m - finger_closed_m), with both values from the robot metadata. A parcel gripper has no finger joint, so both values are empty.

Commands

Each /joint_command message holds one control tick’s targets for the arms and grippers, as a standard sensor_msgs/JointState. A /joint_command/info message goes with each one, with the same time stamp: the time the software sent the targets. /joint_command/info and /base/command use two Almond message types. Their definitions are stored in each file, so Foxglove and the mcap Python packages read them with no setup. almond_msgs/CommandInfo describes one /joint_command: almond_msgs/BaseCommand holds one command to Jelly: control_mode is one of these:

Teleop input

/teleop/joy has these axes and buttons, in order:

Rename topics

To use your own topic names, set MCAP topic names under Settings, then Recording. Write default=new pairs, separated by commas:
Only the names change. The message types stay the same. Collect data won’t start if a name is misspelled, isn’t a topic this session records, or would clash with another topic. Each file lists its renames in the recording metadata as topic_names. On the command line, use --mcap_topics.

Head camera IMU

/head/imu holds every sample of the head camera’s IMU, about 200 per second, each at the time the IMU measured it. Each sample has:
  • linear_acceleration in m/s², gravity included;
  • angular_velocity in rad/s;
  • no orientation (orientation_covariance[0] is -1).
The samples are in the IMU’s own frame, head_camera_imu. /tf_static places it in head_camera_left_optical with the camera’s factory camera-to-IMU transform. If the episode’s recording metadata gives head_imu.frame_id as head_camera_left_optical, the ZED camera plugins need updating. The samples are then labelled with the optical frame. Run axol gst.build-zed once to fix it. The IMU needs the ZED camera plugins that come with this version of Axol. If the episode’s recording metadata has imu_missing, run axol gst.build-zed once, then record again. With a ZED SDK older than 5.1 the IMU is recorded once per video frame instead.

Video

Each frame is one H.264 or H.265 access unit, encoded on the Jetson as the camera captured it. It is stamped with the time the sensor exposed it. Every frame is a keyframe and carries its own parameter sets, so you can decode from any frame. The images are the cameras’ raw images, without rectification. Undistort them with the camera_info on the same topic. Browser versions of Foxglove play H.265 only on computers with hardware H.265 decoding. The Foxglove desktop app and ffmpeg decode it anywhere.

Calibration

If a camera has no factory calibration file on the robot, its camera_info is left out and the metadata says missing. Open each camera once with the ZED SDK to fetch its file.

Camera mounts

At the start of each episode, Collect data reads the robot’s camera calibration file. It uses the file when the file passed and names this robot. To record test episodes with a calibration that failed its checks, turn on Allow failed camera calibration under Settings, then Recording. On the command line, use --allow_failed_camera_calibration true. Each episode then says the calibration failed, and axol mcap.check reports it as a failure. Don’t use these episodes for training.
  • The tree keeps the URDF’s shape. Each measured camera’s own fixed joint is set so the camera lands where the file says. A TF lookup between a transform’s two frames in the file returns the file’s values.
  • /robot_description carries the same measured joints, so the robot model and /tf_static agree.
  • The file itself is attached to the episode as camera_calibration.json.
The calibration metadata says what was used:

Frames

Optical frames have z forward out of the lens, x to the right and y down in the image. Each optical frame is the frame_id of its camera’s video and camera_info.

Rename frames

To use your own frame names, set MCAP frame names under Settings, then Recording. Write default=new pairs, separated by commas:
A renamed frame is renamed everywhere the episode names it:
  • /tf and /tf_static;
  • the links in /robot_description;
  • the frame_id of every message, such as video, camera_info, the IMU and /ee_pose.
A calibration file can use either the default names or your names. The recorder won’t start if a name is misspelled or would clash with another frame. Each file lists its renames in the recording metadata as frame_names. On the command line, use --mcap_frames.

Metadata

Each file has these metadata records. A camera that drops an exposure leaves a gap, counted in recording as gaps and missing_frames.

Joint zero

Joint angles, the TCP frames and the wrist camera mounts all depend on where each joint was zeroed. At the start of each episode, Collect data reads the robot’s zeroing record and attaches it to the episode as joint_zero.json. The joint_zero metadata says which zeroing each arm was on: When an arm is re-zeroed after the cameras were calibrated, episodes still use the calibration and its joint offsets. Collect data logs a warning and axol mcap.check warns. Calibrate the cameras again.

Hardware IDs

When Collect data brings up the robot, it reads an ID or firmware version from each part. Each episode attaches them as hardware.json, and the hardware metadata lists them: The grippers, the wheels and the wrist joints use Damiao motors, which have no serial number. Each one gets an ID such as DM-3F9A21C4B7E0 from the factory calibration stored in it: its encoder compensation and the resistance, inductance and flux linkage measured on that motor. The ID stays the same across power cycles and zeroing. It changes only if the motor is recalibrated with Damiao’s tool or its driver board is replaced. Replacing a wheel changes the base ID, and replacing a wrist motor changes the arm ID. The per-motor IDs show which part changed. Run axol motor.info to see a motor’s ID.

Jelly drive

On Axol on Jelly, the jelly record holds the stick and drive settings the episode was recorded with. Change them per robot in the control panel’s Jelly settings. Change them per session with --teleop_config.jelly.<name> on axol collect-data. The sticks set /base/command like this:
  • Each stick axis reads 0 inside deadzone. Past it, the value is rescaled to run from 0 to 1.
  • The curve (1 - stick_expo) × x + stick_expo × x³ is applied to the length of the drive direction and to the turn.
A /base/command with vx, vy and wz asks for these speeds, where s = max(1, |vx| + |vy| + turn_scale × |wz|): /base/cmd_vel holds the speed after the ramp.

Arm control

The recording record holds how the arms were controlled.

Base odometry

On Axol on Jelly, /base/odom gives Jelly’s position and heading relative to where it was when the episode started. It also places Jelly in /tf (world to jelly). It is worked out from the wheel angles, so it drifts over distance, mostly when the base turns.

Check an episode

Run axol mcap.check on a file to confirm it has every topic, its frame rates and gaps, a sound transform tree, and its calibration:
It exits with status 1 if something required is missing.

Sample episodes

To get sample files without a robot, run axol mcap.synthetic. It writes two episodes made in the sim, with the same topics and metadata as Collect data’s.