|
Monado OpenXR Runtime
|
EuRoC dataset recorder utility. More...
#include "t_euroc_recorder.h"#include "os/os_time.h"#include "util/u_frame.h"#include "util/u_sink.h"#include "util/u_var.h"#include "util/u_debug.h"#include "xrt/xrt_defines.h"#include "xrt/xrt_tracking.h"#include "xrt/xrt_config_have.h"#include <cassert>#include <ctime>#include <filesystem>#include <fstream>#include <mutex>#include <string>#include <queue>#include <iomanip>#include <opencv2/imgcodecs.hpp>
Data Structures | |
| struct | euroc_recorder |
Macros | |
| #define | DEFINE_SAVE_IMU(imu_id) |
| #define | USE_SAVE_IMU(imu_id) euroc_recorder_save_imu##imu_id, |
| #define | DEFINE_SAVE_CAM(cam_id) |
| #define | USE_SAVE_CAM(cam_id) euroc_recorder_save_cam##cam_id, |
| #define | DEFINE_RECEIVE_IMU(imu_id) |
| #define | DEFINE_RECEIVE_CAM(cam_id) |
| #define | USE_RECEIVE_CAM(cam_id) euroc_recorder_receive_cam##cam_id, |
Functions | |
| static void | euroc_recorder_mkfiles (struct euroc_recorder *er) |
| static void | euroc_recorder_flush (struct euroc_recorder *er) |
| static void | euroc_recorder_save_imu_sample (struct euroc_recorder *er, struct xrt_imu_sample *sample, int imu_index) |
| void | euroc_recorder_save_gt (xrt_pose_sink *sink, struct xrt_pose_sample *sample) |
| static void | euroc_recorder_save_frame (euroc_recorder *er, struct xrt_frame *frame, int cam_index) |
| static void | euroc_recorder_receive_imu_sample (struct euroc_recorder *er, struct xrt_imu_sample *sample, int i) |
| void | euroc_recorder_receive_imu0 (struct xrt_imu_sink *sink, struct xrt_imu_sample *sample) |
| void | euroc_recorder_receive_imu1 (struct xrt_imu_sink *sink, struct xrt_imu_sample *sample) |
| void | euroc_recorder_receive_imu2 (struct xrt_imu_sink *sink, struct xrt_imu_sample *sample) |
| void | euroc_recorder_receive_gt (xrt_pose_sink *sink, struct xrt_pose_sample *sample) |
| static void | euroc_recorder_receive_frame (euroc_recorder *er, struct xrt_frame *src_frame, int cam_index) |
| void | euroc_recorder_node_break_apart (struct xrt_frame_node *node) |
| void | euroc_recorder_node_destroy (struct xrt_frame_node *node) |
| xrt_slam_sinks * | euroc_recorder_create (struct xrt_frame_context *xfctx, const char *record_path, int cam_count, int imu_count, bool record_from_start) |
| Create SLAM sinks to record samples in EuRoC format. | |
| void | euroc_recorder_start (struct xrt_slam_sinks *er_sinks) |
| Start recording samples sent to the recorder sinks. | |
| void | euroc_recorder_stop (struct xrt_slam_sinks *er_sinks) |
| Stop recording samples sent to the recorder sinks. | |
| static void | euroc_recorder_btn_cb (void *ptr) |
| void | euroc_recorder_add_ui (struct xrt_slam_sinks *er_sinks, void *root, const char *prefix) |
| Add EuRoC recorder UI button to start recording after creation. | |
Variables | |
| static void(* | euroc_recorder_save_imu [XRT_TRACKING_MAX_IMUS])(struct xrt_imu_sink *sink, struct xrt_imu_sample *sample) |
| static void(* | euroc_recorder_save_cam [XRT_TRACKING_MAX_CAMS])(struct xrt_frame_sink *sink, struct xrt_frame *frame) |
| static void(* | euroc_recorder_receive_imu [XRT_TRACKING_MAX_IMUS])(struct xrt_imu_sink *sink, struct xrt_imu_sample *sample) |
| Be sure to define the same number of defined functions as XRT_TRACKING_MAX_IMUS and to add them to to euroc_recorder_receive_imu. | |
| static void(* | euroc_recorder_receive_cam [XRT_TRACKING_MAX_CAMS])(struct xrt_frame_sink *, struct xrt_frame *) |
EuRoC dataset recorder utility.
| #define DEFINE_RECEIVE_CAM | ( | cam_id | ) |
| #define DEFINE_RECEIVE_IMU | ( | imu_id | ) |
| #define DEFINE_SAVE_CAM | ( | cam_id | ) |
| #define DEFINE_SAVE_IMU | ( | imu_id | ) |
| void euroc_recorder_add_ui | ( | struct xrt_slam_sinks * | er_sinks, |
| void * | root, | ||
| const char * | prefix | ||
| ) |
Add EuRoC recorder UI button to start recording after creation.
| er_sinks | The sinks returned by euroc_recorder_create |
| root | The pointer to add UI button to |
| prefix | Prefix in case you have multiple recorders, otherwise pass an empty string |
References u_var_button::cb, container_of, u_var_button::ptr, euroc_recorder::recording, and euroc_recorder::recording_btn.
Referenced by wmr_source_create().
| void euroc_recorder_start | ( | struct xrt_slam_sinks * | er_sinks | ) |
Start recording samples sent to the recorder sinks.
| er_sinks | The recorder sinks returned by euroc_recorder_create |
References container_of, os_realtime_get_ns(), euroc_recorder::path, euroc_recorder::path_prefix, euroc_recorder::recording, U_1_000_000_000, and U_LOG_W.
Referenced by euroc_recorder_create().
| void euroc_recorder_stop | ( | struct xrt_slam_sinks * | er_sinks | ) |
Stop recording samples sent to the recorder sinks.
You can start and stop as many times as you like.
| er_sinks | The recorder sinks returned by euroc_recorder_create |
References container_of, euroc_recorder::path, euroc_recorder::recording, and U_LOG_W.
|
static |
|
static |
Be sure to define the same number of defined functions as XRT_TRACKING_MAX_IMUS and to add them to to euroc_recorder_receive_imu.
Referenced by euroc_recorder_create().
|
static |
|
static |