21 #ifndef SENSORCAPTURE_DEF_HPP
22 #define SENSORCAPTURE_DEF_HPP
24 #define DEFAULT_GRAVITY (9.8189f)
25 #define ACC_SCALE (DEFAULT_GRAVITY*(8.0f/32768.0f))
26 #define GYRO_SCALE (1000.0f/32768.0f)
27 #define MAG_SCALE (1.0f/16.0f)
28 #define TEMP_SCALE (0.01f)
29 #define PRESS_SCALE_NEW (0.0001f)
30 #define PRESS_SCALE_OLD (0.01f)
31 #define HUMID_SCALE_NEW (0.01f)
32 #define HUMID_SCALE_OLD (1.0f/1024.0f)
34 #define TS_SCALE (39062.5f)
35 #define TEMP_NOT_VALID (-27315)
155 return (version_current >=
static_cast<int>(version_required));
165 return (version_current >=
static_cast<int>(version_required));
170 #define NTP_ADJUST_CT 1
185 return std::string();
189 std::wstring ws( wstr );
190 std::string str( ws.begin(), ws.end() );
195 std::cerr <<
"Failure reading USB data. Please install the udev rules available in the `udev` folder" << std::endl;
199 return std::string();
CUSTOMHID_REQUEST_ID
USB HID requests IDs.
@ RQ_CMD_PING
Command to ping the MCU to communicate that host is alive.
@ OV580_CMD_RESET
Command to reset the OV580 using the MCU.
@ RQ_CMD_RST
Command to reset the MCU.
struct sl_oc::sensors::usb::_ov580_cmd_struct OV580CmdStruct
OV580 control using the MCU.
CUSTOMHID_REPORT_ID
USB HID communication report IDs.
@ REP_ID_SENSOR_STREAM_STATUS
Stream Status report ID.
@ REP_ID_OV580_CMD
OV580 control request.
@ REP_ID_REQUEST_SET
USB Request report ID.
@ REP_ID_SENSOR_DATA
Sensor data report ID.
struct sl_oc::sensors::usb::StreamStatus StreamStatus
Status of the usb data streaming.
struct sl_oc::sensors::usb::RawData RawData
The RAW sensor data structure retrieved from camera MCU by USB.
const size_t TS_SHIFT_VAL_COUNT
Number of sensor data to use to update timestamp scaling.
bool atLeast(const int &version_current, const ZED_2_FW &version_required)
Check firmware version for ZED2 camera.
@ FW_2_4
ZED Mini v2.4 (not released)
std::string wstr2str(const wchar_t *wstr)
Convert a wchar array to std::string.
OV580 control using the MCU.
uint8_t cmd
command to be sent to OV580: OV580_RESET
uint8_t struct_id
struct identifier for HID comm
The RAW sensor data structure retrieved from camera MCU by USB.
int16_t imu_temp
Temperature from the IMU sensor [0.01 °C].
int16_t temp
Temperature [0.01 °C].
int16_t aX
Raw Accelerometer X.
uint64_t timestamp
Data timestamp (from IMU sensor) [usec/39].
int16_t gX
Raw Gyroscope X.
int16_t temp_cam_left
Temperature of the left camera sensor [0.01 °C].
uint8_t camera_moving
Indicate if the camera is moving (uses BMI internal HW)
int16_t aY
Raw Accelerometer Y.
uint32_t press
Pressure [0.01 hPa].
uint32_t frame_sync_count
Counts the number of synced frames.
int16_t temp_cam_right
Temperature of the right camera sensor [0.01 °C].
uint8_t sync_capabilities
Indicates if frame synchronization is active.
uint32_t humid
Relative humidity [1.0/1024.0 rH].
uint8_t imu_not_valid
Indicate if IMU data are valid [0->valid, 1->not_valid].
uint8_t frame_sync
Indicates if data are synced to a camera frame.
uint32_t camera_moving_count
Counts the number of camera moving interrupts.
uint8_t struct_id
Struct identifier, it matches the USB HID Report ID.
int16_t mZ
Raw Magnetometer Z.
int16_t mX
Raw Magnetometer X.
uint32_t camera_falling_count
Counts the number of camera falling interrupts.
int16_t aZ
Raw Accelerometer Z.
int16_t gZ
Raw Gyroscope Z.
int16_t gY
Raw Gyroscope Y.
uint8_t camera_falling
Indicate if the camera is free falling (uses BMI internal HW)
uint8_t env_valid
Indicate if Environmental data are valid (put to ENV_SENS_NOT_PRESENT if no environmental sensor is p...
uint8_t mag_valid
Indicates if Magnetometer data are valid (put to 0 if no magnetometer is present)
int16_t mY
Raw Magnetometer Y.
Status of the usb data streaming.
uint8_t stream_status
Status of the USB streaming.
uint8_t struct_id
Struct identifier, it matches the USB HID Report ID.