RealSense helper driver for in-device SLAM 6DOF tracking.
More...
#include "xrt/xrt_defines.h"
#include "xrt/xrt_device.h"
#include "math/m_api.h"
#include "math/m_space.h"
#include "math/m_predict.h"
#include "math/m_relation_history.h"
#include "os/os_time.h"
#include "os/os_threading.h"
#include "util/u_time.h"
#include "util/u_device.h"
#include "util/u_logging.h"
#include "util/u_json.h"
#include "util/u_config_json.h"
#include "rs_driver.h"
#include <librealsense2/rs.h>
#include <librealsense2/h/rs_pipeline.h>
#include <librealsense2/h/rs_option.h>
#include <librealsense2/h/rs_frame.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
|
struct | rs_ddev |
| Device-SLAM tracked RealSense device (T26X series). More...
|
|
◆ CHECK_RS2
Value: do { \
close_ddev(rs); \
return 1; \
} \
} while (0)
static int check_error(struct rs_ddev *rs, rs2_error *e)
Simple helper to check and print error messages.
Definition: rs_ddev.c:85
◆ print_pose
#define print_pose |
( |
|
msg, |
|
|
|
pose |
|
) |
| |
Value: U_LOG_E(msg
" %f %f %f %f %f %f %f", pose.position.x, pose.position.y, pose.position.z, pose.orientation.x, \
pose.orientation.y, pose.orientation.z, pose.orientation.w)
#define U_LOG_E(...)
Log a message at U_LOGGING_ERROR level, conditional on the global log level.
Definition: u_logging.h:410
Convenience macro to print out a pose, only used for debugging.
◆ check_error()
static int check_error |
( |
struct rs_ddev * |
rs, |
|
|
rs2_error * |
e |
|
) |
| |
|
static |
◆ close_ddev()
static void close_ddev |
( |
struct rs_ddev * |
rs | ) |
|
|
static |
◆ create_ddev()
static int create_ddev |
( |
struct rs_ddev * |
rs, |
|
|
int |
device_idx |
|
) |
| |
|
static |
Create all RealSense resources needed for 6DOF tracking.
- Todo:
- 0 index hardcoded, check device with RS2_EXTENSION_POSE_SENSOR or similar instead
References rs_container::context, and rs_ddev::rsc.
◆ process_frame()
static void process_frame |
( |
struct rs_ddev * |
rs, |
|
|
rs2_frame * |
frame |
|
) |
| |
|
static |
◆ rs_ddev()
Helper to convert a xdev to a rs_ddev.