46 rs400_device( std::shared_ptr< const d400_info >
const & dev_info,
bool register_device_notifications )
47 :
device( dev_info, register_device_notifications )
61 std::vector<tagged_profile> tags;
85 rs405u_device( std::shared_ptr< const d400_info >
const & dev_info,
bool register_device_notifications )
86 :
device(dev_info, register_device_notifications),
98 std::vector<tagged_profile> tags;
119 for (
auto request : others)
121 if (
a->get_framerate() != 0 && request.fps != 0 && (
a->get_framerate() != request.fps))
136 rs410_device( std::shared_ptr< const d400_info >
const & dev_info,
bool register_device_notifications )
137 :
device( dev_info, register_device_notifications )
152 std::vector<tagged_profile> tags;
175 rs415_device( std::shared_ptr< const d400_info >
const & dev_info,
bool register_device_notifications )
176 :
device( dev_info, register_device_notifications )
192 std::vector<tagged_profile> tags;
216 rs416_device( std::shared_ptr< const d400_info >
const & dev_info,
bool register_device_notifications )
217 :
device( dev_info, register_device_notifications )
232 std::vector<tagged_profile> tags;
251 for (
auto request : others)
253 if (
a->get_framerate() != 0 && request.fps != 0 && (
a->get_framerate() != request.fps))
270 rs416_rgb_device( std::shared_ptr< const d400_info >
const & dev_info,
bool register_device_notifications )
271 :
device( dev_info, register_device_notifications )
287 std::vector<tagged_profile> tags;
308 for (
auto request : others)
310 if (
a->get_framerate() != 0 && request.fps != 0 && (
a->get_framerate() != request.fps))
324 rs420_mm_device( std::shared_ptr< const d400_info >
const & dev_info,
bool register_device_notifications )
325 :
device( dev_info, register_device_notifications )
339 std::vector<tagged_profile> tags;
372 rs420_device( std::shared_ptr< const d400_info >
const & dev_info,
bool register_device_notifications )
373 :
device( dev_info, register_device_notifications )
386 std::vector<tagged_profile> tags;
410 rs430_device( std::shared_ptr< const d400_info >
const & dev_info,
bool register_device_notifications )
411 :
device( dev_info, register_device_notifications )
425 std::vector<tagged_profile> tags;
449 rs430i_device( std::shared_ptr< const d400_info >
const & dev_info,
bool register_device_notifications )
450 :
device( dev_info, register_device_notifications )
463 std::vector<tagged_profile> tags;
493 rs430_mm_device( std::shared_ptr< const d400_info >
const & dev_info,
bool register_device_notifications )
494 :
device( dev_info, register_device_notifications )
509 std::vector<tagged_profile> tags;
544 rs435_device( std::shared_ptr< const d400_info >
const & dev_info,
bool register_device_notifications )
545 :
device( dev_info, register_device_notifications )
560 std::vector<tagged_profile> tags;
586 rs457_device( std::shared_ptr< const d400_info >
const & dev_info,
bool register_device_notifications )
587 :
device( dev_info, register_device_notifications )
603 std::vector<tagged_profile> tags;
620 rs430_rgb_mm_device( std::shared_ptr< const d400_info >
const & dev_info,
bool register_device_notifications )
621 :
device( dev_info, register_device_notifications )
637 std::vector<tagged_profile> tags;
663 rs435i_device( std::shared_ptr< const d400_info >
const & dev_info,
bool register_device_notifications )
664 :
device( dev_info, register_device_notifications )
685 std::vector<tagged_profile> tags;
693 int fps = usb3mode ? 30 : 15;
708 for(
auto iter = 0,
rec =0; iter < 2; iter++,
rec++)
710 std::vector< uint8_t > cal;
734 auto table = ds::check_calib<ds::d400_rgb_calibration_table>(raw_data);
741 for (
auto i = 0;
i < 3;
i++)
744 if (!std::isfinite(trans_vector[
i]))
746 LOG_WARNING(
"RGB extrinsic - translation is corrupted: " << trans_vector);
750 if (std::fabs(trans_vector[
i]) > std::numeric_limits<float>::epsilon())
756 LOG_WARNING(
"RGB extrinsic - invalid (zero) translation: " << trans_vector);
763 for (
auto i = 0;
i < 3;
i++)
765 for (
auto j = 0;
j < 3;
j++)
768 if (!std::isfinite(rect_rot_mat(
i,
j)))
770 LOG_DEBUG(
"RGB extrinsic - rotation matrix corrupted:\n" << rect_rot_mat);
774 if (std::fabs(rect_rot_mat(
i,
j)) > std::numeric_limits<float>::epsilon())
779 bool res = (num_found >= 3);
781 LOG_DEBUG(
"RGB extrinsic - rotation matrix invalid:\n" << rect_rot_mat);
788 <<
"Version: " <<std::setfill(
'0') << std::setw(4) << std::hex <<
table->header.version
789 <<
", type " << std::dec <<
table->header.table_type <<
", size " <<
table->header.table_size);
811 <<
"Device memory read failed. max size: "
813 <<
", requested: " <<
int(
size ) );
833 LOG_WARNING(
"invalid RGB extrinsic was identified, recovery routine was invoked");
844 const uint32_t gold_address = 0x17c49c;
845 const uint16_t bytes_to_read = 0x100;
846 auto alt_calib =
read_sector(gold_address, bytes_to_read);
859 LOG_WARNING(
"RGB stream extrinsic successfully recovered");
866 LOG_ERROR(
"RGB Extrinsic recovery routine failed");
872 LOG_ERROR(
"RGB Extrinsic recovery routine failed");
882 rs400_imu_device( std::shared_ptr< const d400_info >
const & dev_info,
bool register_device_notifications )
883 :
device( dev_info, register_device_notifications )
897 std::vector<tagged_profile> tags;
912 rs405_device( std::shared_ptr< const d400_info >
const & dev_info,
bool register_device_notifications )
913 :
device( dev_info, register_device_notifications )
928 std::vector<tagged_profile> tags;
936 int fps = usb3mode ? 30 : 10;
966 auto it = std::find_if(others.begin(), others.end(), [](
const stream_profile& sp) {
967 return sp.format == RS2_FORMAT_Y16;
969 bool unrectified_ir_requested = (
it != others.end());
973 for (
auto request : others)
975 if (
a->get_framerate() != 0 && request.fps != 0 && (
a->get_framerate() != request.fps))
977 if (!unrectified_ir_requested)
979 if (vid_a->get_width() != 0 && request.width != 0 && (vid_a->get_width() != request.width))
981 if (vid_a->get_height() != 0 && request.height != 0 && (vid_a->get_height() != request.height))
999 rs455_device( std::shared_ptr< const d400_info >
const & dev_info,
bool register_device_notifications )
1000 :
device( dev_info, register_device_notifications )
1021 std::vector<tagged_profile> tags;
1029 int fps = usb3mode ? 30 : 15;
1050 throw std::runtime_error(
"Depth Camera not found!");
1052 auto const dev_info = std::dynamic_pointer_cast< const d400_info >( shared_from_this() );
1053 bool const register_device_notifications =
true;
1059 return std::make_shared< rs400_device >( dev_info, register_device_notifications );
1061 return std::make_shared< rs405u_device >( dev_info, register_device_notifications );
1064 return std::make_shared< rs410_device >( dev_info, register_device_notifications );
1066 return std::make_shared< rs415_device >( dev_info, register_device_notifications );
1068 return std::make_shared< rs416_device >( dev_info, register_device_notifications );
1070 return std::make_shared< rs416_rgb_device >( dev_info, register_device_notifications );
1072 return std::make_shared< rs420_device >( dev_info, register_device_notifications );
1074 return std::make_shared< rs420_mm_device >( dev_info, register_device_notifications );
1076 return std::make_shared< rs430_device >( dev_info, register_device_notifications );
1078 return std::make_shared< rs430i_device >( dev_info, register_device_notifications );
1080 return std::make_shared< rs430_mm_device >( dev_info, register_device_notifications );
1082 return std::make_shared< rs430_rgb_mm_device >( dev_info, register_device_notifications );
1084 return std::make_shared< rs435_device >( dev_info, register_device_notifications );
1086 return std::make_shared< rs435i_device >( dev_info, register_device_notifications );
1088 return std::make_shared< rs410_device >( dev_info, register_device_notifications );
1090 return std::make_shared< rs400_imu_device >( dev_info, register_device_notifications );
1092 return std::make_shared< rs405_device >( dev_info, register_device_notifications );
1094 return std::make_shared< rs455_device >( dev_info, register_device_notifications );
1096 return std::make_shared< rs457_device >( dev_info, register_device_notifications );
1099 << std::setw( 4 ) << std::setfill(
'0' ) << (
int)
pid );
1104 std::shared_ptr<context>
ctx,
1107 std::vector<platform::uvc_device_info> chosen;
1108 std::vector<std::shared_ptr<d400_info>> results;
1113 for (
auto&
g : group_devices)
1116 auto& hids =
g.second;
1122 bool is_device_multisensor =
false;
1125 if (is_pid_of_multisensor_device(uvc.pid))
1126 is_device_multisensor =
true;
1129 if(is_device_multisensor)
1133 all_sensors_present =
true;
1137 #if !defined(__APPLE__) // Not supported by macos
1140 bool is_device_hid_sensor =
false;
1143 if (is_pid_of_hid_sensor_device(uvc.pid))
1144 is_device_hid_sensor =
true;
1149 if (is_device_hid_sensor)
1151 all_sensors_present &= (hids.size() >= 2);
1155 if (!
devices.empty() && all_sensors_present)
1159 std::vector<platform::usb_device_info> hwm_devices;
1162 hwm_devices.push_back(hwm);
1165 auto info = std::make_shared<d400_info>(
ctx, std::move(
devices ), std::move( hwm_devices ), std::move( hids ) );
1167 results.push_back(
info);
1180 return std::make_shared<timestamp_composite_matcher>(matchers);
1185 std::vector<stream_interface*>
streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get()};
1191 std::vector<stream_interface*>
streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get()};
1197 std::vector<stream_interface*>
streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get()};
1203 std::vector<stream_interface*>
streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get(), _color_stream.get() };
1209 std::vector<stream_interface*>
streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get() };
1215 std::vector<stream_interface*>
streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get(), _color_stream.get() };
1222 std::vector<stream_interface*>
streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get()};
1223 std::vector<stream_interface*> mm_streams = {
1224 _ds_motion_common->get_fisheye_stream().get(),
1225 _ds_motion_common->get_accel_stream().get(),
1226 _ds_motion_common->get_gyro_stream().get()
1228 streams.insert(
streams.end(), mm_streams.begin(), mm_streams.end());
1234 std::vector<stream_interface*>
streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get()};
1240 std::vector<stream_interface*>
streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get() };
1247 std::vector<stream_interface*>
streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get() };
1248 std::vector<stream_interface*> mm_streams = {
1249 _ds_motion_common->get_fisheye_stream().get(),
1250 _ds_motion_common->get_accel_stream().get(),
1251 _ds_motion_common->get_gyro_stream().get()
1253 streams.insert(
streams.end(), mm_streams.begin(), mm_streams.end());
1259 std::vector<stream_interface*>
streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get(), _color_stream.get() };
1266 std::vector<stream_interface*>
streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get(), _color_stream.get() };
1267 std::vector<stream_interface*> mm_streams = {
1268 _ds_motion_common->get_fisheye_stream().get(),
1269 _ds_motion_common->get_accel_stream().get(),
1270 _ds_motion_common->get_gyro_stream().get()
1272 streams.insert(
streams.end(), mm_streams.begin(), mm_streams.end());
1278 std::vector<stream_interface*>
streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get() };
1280 std::vector<stream_interface*> mm_streams = { _ds_motion_common->get_accel_stream().get(),
1281 _ds_motion_common->get_gyro_stream().get() };
1282 streams.insert(
streams.end(), mm_streams.begin(), mm_streams.end());
1288 std::vector<stream_interface*>
streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get(), _color_stream.get() };
1290 std::vector<stream_interface*> mm_streams = { _ds_motion_common->get_accel_stream().get(),
1291 _ds_motion_common->get_gyro_stream().get()};
1292 streams.insert(
streams.end(), mm_streams.begin(), mm_streams.end());
1299 std::vector<stream_interface*>
streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get(), _color_stream.get() };
1300 std::vector<stream_interface*> mm_streams = { _accel_stream.get(), _gyro_stream.get()};
1301 streams.insert(
streams.end(), mm_streams.begin(), mm_streams.end());
1312 std::vector<stream_interface*> mm_streams = { _ds_motion_common->get_accel_stream().get(),
1313 _ds_motion_common->get_gyro_stream().get()};
1319 std::vector<stream_interface*>
streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get(), _color_stream.get() };
1325 std::vector<stream_interface*>
streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get(), _color_stream.get() };
1326 std::vector<stream_interface*> mm_streams = { _ds_motion_common->get_accel_stream().get(),
1327 _ds_motion_common->get_gyro_stream().get()};
1328 streams.insert(
streams.end(), mm_streams.begin(), mm_streams.end());