Realsense prober code.
More...
#include <stdio.h>
#include <stdlib.h>
#include "xrt/xrt_config_build.h"
#include "xrt/xrt_config_have.h"
#include "xrt/xrt_prober.h"
#include "util/u_misc.h"
#include "util/u_debug.h"
#include "rs_driver.h"
#include <librealsense2/rs.h>
|
static bool | check_error (rs2_error *e, const char *file, int line) |
| Specifies which realsense tracking to use -1 for DISABLED, will not create any RealSense device 0 for UNSPECIFIED, will decide based on what's available 1 for DEVICE_SLAM, will only try to use in-device SLAM tracking 2 for HOST_SLAM, will only try to use external SLAM tracking. More...
|
|
static void | check_slam_capabilities (rs2_device_list *device_list, int dev_idx, bool *out_hslam, bool *out_dslam) |
| Explores a realsense device to see what SLAM capabilities it supports. More...
|
|
static bool | supports_host_slam (rs2_device_list *device_list, int index) |
|
static bool | supports_device_slam (rs2_device_list *device_list, int index) |
|
static int | find_capable_device (int capability, rs2_device_list *device_list) |
|
static struct xrt_device * | create_tracked_rs_device (struct xrt_prober *xp) |
| Implements the conditional flow to decide on how to pick which tracking to use. More...
|
|
struct xrt_device * | rs_create_tracked_device_internal_slam (void) |
| Basically just for T265. More...
|
|
struct xrt_auto_prober * | rs_create_auto_prober (void) |
| Create a auto prober for rs devices. More...
|
|
◆ DO
Value: call(__VA_ARGS__, &e); \
check_error(e, __FILE__, __LINE__);
Utility for realsense API calls that can produce errors.
◆ check_error()
static bool check_error |
( |
rs2_error * |
e, |
|
|
const char * |
file, |
|
|
int |
line |
|
) |
| |
|
static |
Specifies which realsense tracking to use -1 for DISABLED, will not create any RealSense device 0 for UNSPECIFIED, will decide based on what's available 1 for DEVICE_SLAM, will only try to use in-device SLAM tracking 2 for HOST_SLAM, will only try to use external SLAM tracking.
◆ check_slam_capabilities()
static void check_slam_capabilities |
( |
rs2_device_list * |
device_list, |
|
|
int |
dev_idx, |
|
|
bool * |
out_hslam, |
|
|
bool * |
out_dslam |
|
) |
| |
|
static |
Explores a realsense device to see what SLAM capabilities it supports.
- Parameters
-
| device_list | List in which the device resides. |
| dev_idx | Index of the device in device_list . |
[out] | out_hslam | Whether it supports host-SLAM tracking (Has camera-imu streams) |
[out] | out_dslam | Whether it supports device-SLAM tracking (T26x) |
- Todo:
- Consider adding the sensors list to the rs_container
References DO.
◆ create_tracked_rs_device()
◆ find_capable_device()
static int find_capable_device |
( |
int |
capability, |
|
|
rs2_device_list * |
device_list |
|
) |
| |
|
static |
◆ rs_create_tracked_device_internal_slam()
struct xrt_device * rs_create_tracked_device_internal_slam |
( |
void |
| ) |
|