Monado OpenXR Runtime
rs_interface.h
Go to the documentation of this file.
1// Copyright 2020, Collabora, Ltd.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Interface to RealSense devices.
6 * @author Jakob Bornecrantz <jakob@collabora.com>
7 * @ingroup drv_realsense
8 */
9
10#pragma once
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
17
18/*!
19 * @defgroup drv_realsense Intel RealSense driver
20 * @ingroup drv
21 *
22 * @brief Driver for the SLAM-capable Intel Realsense devices.
23 */
24
25#define REALSENSE_MOVIDIUS_VID 0x03E7
26#define REALSENSE_MOVIDIUS_PID 0x2150
27
28#define REALSENSE_TM2_VID 0x8087
29#define REALSENSE_TM2_PID 0x0B37
30
31#define RS_TRACKING_DISABLED -1
32#define RS_TRACKING_UNSPECIFIED 0
33#define RS_TRACKING_DEVICE_SLAM 1
34#define RS_TRACKING_HOST_SLAM 2
35
36/*!
37 * Create a auto prober for rs devices.
38 *
39 * @ingroup drv_realsense
40 */
41struct xrt_auto_prober *
43
44/*!
45 * Creates a RealSense SLAM source from the appropriate @p device_idx.
46 * The streaming configuration is loaded from the global config file.
47 *
48 * @param xfctx Frame context this frameserver lifetime is tied to.
49 * @param device_idx Index of the realsense device to use. Usually 0 if you only
50 * have one RealSense device.
51 * @return Frameserver with SLAM streaming capabilities.
52 */
53struct xrt_fs *
54rs_source_create(struct xrt_frame_context *xfctx, int device_idx);
55
56/*!
57 * Creates an xrt_device that exposes the onboard tracking of a Realsense device
58 * (ie. probably a T265)
59 * @return An xrt_device that you can call get_tracked_pose on with XRT_INPUT_GENERIC_TRACKER_POSE
60 */
61struct xrt_device *
63
64/*!
65 * @dir drivers/realsense
66 *
67 * @brief @ref drv_realsense files.
68 */
69
70
71#ifdef __cplusplus
72}
73#endif
struct xrt_auto_prober * rs_create_auto_prober(void)
Create a auto prober for rs devices.
Definition: rs_prober.c:274
struct xrt_fs * rs_source_create(struct xrt_frame_context *xfctx, int device_idx)
Creates a RealSense SLAM source from the appropriate device_idx.
Definition: rs_hdev.c:1036
struct xrt_device * rs_create_tracked_device_internal_slam(void)
Creates an xrt_device that exposes the onboard tracking of a Realsense device (ie.
Definition: rs_prober.c:229
An interface to be exposed by a device driver that should probe for the existence of its own device o...
Definition: xrt_prober.h:761
A single HMD or input device.
Definition: xrt_device.h:241
Object used to track all sinks and frame producers in a graph.
Definition: xrt_frame.h:108
Frameserver that generates frames.
Definition: xrt_frameserver.h:70