4 #define _USE_MATH_DEFINES 24 {{1920, 1080}, {2,5,15,30}},
25 {{1280, 720}, {2,5,15,30}},
26 {{ 960, 540}, {2,5,15,30,60}},
27 {{ 848, 480}, {2,5,15,30,60}},
28 {{ 640, 480}, {2,5,15,30,60}},
29 {{ 640, 360}, {2,5,15,30,60}},
30 {{ 424, 240}, {2,5,15,30,60}},
31 {{ 320, 240}, {2,5,15,30,60}},
32 {{ 320, 180}, {2,5,15,30,60}}
35 {{640, 480}, {2,5,15,30,60}},
36 {{640, 240}, {2,5,15,30,60}}
39 {{640, 480}, {30,60,120,240,300}},
40 {{640, 240}, {30,60,120,240,300}}
45 LOG_INFO(
"Connecting to Intel RealSense F200");
48 info.
name =
"Intel RealSense F200";
52 for(
auto &
m : f200_color_modes)
63 for(
auto &
m : f200_ir_only_modes)
70 for(
auto &
m : f200_depth_modes)
103 info.
stream_poses[
RS_STREAM_COLOR] = {{{1,0,0},{0,1,0},{0,0,1}}, {0,0,0}};
113 base_temperature_data(temp),
115 last_temperature_delta(
std::numeric_limits<float>::infinity())
140 if (TempThreshold <= 0) TempThreshold = tempFromHFOV;
141 if (TempThreshold > tempFromHFOV) TempThreshold = tempFromHFOV;
158 double IrTempDelta = IRTemp - IrBaseTemperature;
159 double liguriaTempDelta = LiguriaTemp - liguriaBaseTemperature;
168 if (tempDeltaFromLastFix >= TempThreshold)
171 double tempDeltaToUse = weightedTempDelta;
183 compensated_calibration.
Kc[0][0] = (float) fixed_Kc11;
184 compensated_calibration.Kc[1][1] =
base_calibration.
Kc[1][1] * (float)(fixed_Kc11/Kc11);
185 compensated_calibration.Kc[0][2] = (float) fixed_Kc13;
188 LOG_INFO(
"updating asic with new temperature calibration coefficients");
193 catch(
const std::exception &
e) {
LOG_ERROR(
"TemperatureControlLoop: " << e.what()); }
199 throw std::logic_error(
"Not implemented");
203 throw std::logic_error(
"Not implemented");
208 std::vector<rs_option> base_opt;
209 std::vector<double> base_opt_val;
212 for(
size_t i=0; i<
count; ++i)
218 default: base_opt.push_back(options[i]); base_opt_val.push_back(values[i]);
break;
223 if (!base_opt.empty())
229 std::vector<rs_option> base_opt;
230 std::vector<size_t> base_opt_index;
231 std::vector<double> base_opt_val;
233 for (
size_t i = 0; i<
count; ++i)
235 LOG_INFO(
"Reading option " << options[i]);
249 default: base_opt.push_back(options[i]); base_opt_index.push_back(i);
break;
256 base_opt_val.resize(base_opt.size());
261 for (
auto i : base_opt_index)
262 values[i] = base_opt_val[i];
267 std::timed_mutex mutex;
285 return std::make_shared<f200_camera>(
device, info, std::get<0>(calib), std::get<1>(calib), std::get<2>(calib));
virtual void stop_fw_logger() override
const std::vector< std::pair< rs_option, char > > eu_F200_depth_controls
void update_asic_coefficients(uvc::device &device, std::timed_mutex &mutex, const ivcam::camera_calib_params &compensated_params)
int num_libuvc_transfer_buffers
static void update_device_info(rsimpl::static_device_info &info)
const std::shared_ptr< rsimpl::uvc::device > device
const rsimpl::uvc::device & get_device() const
std::mutex temperatureMutex
std::thread temperatureThread
pose stream_poses[RS_STREAM_NATIVE_COUNT]
void set_dynamic_fps(uvc::device &device, uint8_t dynamic_fps)
int read_ir_temp(uvc::device &device, std::timed_mutex &mutex)
f200::cam_temperature_data base_temperature_data
rs_option
Defines general configuration controls.
ivcam::camera_calib_params base_calibration
std::vector< subdevice_mode > subdevice_modes
std::condition_variable temperatureCv
stream_request presets[RS_STREAM_NATIVE_COUNT][RS_PRESET_COUNT]
virtual void start_fw_logger(char fw_log_op_code, int grab_rate_in_ms, std::timed_mutex &mutex) override
float last_temperature_delta
float nominal_depth_scale
int stream_subdevices[RS_STREAM_NATIVE_COUNT]
void set_options(const rs_option options[], size_t count, const double values[]) override
void get_dynamic_fps(const uvc::device &device, uint8_t &dynamic_fps)
f200_camera(std::shared_ptr< uvc::device > device, const static_device_info &info, const ivcam::camera_calib_params &calib, const f200::cam_temperature_data &temp, const f200::thermal_loop_params ¶ms)
rs_intrinsics MakeDepthIntrinsics(const ivcam::camera_calib_params &c, const int2 &dims)
GLuint GLuint GLsizei count
std::timed_mutex usbMutex
void get_module_serial_string(uvc::device &device, std::timed_mutex &mutex, std::string &serial, int offset)
static const cam_mode f200_ir_only_modes[]
static static_device_info get_f200_info(std::shared_ptr< uvc::device >, const ivcam::camera_calib_params &c)
std::vector< supported_option > options
rs_intrinsics MakeColorIntrinsics(const ivcam::camera_calib_params &c, const int2 &dims)
std::shared_ptr< rs_device > make_f200_device(std::shared_ptr< uvc::device > device)
void get_options(const rs_option options[], size_t count, double values[]) override
float read_mems_temp(uvc::device &device, std::timed_mutex &mutex)
const native_pixel_format pf_f200_inzi
void set_options(const rs_option options[], size_t count, const double values[]) override
void get_firmware_version_string(uvc::device &device, std::timed_mutex &mutex, std::string &version, int gvd_cmd, int offset)
GLenum GLsizei GLsizei GLint * values
float IRThermalLoopEnable
pose inverse(const pose &a)
static const cam_mode f200_color_modes[]
std::tuple< ivcam::camera_calib_params, cam_temperature_data, thermal_loop_params > read_f200_calibration(uvc::device &device, std::timed_mutex &mutex)
int get_pu_control_with_retry(const device &device, int subdevice, rs_option option)
void enable_timestamp(uvc::device &device, std::timed_mutex &mutex, bool colorEnable, bool depthEnable)
void temperature_control_loop()
static const cam_mode f200_depth_modes[]
float3x3 transpose(const float3x3 &a)
std::atomic< bool > runTemperatureThread
const native_pixel_format pf_yuy2
bool is_pu_control(rs_option option)
void claim_ivcam_interface(uvc::device &device)
const native_pixel_format pf_f200_invi
void get_options(const rs_option options[], size_t count, double values[]) override
const native_pixel_format pf_invz