d400-motion.h
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2015 Intel Corporation. All Rights Reserved.
3 
4 #pragma once
5 
6 #include "d400-device.h"
7 #include "ds/ds-motion-common.h"
8 #include <rsutils/lazy.h>
9 
10 namespace librealsense
11 {
12  class d400_motion_base : public virtual d400_device
13  {
14  public:
16 
17  std::shared_ptr<auto_exposure_mechanism> register_auto_exposure_options(synthetic_sensor* ep,
19 
20  private:
21  friend class ds_motion_sensor;
22  friend class ds_fisheye_sensor;
23  friend class ds_motion_common;
24 
25  std::shared_ptr< rsutils::lazy< ds::imu_intrinsic > > _accel_intrinsic;
26  std::shared_ptr< rsutils::lazy< ds::imu_intrinsic > > _gyro_intrinsic;
27  std::shared_ptr< rsutils::lazy< rs2_extrinsics > > _depth_to_imu; // Mechanical installation pose
28 
29  protected:
30  d400_motion_base( std::shared_ptr< const d400_info > const & dev_info );
31 
32  std::shared_ptr<ds_motion_common> _ds_motion_common;
33 
34  std::shared_ptr<stream_interface> _accel_stream;
35  std::shared_ptr<stream_interface> _gyro_stream;
36 
37  uint16_t _pid; // product PID
38  std::shared_ptr<mm_calib_handler> _mm_calib;
40  };
41 
43  {
44  public:
45  d400_motion( std::shared_ptr< const d400_info > const & dev_info );
46 
47  std::shared_ptr<synthetic_sensor> create_hid_device(std::shared_ptr<context> ctx,
48  const std::vector<platform::hid_device_info>& all_hid_infos,
49  const firmware_version& camera_fw_version);
51  std::shared_ptr<hid_sensor > get_raw_motion_sensor();
52 
53  protected:
54  friend class ds_motion_common;
55  friend class ds_fisheye_sensor;
56  friend class ds_motion_sensor;
57 
58 
59  private:
62 
64 
65  void initialize_fisheye_sensor(std::shared_ptr<context> ctx, const platform::backend_device_group& group);
66 
69 
70  };
71 
73  {
74  public:
75  d400_motion_uvc( std::shared_ptr< const d400_info > const & );
76 
77  std::shared_ptr<synthetic_sensor> create_uvc_device(std::shared_ptr<context> ctx,
78  const std::vector<platform::uvc_device_info>& all_uvc_infos,
79  const firmware_version& camera_fw_version);
80  };
81 }
librealsense
Definition: algo.h:18
librealsense::d400_motion_base::_depth_to_imu
std::shared_ptr< rsutils::lazy< rs2_extrinsics > > _depth_to_imu
Definition: d400-motion.h:27
librealsense::d400_motion::get_raw_motion_sensor
std::shared_ptr< hid_sensor > get_raw_motion_sensor()
Definition: d400-motion.cpp:148
rsutils::version
Definition: version.h:20
librealsense::ds_motion_common
Definition: ds-motion-common.h:117
d400-device.h
uint16_t
unsigned short uint16_t
Definition: stdint.h:79
librealsense::d400_motion_base::_motion_module_device_idx
optional_value< uint8_t > _motion_module_device_idx
Definition: d400-motion.h:39
librealsense::d400_motion::register_stream_to_extrinsic_group
void register_stream_to_extrinsic_group(const stream_interface &stream, uint32_t group_index)
Definition: d400-motion.cpp:225
librealsense::platform::backend_device_group
Definition: backend-device-group.h:50
librealsense::d400_motion::register_fisheye_metadata
void register_fisheye_metadata()
Definition: d400-motion.cpp:220
librealsense::d400_motion::_fisheye_device_idx
optional_value< uint8_t > _fisheye_device_idx
Definition: d400-motion.h:67
lazy.h
librealsense::d400_motion_base::register_auto_exposure_options
std::shared_ptr< auto_exposure_mechanism > register_auto_exposure_options(synthetic_sensor *ep, const platform::extension_unit *fisheye_xu)
librealsense::d400_motion_base::_accel_stream
std::shared_ptr< stream_interface > _accel_stream
Definition: d400-motion.h:34
rs2_motion_device_intrinsic
Motion device intrinsics: scale, bias, and variances.
Definition: rs_types.h:71
uint32_t
unsigned int uint32_t
Definition: stdint.h:80
librealsense::d400_motion::register_fisheye_options
void register_fisheye_options()
Definition: d400-motion.cpp:215
librealsense::stream_interface
Definition: stream-interface.h:13
librealsense::platform::extension_unit
Definition: platform/uvc-device.h:46
librealsense::d400_motion_base::get_motion_intrinsics
rs2_motion_device_intrinsic get_motion_intrinsics(rs2_stream) const
Definition: d400-motion.cpp:36
librealsense::d400_motion_base::d400_motion_base
d400_motion_base(std::shared_ptr< const d400_info > const &dev_info)
Definition: d400-motion.cpp:104
librealsense::ds_fisheye_sensor
Definition: ds-motion-common.h:65
librealsense::d400_motion::initialize_fisheye_sensor
void initialize_fisheye_sensor(std::shared_ptr< context > ctx, const platform::backend_device_group &group)
Definition: d400-motion.cpp:183
librealsense::d400_motion_uvc
Definition: d400-motion.h:72
librealsense::d400_motion::_motion_module_device_idx
optional_value< uint8_t > _motion_module_device_idx
Definition: d400-motion.h:68
librealsense::synthetic_sensor
Definition: sensor.h:208
librealsense::d400_motion_base::_gyro_intrinsic
std::shared_ptr< rsutils::lazy< ds::imu_intrinsic > > _gyro_intrinsic
Definition: d400-motion.h:26
librealsense::stream
Definition: src/stream.h:30
librealsense::d400_motion
Definition: d400-motion.h:42
librealsense::d400_motion::d400_motion
d400_motion(std::shared_ptr< const d400_info > const &dev_info)
Definition: d400-motion.cpp:114
librealsense::d400_motion_base
Definition: d400-motion.h:12
librealsense::ds::fisheye_xu
const platform::extension_unit fisheye_xu
Definition: ds-private.h:70
librealsense::d400_motion_base::_pid
uint16_t _pid
Definition: d400-motion.h:37
ds-motion-common.h
librealsense::d400_motion_base::_mm_calib
std::shared_ptr< mm_calib_handler > _mm_calib
Definition: d400-motion.h:38
librealsense::d400_motion_base::_accel_intrinsic
std::shared_ptr< rsutils::lazy< ds::imu_intrinsic > > _accel_intrinsic
Definition: d400-motion.h:25
librealsense::d400_motion_uvc::d400_motion_uvc
d400_motion_uvc(std::shared_ptr< const d400_info > const &)
Definition: d400-motion.cpp:154
test-projection-from-recording.ctx
ctx
Definition: test-projection-from-recording.py:16
librealsense::d400_motion_base::_ds_motion_common
std::shared_ptr< ds_motion_common > _ds_motion_common
Definition: d400-motion.h:32
librealsense::d400_motion::create_hid_device
std::shared_ptr< synthetic_sensor > create_hid_device(std::shared_ptr< context > ctx, const std::vector< platform::hid_device_info > &all_hid_infos, const firmware_version &camera_fw_version)
Definition: d400-motion.cpp:97
librealsense::d400_motion_uvc::create_uvc_device
std::shared_ptr< synthetic_sensor > create_uvc_device(std::shared_ptr< context > ctx, const std::vector< platform::uvc_device_info > &all_uvc_infos, const firmware_version &camera_fw_version)
Definition: d400-motion.cpp:41
rs2_stream
rs2_stream
Streams are different types of data provided by RealSense devices.
Definition: rs_sensor.h:43
librealsense::optional_value< uint8_t >
librealsense::d400_motion_base::_gyro_stream
std::shared_ptr< stream_interface > _gyro_stream
Definition: d400-motion.h:35
librealsense::d400_motion::get_motion_sensor
ds_motion_sensor & get_motion_sensor()
Definition: d400-motion.cpp:143
librealsense::ds_motion_sensor
Definition: ds-motion-common.h:81
librealsense::d400_device
Definition: d400-device.h:26


librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Fri Aug 2 2024 08:30:02