|
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 <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_CAM(cam_id) |
| #define | DEFINE_RECEIVE_CAM(cam_id) |
Functions | |
| static void | euroc_recorder_mkfiles (struct euroc_recorder *er) |
| static void | euroc_recorder_flush (struct euroc_recorder *er) |
| void | euroc_recorder_save_imu (xrt_imu_sink *sink, struct xrt_imu_sample *sample) |
| 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) |
| void | euroc_recorder_save_cam0 (struct xrt_frame_sink *sink, struct xrt_frame *frame) |
| void | euroc_recorder_save_cam1 (struct xrt_frame_sink *sink, struct xrt_frame *frame) |
| void | euroc_recorder_save_cam2 (struct xrt_frame_sink *sink, struct xrt_frame *frame) |
| void | euroc_recorder_save_cam3 (struct xrt_frame_sink *sink, struct xrt_frame *frame) |
| void | euroc_recorder_save_cam4 (struct xrt_frame_sink *sink, struct xrt_frame *frame) |
| void | euroc_recorder_receive_imu (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_receive_cam0 (struct xrt_frame_sink *sink, struct xrt_frame *frame) |
| void | euroc_recorder_receive_cam1 (struct xrt_frame_sink *sink, struct xrt_frame *frame) |
| void | euroc_recorder_receive_cam2 (struct xrt_frame_sink *sink, struct xrt_frame *frame) |
| void | euroc_recorder_receive_cam3 (struct xrt_frame_sink *sink, struct xrt_frame *frame) |
| void | euroc_recorder_receive_cam4 (struct xrt_frame_sink *sink, struct xrt_frame *frame) |
| 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, bool record_from_start) |
| Create SLAM sinks to record samples in EuRoC format. More... | |
| void | euroc_recorder_start (struct xrt_slam_sinks *er_sinks) |
| Start recording samples sent to the recorder sinks. More... | |
| void | euroc_recorder_stop (struct xrt_slam_sinks *er_sinks) |
| Stop recording samples sent to the recorder sinks. More... | |
| 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. More... | |
Variables | |
| static void(* | euroc_recorder_save_cam [XRT_TRACKING_MAX_SLAM_CAMS])(struct xrt_frame_sink *sink, struct xrt_frame *frame) |
| Be sure to define the same number of defined functions as XRT_TRACKING_MAX_SLAM_CAMS and to add them to to euroc_recorder_save_cam. More... | |
| static void(* | euroc_recorder_receive_cam [XRT_TRACKING_MAX_SLAM_CAMS])(struct xrt_frame_sink *, struct xrt_frame *) |
| Be sure to define the same number of defined functions as XRT_TRACKING_MAX_SLAM_CAMS and to add them to to euroc_recorder_receive_cam. More... | |
EuRoC dataset recorder utility.
| #define DEFINE_RECEIVE_CAM | ( | cam_id | ) |
| #define DEFINE_SAVE_CAM | ( | cam_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, and euroc_recorder::recording_btn.
| 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.
| 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 |
Be sure to define the same number of defined functions as XRT_TRACKING_MAX_SLAM_CAMS and to add them to to euroc_recorder_receive_cam.
|
static |
Be sure to define the same number of defined functions as XRT_TRACKING_MAX_SLAM_CAMS and to add them to to euroc_recorder_save_cam.