![]()  | 
  
    ZED Open Capture
    v0.6.0
    
   Low level camera driver for the ZED stereo camera family 
   | 
 
The SensorCapture class provides sensor grabbing functions for the Stereolabs ZED Mini and ZED2 camera models. More...
#include <sensorcapture.hpp>
Public Member Functions | |
| SensorCapture (sl_oc::VERBOSITY verbose_lvl=sl_oc::VERBOSITY::ERROR) | |
| The default constructor.  More... | |
| virtual | ~SensorCapture () | 
| The class destructor.  More... | |
| std::vector< int > | getDeviceList (bool refresh=false) | 
| Get the list of the serial number of all the available devices.  More... | |
| bool | initializeSensors (int sn=-1) | 
| Open a connection to the MCU of a ZED Mini or a ZED2 camera using the specified serial number or searching for the first available device.  More... | |
| void | getFirmwareVersion (uint16_t &fw_major, uint16_t &fw_minor) | 
| Get the MCU firmware version in form [fw_major].[fw_minor].  More... | |
| int | getSerialNumber () | 
| Retrieve the serial number of the connected camera.  More... | |
| const data::Imu & | getLastIMUData (uint64_t timeout_usec=1500) | 
| Get the last received IMU data.  More... | |
| const data::Magnetometer & | getLastMagnetometerData (uint64_t timeout_usec=100) | 
| Get the last received Magnetometer data.  More... | |
| const data::Environment & | getLastEnvironmentData (uint64_t timeout_usec=100) | 
| Get the last received Environment data.  More... | |
| const data::Temperature & | getLastCameraTemperatureData (uint64_t timeout_usec=100) | 
| Get the last received camera sensors temperature data.  More... | |
| void | updateTimestampOffset (uint64_t frame_ts) | 
| Called by VideoCapture to update timestamp offset.  More... | |
| void | setStartTimestamp (uint64_t start_ts) | 
| Called by VideoCapture to sync timestamps reference point.  More... | |
| void | setVideoPtr (video::VideoCapture *videoPtr) | 
| Called by VideoCapture to set the pointer to it.  More... | |
Static Public Member Functions | |
| static bool | resetSensorModule (int serial_number=0) | 
| Perform a SW reset of the Sensors Module. To be called in case one of the sensors stops to work correctly.  More... | |
| static bool | resetVideoModule (int serial_number=0) | 
| Perform a reset of the video module without resetting the sensor module. To be called in case the Video module stops to work correctly.  More... | |
The SensorCapture class provides sensor grabbing functions for the Stereolabs ZED Mini and ZED2 camera models.
Definition at line 132 of file sensorcapture.hpp.
| sl_oc::sensors::SensorCapture::SensorCapture | ( | sl_oc::VERBOSITY | verbose_lvl = sl_oc::VERBOSITY::ERROR | ) | 
The default constructor.
| verbose_lvl | enable useful information to debug the class behaviours while running | 
Definition at line 36 of file sensorcapture.cpp.
      
  | 
  virtual | 
| std::vector< int > sl_oc::sensors::SensorCapture::getDeviceList | ( | bool | refresh = false | ) | 
Get the list of the serial number of all the available devices.
| refresh | if true USB device tree is parsed to search for modifications (new device connected/disconnected) | 
Definition at line 107 of file sensorcapture.cpp.
Referenced by main().
| void sl_oc::sensors::SensorCapture::getFirmwareVersion | ( | uint16_t & | fw_major, | 
| uint16_t & | fw_minor | ||
| ) | 
Get the MCU firmware version in form [fw_major].[fw_minor].
| fw_major | the major firmware version number | 
| fw_minor | the minor firmware version number | 
Definition at line 191 of file sensorcapture.cpp.
Referenced by main().
| const data::Temperature & sl_oc::sensors::SensorCapture::getLastCameraTemperatureData | ( | uint64_t | timeout_usec = 100 | ) | 
Get the last received camera sensors temperature data.
| timeout_usec | data grabbing timeout in milliseconds. | 
Definition at line 853 of file sensorcapture.cpp.
References sl_oc::sensors::data::Temperature::NOT_PRESENT, sl_oc::sensors::data::Temperature::OLD_VAL, and sl_oc::sensors::data::Temperature::valid.
Referenced by main().
| const data::Environment & sl_oc::sensors::SensorCapture::getLastEnvironmentData | ( | uint64_t | timeout_usec = 100 | ) | 
Get the last received Environment data.
| timeout_usec | data grabbing timeout in milliseconds. | 
Definition at line 830 of file sensorcapture.cpp.
References sl_oc::sensors::data::Environment::NOT_PRESENT, sl_oc::sensors::data::Environment::OLD_VAL, and sl_oc::sensors::data::Environment::valid.
Referenced by main().
| const data::Imu & sl_oc::sensors::SensorCapture::getLastIMUData | ( | uint64_t | timeout_usec = 1500 | ) | 
Get the last received IMU data.
| timeout_usec | data grabbing timeout in milliseconds. | 
Definition at line 784 of file sensorcapture.cpp.
References sl_oc::sensors::data::Imu::NOT_PRESENT, sl_oc::sensors::data::Imu::OLD_VAL, and sl_oc::sensors::data::Imu::valid.
Referenced by getSensorThreadFunc(), and main().
| const data::Magnetometer & sl_oc::sensors::SensorCapture::getLastMagnetometerData | ( | uint64_t | timeout_usec = 100 | ) | 
Get the last received Magnetometer data.
| timeout_usec | data grabbing timeout in milliseconds. | 
Definition at line 807 of file sensorcapture.cpp.
References sl_oc::sensors::data::Magnetometer::NOT_PRESENT, sl_oc::sensors::data::Magnetometer::OLD_VAL, and sl_oc::sensors::data::Magnetometer::valid.
Referenced by main().
| int sl_oc::sensors::SensorCapture::getSerialNumber | ( | ) | 
Retrieve the serial number of the connected camera.
Definition at line 202 of file sensorcapture.cpp.
Referenced by main().
| bool sl_oc::sensors::SensorCapture::initializeSensors | ( | int | sn = -1 | ) | 
Open a connection to the MCU of a ZED Mini or a ZED2 camera using the specified serial number or searching for the first available device.
| sn | Serial Number of the camera. Use -1 to open connect to the first available device  | 
Definition at line 135 of file sensorcapture.cpp.
Referenced by main().
      
  | 
  static | 
Perform a SW reset of the Sensors Module. To be called in case one of the sensors stops to work correctly.
| serial_number | The serial number of the device to be reset (0 to reset the first available) | 
Definition at line 673 of file sensorcapture.cpp.
      
  | 
  static | 
Perform a reset of the video module without resetting the sensor module. To be called in case the Video module stops to work correctly.
| serial_number | The serial number of the device to be reset (0 to reset the first available) | 
Definition at line 725 of file sensorcapture.cpp.
      
  | 
  inline | 
Called by VideoCapture to sync timestamps reference point.
Definition at line 229 of file sensorcapture.hpp.
      
  | 
  inline | 
Called by VideoCapture to set the pointer to it.
Definition at line 230 of file sensorcapture.hpp.
Referenced by sl_oc::video::VideoCapture::enableSensorSync().
| void sl_oc::sensors::SensorCapture::updateTimestampOffset | ( | uint64_t | frame_ts | ) | 
Called by VideoCapture to update timestamp offset.
Definition at line 563 of file sensorcapture.cpp.