7 #include "../backend.h" 32 std::vector<std::pair<std::string, stream_profile>> l500_sensor_name_and_hid_profiles =
41 std::map<rs2_stream, std::map<unsigned, unsigned>> l500_fps_and_sampling_frequency_per_rs2_stream =
54 std::shared_ptr<sensor_base>
sensor,
71 for (
auto p : results)
84 auto st =
p->get_stream_type();
98 if (all_hid_infos.empty())
100 LOG_WARNING(
"No HID info provided, IMU is disabled");
106 auto enable_global_time_option = std::shared_ptr<global_time_option>(
new global_time_option());
107 auto raw_hid_ep = std::make_shared<hid_sensor>(ctx->get_backend().create_hid_device(all_hid_infos.front()),
110 l500_fps_and_sampling_frequency_per_rs2_stream,
111 l500_sensor_name_and_hid_profiles,
114 auto hid_ep = std::make_shared<l500_hid_sensor>(
"Motion Module", raw_hid_ep,
this,
this);
121 std::shared_ptr<enable_motion_correction> mm_correct_opt =
nullptr;
129 mm_correct_opt = std::make_shared<enable_motion_correction>(hid_ep.get(),
option_range{ 0, 1, 1, 1 });
135 hid_ep->register_processing_block(
138 [&, mm_correct_opt]() {
return std::make_shared<acceleration_transform>(_mm_calib, mm_correct_opt); }
141 hid_ep->register_processing_block(
144 [&, mm_correct_opt]() {
return std::make_shared<gyroscope_transform>(_mm_calib, mm_correct_opt); }
154 std::vector<platform::hid_device_info> hid_infos = group.
hid_devices;
156 if (!hid_infos.empty())
159 _pid =
static_cast<uint16_t>(strtoul(hid_infos.front().pid.data(),
nullptr, 16));
187 std::vector<tagged_profile>
tags;
std::shared_ptr< hw_monitor > _hw_monitor
static const textual_icon lock
std::shared_ptr< lazy< rs2_extrinsics > > _depth_to_imu
GLuint const GLchar * name
stream_profiles init_stream_profiles() override
std::vector< tagged_profile > get_profiles_tags() const override
virtual stream_profiles init_stream_profiles() override
std::shared_ptr< lazy< ds::imu_intrinsic > > _accel_intrinsic
void register_same_extrinsics(const stream_interface &from, const stream_interface &to)
GLsizei const GLchar *const * string
std::shared_ptr< stream_interface > _depth_stream
l500_hid_sensor(std::string name, std::shared_ptr< sensor_base > sensor, device *device, l500_motion *owner)
std::shared_ptr< stream_interface > _gyro_stream
std::vector< std::pair< std::string, stream_profile > > l500_sensor_name_and_hid_profiles
void register_extrinsics(const stream_interface &from, const stream_interface &to, std::weak_ptr< lazy< rs2_extrinsics >> extr)
std::map< rs2_stream, std::map< unsigned, unsigned > > l500_fps_and_sampling_frequency_per_rs2_stream
std::shared_ptr< lazy< ds::imu_intrinsic > > _gyro_intrinsic
std::shared_ptr< mm_calib_handler > _mm_calib
std::shared_ptr< synthetic_sensor > create_hid_device(std::shared_ptr< context > ctx, const std::vector< platform::hid_device_info > &all_hid_infos)
const l500_motion * _owner
std::vector< std::shared_ptr< stream_profile_interface >> stream_profiles
rs2_stream
Streams are different types of data provided by RealSense devices.
static environment & get_instance()
int add_sensor(const std::shared_ptr< sensor_interface > &sensor_base)
extrinsics_graph & get_extrinsics_graph()
const char * rs2_stream_to_string(rs2_stream stream)
void assign_stream(const std::shared_ptr< stream_interface > &stream, std::shared_ptr< stream_profile_interface > target) const
l500_motion(std::shared_ptr< context > ctx, const platform::backend_device_group &group)
typename::boost::move_detail::remove_reference< T >::type && move(T &&t) BOOST_NOEXCEPT
void register_stream_to_extrinsic_group(const stream_interface &stream, uint32_t groupd_index)
rs2_motion_device_intrinsic get_motion_intrinsics(rs2_stream stream) const
Motion device intrinsics: scale, bias, and variances.
std::shared_ptr< stream_interface > _accel_stream
std::shared_ptr< md_attribute_parser_base > make_hid_header_parser(Attribute St::*attribute, attrib_modifyer mod=nullptr)
A utility function to create HID metadata header parser.
rs2_motion_device_intrinsic get_motion_intrinsics(rs2_stream stream) const
optional_value< uint8_t > _motion_module_device_idx
std::string to_string(T value)
rs2_motion_device_intrinsic create_motion_intrinsics(imu_intrinsic data)