<aside> ⚠️
This page is synced from GitHub. Edits will be overwritten.
Source: https://github.com/uwrealitylabs/standalone-knowledge-base/blob/main/docs/emulation/EuRoC player.md
Last synced: 2026-11-01 23:20:22 UTC
</aside>
Part of Tracer bullet roadmap.
Source references are to uwrealitylabs/standalone-monado-driver, branch dev at 6bbefe8, relative to src/xrt/.
Monado's dataset replay source. It reads a dataset in EuRoC format and plays camera frames, IMU samples and ground truth into sinks, in real time or faster. It implements xrt_fs (a frame server, see Sinks), so to every consumer it looks like a live camera-and-IMU source. Code: drivers/euroc/euroc_player.cpp; interface drivers/euroc/euroc_interface.h; built with XRT_BUILD_DRIVER_EUROC.
EuRoC is the layout of the ETH EuRoC MAV datasets, also used by the Monado SLAM datasets (egocentric, recorded on real XR headsets; preferred for us over the drone-based originals).
<dataset>/mav0/
cam0/data.csv, cam0/data/<timestamp_ns>.png one folder per camera
cam1/...
imu0/data.csv timestamp, gyro xyz, accel xyz
<gt device>/data.csv timestamp, px py pz, qw qx qy qz
The player looks for ground truth in vicon0, mocap0, state_groundtruth_estimate0 or leica0 (euroc_player.cpp:205), or the folder named by EUROC_GT_DEVICE_NAME.
It replaces the capture layer. Everything above the sinks runs unchanged.
Live: our capture (V4L2 cameras + IMU reader + clock mapping) ─┐
├─ xrt_slam_sinks ─► t_slam ─► VIT/Basalt
Replay: EuRoC player ─────────────────────────────────────────────┘ ▲ get_tracked_pose
our HMD xrt_device ◄── core
| Replaced | Still real |
|---|---|
| Camera capture, IMU reading, hardware-to-monotonic clock mapping, our calibration | t_slam, VIT/Basalt, our device's pose composition, Monado core, compositor, apps |
Two calls. Both live in the builder's open function, in place of creating live capture.
euroc_player_create(xfctx, path, &config) (euroc_player.cpp:978) returns an xrt_fs already registered with the frame context (:1045). Fill config first with euroc_player_fill_default_config_for (euroc_interface.h:86), which reads the dataset to find its camera count and whether it has colour and ground truth.xrt_fs_slam_stream_start(player, sinks) (euroc_player.cpp:779). The player stores the sinks and its playback thread pushes frames (:694), IMU samples (:738) and, if enabled, ground truth into them.Sketch of a replay branch in our builder (proposed, not implemented; the task is described in SLAM tracer bullet from EuRoC):
#include "euroc/euroc_interface.h"
#include "tracking/t_tracking.h"
struct euroc_player_config ep_cfg;
euroc_player_fill_default_config_for(&ep_cfg, replay_path);
ep_cfg.playback.play_from_start = true; // default waits for the debug GUI
struct t_slam_tracker_config st_cfg;
t_slam_fill_default_config(&st_cfg);
st_cfg.cam_count = ep_cfg.playback.cam_count;
st_cfg.submit_from_start = true; // default discards everything
st_cfg.slam_config = basalt_toml_for_dataset; // e.g. Basalt's msdmi.toml
struct xrt_tracked_slam *xts = NULL;
struct xrt_slam_sinks *sinks = NULL;
t_slam_create(xfctx, &st_cfg, &xts, &sinks);
t_slam_start(xts);
struct xrt_fs *src = euroc_player_create(xfctx, replay_path, &ep_cfg);
xrt_fs_slam_stream_start(src, sinks);
// Give xts to the HMD device; it queries xrt_tracked_slam_get_tracked_pose().
The same sequence, minus the device, is drivers/euroc/euroc_runner.c:91–115.