42 const std::vector<platform::uvc_device_info>& all_uvc_infos,
45 if (all_uvc_infos.empty())
47 LOG_WARNING(
"No UVC info provided, IMU is disabled");
51 std::vector<std::shared_ptr<platform::uvc_device>> imu_devices;
55 std::unique_ptr< frame_timestamp_reader > timestamp_reader_backup(
new ds_timestamp_reader() );
58 auto enable_global_time_option = std::shared_ptr<global_time_option>(
new global_time_option());
60 auto raw_motion_ep = std::make_shared<uvc_sensor>(
"Raw IMU Sensor", std::make_shared<platform::multi_pins_uvc_device>(imu_devices),
63 auto motion_ep = std::make_shared<ds_motion_sensor>(
"Motion Module", raw_motion_ep,
this,
69 std::shared_ptr<enable_motion_correction> mm_correct_opt =
nullptr;
76 mm_correct_opt = std::make_shared<enable_motion_correction>(motion_ep.get(),
86 motion_ep->register_processing_block(
89 [&, mm_correct_opt, gyro_scale_factor]()
90 {
return std::make_shared< motion_to_accel_gyro >(
_mm_calib, mm_correct_opt, gyro_scale_factor );
98 const std::vector<platform::hid_device_info>& all_hid_infos,
121 std::vector<platform::hid_device_info> hid_infos = dev_info->get_group().hid_devices;
151 return std::dynamic_pointer_cast< hid_sensor >( raw_sensor );
161 std::vector<platform::uvc_device_info> uvc_infos = dev_info->get_group().uvc_devices;
165 if (!uvc_infos.empty())
168 _pid = uvc_infos.front().pid;
172 std::shared_ptr<synthetic_sensor> sensor_ep;
187 bool is_fisheye_avaialable =
false;
188 auto fisheye_infos =
_ds_motion_common->init_fisheye(group, is_fisheye_avaialable);
189 if (!is_fisheye_avaialable)
192 std::unique_ptr< frame_timestamp_reader > ds_timestamp_reader_backup(
new ds_timestamp_reader() );
194 auto enable_global_time_option = std::shared_ptr<global_time_option>(
new global_time_option());
196 = std::make_shared< uvc_sensor >(
"FishEye Sensor",
199 std::move( ds_timestamp_reader_metadata ),
201 enable_global_time_option ) ),
203 auto fisheye_ep = std::make_shared<ds_fisheye_sensor>(raw_fisheye_ep,
this);
205 _ds_motion_common->assign_fisheye_ep(raw_fisheye_ep, fisheye_ep, enable_global_time_option);
207 register_fisheye_options();
209 register_fisheye_metadata();