LibMultiSense
LibMultiSense Documentation
Loading...
Searching...
No Matches
MultiSenseTypes.hh
Go to the documentation of this file.
1
37#pragma once
38
39#include <array>
40#include <chrono>
41#include <cstdint>
42#include <map>
43#include <memory>
44#include <optional>
45#include <stdexcept>
46#include <string>
47#include <tuple>
48#include <vector>
49
50#ifdef HAVE_OPENCV
51#include <opencv2/core/mat.hpp>
52#endif
53
54#if !defined(MULTISENSE_API)
55#if defined (_MSC_VER)
56#define MULTISENSE_API __declspec(dllexport)
57#else
58#define MULTISENSE_API
59#endif
60#endif
61
62
63namespace multisense
64{
65
66using TimeT = std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds>;
67
68enum class Status : uint8_t
69{
70 UNKNOWN,
71 OK,
72 TIMEOUT,
74 FAILED,
79};
80
109
110enum class ColorImageEncoding : uint16_t
111{
112 NONE,
114};
115
117{
121 enum class DistortionType : uint8_t
122 {
123 NONE,
124 PLUMBBOB,
126 };
127
131 std::array<std::array<float, 3>, 3> K{{{0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f}}};
132
137 std::array<std::array<float, 3>, 3> R{{{0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f}}};
138
143 std::array<std::array<float, 4>, 3> P{{{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}}};
144
149
153 std::vector<float> D = {};
154
159 std::array<float, 3> rectified_translation() const
160 {
161 return std::array<float, 3>{(P[0][0] == 0.0f ? 0.0f : P[0][3] / P[0][0]),
162 (P[1][1] == 0.0f ? 0.0f : P[1][3] / P[1][1]),
163 P[2][3]};
164 }
165};
166
168{
173
178
182 std::optional<CameraCalibration> aux = std::nullopt;
183};
184
188struct Image
189{
193 enum class PixelFormat : uint8_t
194 {
195 UNKNOWN,
196 MONO8,
197 BGR8,
198 MONO16,
199 FLOAT32,
200 JPEG,
201 H264
202 };
203
207 std::shared_ptr<const std::vector<uint8_t>> raw_data = nullptr;
208
212 int64_t image_data_offset = 0;
213
218
223
227 int width = -1;
228
232 int height = -1;
233
239
245
250
255
261 template <typename T>
262 std::optional<T> at(int w, int h) const
263 {
264 if (w < 0 || h < 0 || w >= width || h >= height ||
265 raw_data == nullptr ||
269 {
270 return std::nullopt;
271 }
272
273 if ((sizeof(T) == 1 && format == PixelFormat::MONO8) ||
274 (sizeof(T) == 2 && format == PixelFormat::MONO16) ||
275 (sizeof(T) == 3 && format == PixelFormat::BGR8) ||
276 (sizeof(T) == 4 && format == PixelFormat::FLOAT32))
277 {
278 const size_t offset = sizeof(T) * ((width * h) + w);
279
280 return *reinterpret_cast<const T*>(raw_data->data() + image_data_offset + offset);
281 }
282
283 return std::nullopt;
284 }
285
286#ifdef HAVE_OPENCV
294 cv::Mat cv_mat() const;
295#endif
296};
297
302{
306 uint32_t channels = 0;
307
311 uint32_t bins = 0;
312
316 std::vector<uint32_t> data{};
317};
318
323{
327 void add_image(const Image& image)
328 {
329 images[image.source] = image;
330 }
331
335 const Image& get_image(const DataSource &source) const
336 {
337 auto it = images.find(source);
338 if (it == images.end())
339 {
340 throw std::runtime_error("No image found for requested DataSource");
341 }
342 return it->second;
343 }
344
348 bool has_image(const DataSource &source) const
349 {
350 return (images.find(source) != images.end());
351 }
352
356 int64_t frame_id = 0;
357
361 std::map<DataSource, Image> images{};
362
367
372
377
382
386 std::optional<ImageHistogram> stereo_histogram = std::nullopt;
387
391 std::chrono::microseconds capture_exposure_time{0};
392
396 float capture_gain = 0.0;
397};
398
403{
408 {
412 float x = 0.0f;
413
417 float y = 0.0f;
418
422 float z = 0.0f;
423 };
424
429 std::optional<Measurement> accelerometer = std::nullopt;
434 std::optional<Measurement> gyroscope = std::nullopt;
439 std::optional<Measurement> magnetometer = std::nullopt;
440
445
450};
451
456{
460 std::vector<ImuSample> samples;
461};
462
467{
471 float sample_rate = 0.0f;
472
476 float bandwith_cutoff = 0.0f;
477
481 bool operator==(const ImuRate &rhs) const
482 {
484 }
485};
486
491{
495 float range = 0.0f;
496
500 float resolution = 0.0f;
501
505 bool operator==(const ImuRange &rhs) const
506 {
507 return range == rhs.range && resolution == rhs.resolution;
508 }
509};
510
511
516{
521 {
527 float postfilter_strength = 0.85f;
528
532 bool operator==(const StereoConfig &rhs) const
533 {
535 }
536 };
537
542 {
547 float gain = 1.68f;
548
553 std::chrono::microseconds exposure_time{10000};
554
558 bool operator==(const ManualExposureConfig &rhs) const
559 {
560 return gain == rhs.gain && exposure_time == rhs.exposure_time;
561 }
562 };
563
568 {
582 uint16_t width = 0;
586 uint16_t height = 0;
587
591 bool operator==(const AutoExposureRoiConfig &rhs) const
592 {
595 width == rhs.width &&
596 height == rhs.height;
597 }
598 };
599
604 {
609 std::chrono::microseconds max_exposure_time{10000};
610
616 uint32_t decay = 3;
617
626 float target_intensity = 0.5f;
627
632 float target_threshold = 0.85f;
633
638 float max_gain = 2.0f;
639
645
649 bool operator==(const AutoExposureConfig &rhs) const
650 {
651 return max_exposure_time == rhs.max_exposure_time &&
652 decay == rhs.decay &&
655 max_gain == rhs.max_gain &&
656 roi == rhs.roi;
657 }
658 };
659
664 {
669 float red = 1.0f;
670
675 float blue = 1.0f;
676
681 {
682 return red == rhs.red && blue == rhs.blue;
683 }
684 };
685
690 {
695 uint32_t decay = 3;
696
701 float threshold = 0.5f;
702
706 bool operator==(const AutoWhiteBalanceConfig &rhs) const
707 {
708 return decay == rhs.decay && threshold == rhs.threshold;
709 }
710 };
711
716 {
721 float gamma = 2.2f;
722
727
731 std::optional<ManualExposureConfig> manual_exposure = std::nullopt;
732
736 std::optional<AutoExposureConfig> auto_exposure = std::nullopt;
737
742
746 std::optional<ManualWhiteBalanceConfig> manual_white_balance = std::nullopt;
747
751 std::optional<AutoWhiteBalanceConfig> auto_white_balance = std::nullopt;
752
766 };
767
772 {
777
781 bool sharpening_enabled = false;
782
788
795 uint8_t sharpening_limit = 100;
796
800 bool operator==(const AuxConfig &rhs) const
801 {
802 return image_config == rhs.image_config &&
806 }
807 };
808
813 enum class MaxDisparities : uint8_t
814 {
818 D64,
822 D128,
826 D256
827 };
828
833 {
837 bool ptp_enabled = false;
838
842 bool operator==(const TimeConfig &rhs) const
843 {
844 return ptp_enabled == rhs.ptp_enabled;
845 }
846 };
847
852 {
858
863 {
865 }
866 };
867
872 {
878 {
882 bool enabled = false;
883
889
894
898 bool operator==(const OperatingMode &rhs) const
899 {
900 return enabled == rhs.enabled && rate == rhs.rate && range == rhs.range;
901 }
902 };
903
907 uint32_t samples_per_frame = 0;
908
912 std::optional<OperatingMode> accelerometer = std::nullopt;
913
917 std::optional<OperatingMode> gyroscope = std::nullopt;
918
922 std::optional<OperatingMode> magnetometer = std::nullopt;
923
927 bool operator==(const ImuConfig &rhs) const
928 {
929 return samples_per_frame == rhs.samples_per_frame &&
931 gyroscope == rhs.gyroscope &&
933 }
934 };
935
940 {
945 {
949 float intensity = 0.0f;
950
954 bool flash = false;
955
959 bool operator==(const InternalConfig &rhs) const
960 {
961 return intensity == rhs.intensity && flash == rhs.flash;
962 }
963 };
964
969 {
973 enum class FlashMode : uint8_t
974 {
975 NONE,
978 };
979
983 float intensity = 0.0f;
984
989
998
1003 std::chrono::microseconds startup_time{0};
1004
1008 bool operator==(const ExternalConfig &rhs) const
1009 {
1010 return intensity == rhs.intensity &&
1011 flash == rhs.flash &&
1014 }
1015 };
1016
1021 std::optional<InternalConfig> internal = std::nullopt;
1022
1027 std::optional<ExternalConfig> external = std::nullopt;
1028
1032 bool operator==(const LightingConfig &rhs) const
1033 {
1034 return internal == rhs.internal && external == rhs.external;
1035 }
1036 };
1037
1042 uint32_t width = 0;
1043
1048 uint32_t height = 0;
1049
1054
1058 float frames_per_second = 10.0f;
1059
1064
1069
1073 std::optional<AuxConfig> aux_config = std::nullopt;
1074
1078 std::optional<TimeConfig> time_config = std::nullopt;
1079
1083 std::optional<NetworkTransmissionConfig> network_config = std::nullopt;
1084
1088 std::optional<ImuConfig> imu_config = std::nullopt;
1089
1094 std::optional<LightingConfig> lighting_config = std::nullopt;
1095
1099 bool operator==(const MultiSenseConfig &rhs) const
1100 {
1101 return width == rhs.width &&
1102 height == rhs.height &&
1103 disparities == rhs.disparities &&
1106 image_config == rhs.image_config &&
1107 aux_config == rhs.aux_config &&
1108 time_config == rhs.time_config &&
1110 imu_config == rhs.imu_config &&
1112 }
1113};
1114
1120{
1122 {
1128
1132 std::array<uint8_t, 8> grandmaster_id{0, 0, 0, 0, 0, 0, 0, 0};
1133
1137 std::chrono::nanoseconds grandmaster_offset{0};
1138
1142 std::chrono::nanoseconds path_delay{0};
1143
1148 };
1149
1151 {
1155 bool cameras_ok = false;
1156
1161 };
1162
1164 {
1168 float cpu_temperature = 0.0f;
1169
1173 float fpga_temperature = 0.0f;
1174
1179
1184 };
1185
1187 {
1191 float input_voltage = 0.0f;
1192
1196 float input_current = 0.0f;
1197
1201 float fpga_power = 0.0f;
1202 };
1203
1205 {
1210
1215
1220
1226 };
1227
1229 {
1233 std::chrono::nanoseconds camera_time{0};
1234
1238 std::chrono::nanoseconds client_host_time{0};
1239
1245 std::chrono::nanoseconds network_delay{0};
1246
1251 std::chrono::nanoseconds offset_to_host() const
1252 {
1254 }
1255
1260 TimeT apply_offset_to_host(const TimeT &input_camera_time) const
1261 {
1262 return input_camera_time + std::chrono::duration_cast<std::chrono::system_clock::duration>(offset_to_host());
1263 }
1264 };
1265
1269 bool system_ok = false;
1270
1274 std::optional<PtpStatus> ptp = std::nullopt;
1275
1280
1284 std::optional<TemperatureStatus> temperature = std::nullopt;
1285
1289 std::optional<PowerStatus> power = std::nullopt;
1290
1295
1299 std::optional<TimeStatus> time = std::nullopt;
1300};
1301
1306{
1311 {
1315 std::string ip_address = "10.66.171.21";
1316
1320 std::string gateway = "10.66.171.1";
1321
1325 std::string netmask = "255.255.255.0";
1326 };
1327
1334 {
1338 struct PcbInfo
1339 {
1343 std::string name;
1347 uint32_t revision;
1348 };
1349
1353 enum class HardwareRevision : uint8_t
1354 {
1355 UNKNOWN,
1356 S7,
1357 S21,
1358 ST21,
1359 S27,
1360 S30,
1361 KS21,
1362 MONOCAM,
1364 ST25,
1365 KS21i
1366 };
1367
1371 enum class ImagerType : uint8_t
1372 {
1373 UNKNOWN,
1378 FLIR_TAU2,
1381 TENUM1280
1382 };
1383
1387 enum class LightingType : uint8_t
1388 {
1392 NONE,
1396 INTERNAL,
1400 EXTERNAL,
1413
1414 };
1415
1419 enum class LensType : uint8_t
1420 {
1421 UNKNOWN,
1422 STANDARD,
1423 FISHEYE
1424 };
1425
1430 std::string camera_name{};
1431
1436 std::string build_date{};
1437
1442 std::string serial_number{};
1443
1448
1452 std::vector<PcbInfo> pcb_info{};
1453
1459 std::string imager_name{};
1460
1465
1469 uint32_t imager_width = 0;
1470
1474 uint32_t imager_height = 0;
1475
1481 std::string lens_name{};
1482
1487
1492
1497
1502
1507
1511 uint32_t number_of_lights = 0;
1512
1516 constexpr bool has_aux_camera() const
1517 {
1518 switch (hardware_revision)
1519 {
1523 return true;
1524 default:
1525 return false;
1526 }
1527 }
1528
1532 constexpr bool has_main_stereo_color() const
1533 {
1534 switch (hardware_revision)
1535 {
1539 return true;
1540 default:
1541 return false;
1542 }
1543 }
1544 };
1545
1550 struct Version
1551 {
1555 uint32_t major = 0;
1556
1560 uint32_t minor = 0;
1561
1565 uint32_t patch = 0;
1566
1570 std::string to_string() const
1571 {
1572 return std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(patch);
1573 }
1574
1578 bool operator==(const Version& other) const
1579 {
1580 return std::tie(major, minor, patch) == std::tie(other.major, other.minor, other.patch);
1581 }
1582
1586 bool operator<(const Version& other) const
1587 {
1588 return std::tie(major, minor, patch) < std::tie(other.major, other.minor, other.patch);
1589 }
1590
1594 bool operator<=(const Version& other) const
1595 {
1596 return *this < other || *this == other;
1597 }
1598
1602 bool operator>(const Version& other) const
1603 {
1604 return other < *this;
1605 }
1606
1610 bool operator>=(const Version& other) const
1611 {
1612 return other <= *this;
1613 }
1614 };
1615
1636
1662
1666 struct ImuInfo
1667 {
1671 struct Source
1672 {
1676 std::string name{};
1677
1681 std::string device{};
1682
1686 std::vector<ImuRate> rates{};
1687
1691 std::vector<ImuRange> ranges{};
1692 };
1693
1697 std::optional<Source> accelerometer = std::nullopt;
1698
1702 std::optional<Source> gyroscope = std::nullopt;
1703
1707 std::optional<Source> magnetometer = std::nullopt;
1708 };
1709
1714
1719
1723 std::vector<SupportedOperatingMode> operating_modes;
1724
1729 std::optional<ImuInfo> imu;
1730
1735};
1736
1737}
DataSource
Identifies which camera or data source the image is from.
std::chrono::time_point< std::chrono::system_clock, std::chrono::nanoseconds > TimeT
std::array< float, 3 > rectified_translation() const
Get the translation vector in meters which translates points in the current CameraCalibration frame t...
std::array< std::array< float, 3 >, 3 > R
Rotation matrix which takes points in the unrectified camera frame and transform them in to the recti...
std::array< std::array< float, 3 >, 3 > K
Unrectified camera projection matrix stored in row-major ordering.
DistortionType distortion_type
The type of the distortion model used for the unrectified camera.
std::vector< float > D
Coefficients for the distortion model.
std::array< std::array< float, 4 >, 3 > P
Rectified projection matrix which takes points in the origin camera coordinate frame and projects the...
A frame containing multiple images (indexed by DataSource).
StereoCalibration calibration
The scaled calibration for the entire camera.
float capture_gain
The gain that was used to capture the stereo images in this frame.
ColorImageEncoding aux_color_encoding
The encoding of the aux color image(s) in the frame.
void add_image(const Image &image)
Add an image to the frame, keyed by the image's DataSource.
const Image & get_image(const DataSource &source) const
Retrieve image by DataSource.
std::optional< ImageHistogram > stereo_histogram
Corresponding histogram from the main stereo pair.
TimeT ptp_frame_time
The MultiSense ptp timestamp associated with the frame.
std::chrono::microseconds capture_exposure_time
The exposure time which was used to capture this frame.
bool has_image(const DataSource &source) const
Check if we have an image for a given data source.
TimeT frame_time
The MultiSense timestamp associated with the frame.
int64_t frame_id
The unique monotonically increasing ID for each frame populated by the MultiSense.
std::map< DataSource, Image > images
The images associated with each source in the frame.
A object containing histogram data for a image.
uint32_t channels
The number of channels per pixel.
std::vector< uint32_t > data
The raw histogram counts whose size is equal to channels*bins.
uint32_t bins
The number of possible pixel bins.
Represents a single image plus metadata.
TimeT camera_timestamp
The timestamp associated with the image based on the camera's clock.
int width
Width of the image in pixels.
PixelFormat format
The format of the image data stored in the raw_data stored in the raw_data buffer.
TimeT ptp_timestamp
The timestamp associated with the image based using the camera's clock which is potentially PTP synch...
PixelFormat
Pixel formats.
CameraCalibration calibration
The scaled calibration associated with the image.
std::optional< T > at(int w, int h) const
Get a pixel at a certain width/height location in the image.
int height
Height of the image in pixels.
int64_t image_data_offset
An offset into the raw_data pointer where the image data starts.
size_t image_data_length
The length of the image data after the image_data_offset has been applied.
std::shared_ptr< const std::vector< uint8_t > > raw_data
A pointer to the raw image data sent from the camera.
DataSource source
The camera data source which this image corresponds to.
A collection of IMU samples from the camera.
std::vector< ImuSample > samples
A batched collection of IMU samples.
The range for each sensor along with the corresponding sampling resolution.
float resolution
The min resolution the sensor can return.
bool operator==(const ImuRange &rhs) const
Equality operator.
float range
The max value the sensor can return.
A sample rate, and what impact it has on bandwidth.
bool operator==(const ImuRate &rhs) const
Equality operator.
float sample_rate
The sample rate for the sensor in Hz.
float bandwith_cutoff
The bandwith cutoff for a given IMU mode in Hz.
A generic measurement for a 3-axis IMU.
float z
Measurement on the z-axis of the sensor.
float y
Measurement on the y-axis of the sensor.
float x
Measurement on the x-axis of the sensor.
A single IMU sample from the camera.
TimeT ptp_sample_time
The MultiSense ptp timestamp associated with the frame.
std::optional< Measurement > accelerometer
The acceleration in units of Gs.
TimeT sample_time
The MultiSense timestamp associated with the frame.
std::optional< Measurement > gyroscope
The rotational velocity in degrees-per-second.
std::optional< Measurement > magnetometer
The measured magnetic field in milligauss.
Auto-exposure specific configuration.
bool operator==(const AutoExposureConfig &rhs) const
Equality operator.
float target_intensity
The auto-exposure algorithm in digital imaging endeavors to achieve a specified target intensity,...
float max_gain
The auto exposure algorithm adjusts both exposure and gain.
AutoExposureRoiConfig roi
The auto exposure region-of-interest used to restrict the portion of the image which the auto exposur...
uint32_t decay
The desired auto-exposure decay rate.
std::chrono::microseconds max_exposure_time
The max exposure time auto exposure algorithm can set in microseconds Valid range is [0,...
float target_threshold
The fraction of pixels which must be equal or below the pixel value set by the target intensity pixel...
Auto-exposure Region-of-Interest (ROI) specific configuration.
uint16_t width
The width of the ROI in the full resolution image.
uint16_t height
The height of the ROI in the full resolution image.
uint16_t top_left_x_position
The x value of the top left corner of the ROI in the full resolution image.
uint16_t top_left_y_position
The y value of the top left corner of the ROI in the full resolution image.
bool operator==(const AutoExposureRoiConfig &rhs) const
Equality operator.
Auto white balance specific configuration.
uint32_t decay
The decay rate used for auto-white-balance Valid range [0, 20].
float threshold
The auto white balance threshold Valid range [0.0, 1.0].
bool operator==(const AutoWhiteBalanceConfig &rhs) const
Equality operator.
Image specific configuration for the Aux imager.
uint8_t sharpening_limit
The maximum difference in pixels that sharpening is is allowed to change between neighboring pixels.
bool operator==(const AuxConfig &rhs) const
Equality operator.
ImageConfig image_config
Image configuration for the Aux imager.
float sharpening_percentage
The percentage strength of the sharpening gain to apply to the aux image Valid range is [0,...
bool auto_exposure_enabled
Enable or disable auto exposure.
std::optional< AutoWhiteBalanceConfig > auto_white_balance
The white balance parameters to use if auto white balance is enabled.
bool auto_white_balance_enabled
Enable or disable auto white balance.
bool operator==(const ImageConfig &rhs) const
Equality operator.
std::optional< ManualWhiteBalanceConfig > manual_white_balance
The white balance parameters to use if auto white balance is disabled.
std::optional< AutoExposureConfig > auto_exposure
The exposure config to use if auto exposure is enabled.
float gamma
Set the gamma correction for the image.
std::optional< ManualExposureConfig > manual_exposure
The exposure config to use if auto exposure is disabled.
Config for a specific IMU operating mode.
ImuRate rate
The specific IMU rate configuration specified in ImuInfo::Source table.
ImuRange range
The specific IMU range configuration specified in ImuInfo::Source.
bool operator==(const OperatingMode &rhs) const
Equality operator.
bool operator==(const ImuConfig &rhs) const
Equality operator.
std::optional< OperatingMode > accelerometer
Configuration for the onboard accelerometer.
std::optional< OperatingMode > gyroscope
Configuration for the onboard gyroscope.
std::optional< OperatingMode > magnetometer
Configuration for the onboard magnetometer.
uint32_t samples_per_frame
The number of IMU samples which should be included in a IMU frame.
Lighting config for lights driven by GPIO outputs from the MultiSense.
float intensity
Lighting brightness ranging from 0 to 100.0.
bool operator==(const ExternalConfig &rhs) const
Equality operator.
uint32_t pulses_per_exposure
The number of pulses of the light per single exposure.
std::chrono::microseconds startup_time
The time it takes for the light to reach full brightness.
Lighting config for lights integrated into the MultiSense.
bool operator==(const InternalConfig &rhs) const
Equality operator.
float intensity
Lighting brightness ranging from 0 to 100.0.
Lighting configuration for the camera.
std::optional< InternalConfig > internal
The internal lighting config.
std::optional< ExternalConfig > external
The external lighting config.
bool operator==(const LightingConfig &rhs) const
Equality operator.
Manual exposure specific configuration.
std::chrono::microseconds exposure_time
The manual exposure time in microseconds Valid range is [0, 33000].
float gain
The desired electrical and digital gain used to brighten the image.
bool operator==(const ManualExposureConfig &rhs) const
Equality operator.
Manual white balance specific configuration.
float red
The manual red white-balance setting Valid range is [0.25, 4].
bool operator==(const ManualWhiteBalanceConfig &rhs) const
Equality operator.
float blue
The manual blue white-balance setting Valid range is [0.25, 4].
Config for transmitting packets from the MultiSense to the host.
bool operator==(const NetworkTransmissionConfig &rhs) const
Equality operator.
bool packet_delay_enabled
Add a small delay between the transmission of each packet to hopefully interact better with slower cl...
bool operator==(const StereoConfig &rhs) const
Equality operator.
float postfilter_strength
This is used to filter low confidence stereo data before it is sent to the host.
Config for time-based controls.
bool operator==(const TimeConfig &rhs) const
Equality operator.
bool ptp_enabled
Enable PTP sync on the camera.
Complete configuration object for configuring the MultiSense.
uint32_t height
The operating height of the MultiSense in pixels.
std::optional< LightingConfig > lighting_config
The lighting configuration for the camera.
MaxDisparities disparities
The max number of pixels the MultiSense searches when computing the disparity output.
ImageConfig image_config
The image configuration to use for the main stereo pair.
float frames_per_second
The target framerate the MultiSense should operate at.
std::optional< NetworkTransmissionConfig > network_config
Config to control network transmission settings.
MaxDisparities
Predefined disparity pixel search windows.
std::optional< TimeConfig > time_config
Config for the MultiSense time-sync options.
std::optional< ImuConfig > imu_config
The imu configuration to use for the camera.
StereoConfig stereo_config
The stereo configuration to use.
bool operator==(const MultiSenseConfig &rhs) const
Equality operator.
std::optional< AuxConfig > aux_config
The image configuration to use for the aux camera if present.
uint32_t width
The operating width of the MultiSense in pixels.
Info for the PCBs contained in the unit.
uint32_t revision
The revision number of the PCB.
std::string name
The name of the PCB This value can store at most 32 characters.
The Device information associated with the MultiSense.
LightingType lighting_type
The type of lighting used in the MultiSense.
float nominal_relative_aperture
The nominal relative aperture for the primary camera modules in f-stop.
std::vector< PcbInfo > pcb_info
Information about each PCB.
std::string serial_number
The unique serial number of the MultiSense This value can store at most 32 characters.
float nominal_stereo_baseline
The nominal stereo baseline in meters.
LensType lens_type
The type of the primary imager.
uint32_t number_of_lights
The number of lights the MultiSense controls.
uint32_t imager_width
The native width of the primary imager.
std::string imager_name
The name of the imager used by the primary camera.
HardwareRevision hardware_revision
The hardware revision of the MultiSense.
std::string lens_name
The name of the lens used for the primary camera For stereo cameras this is the Left/Right stereo pai...
std::string camera_name
The name of the MultiSense variant.
float nominal_focal_length
The nominal focal length for the primary lens in meters.
HardwareRevision
MultiSense Hardware revisions.
uint32_t imager_height
The native height of the primary imager.
ImagerType imager_type
The type of the imager.
std::string build_date
The date the MultiSense was manufactured This value can store at most 32 characters.
constexpr bool has_main_stereo_color() const
Determine if the MultiSense's main stereo pair supports color.
@ OUTPUT_TRIGGER
A GPIO line is used to trigger an external light.
@ PATTERN_PROJECTOR_OUTPUT_TRIGGER
A pattern projector with a GPIO line used to trigger a external light.
@ EXTERNAL
Drive lights via an external output.
constexpr bool has_aux_camera() const
Determine if the MultiSense has a Aux color camera.
Info about the available IMU configurations.
std::vector< ImuRate > rates
The available rates supported by this operating mode.
std::vector< ImuRange > ranges
The available ranges supported by this operating mode.
std::string name
The name of the IMU sensor.
std::string device
The name of the IMU chip.
Information about the IMU onboard the MultiSense.
std::optional< Source > magnetometer
Configuration specific to the magnetometer.
std::optional< Source > accelerometer
Configuration specific to the accelerometer.
std::optional< Source > gyroscope
Configuration specific to the gyroscope.
The network configuration for the MultiSense.
std::string gateway
The gateway of the camera (i.e.
std::string netmask
The netmask of the camera (i.e.
std::string ip_address
The ip address of the camera (i.e.
Version information for the MultiSense.
MultiSenseInfo::Version firmware_version
The version of the firmware running on the camera.
uint64_t hardware_version
ID for the version of hardware.
std::string firmware_build_date
The date the firmware running on the camera was built.
A valid operating mode for the MultiSense.
uint32_t height
The height of the output image in pixels.
std::vector< DataSource > supported_sources
Data sources supported at that mode.
uint32_t width
The width of the output image in pixels.
MultiSenseConfig::MaxDisparities disparities
Supported operating disparity.
Convenience wrapper for a version number See https://semver.org/.
uint32_t patch
Patch version number.
uint32_t major
Major version number.
bool operator>=(const Version &other) const
Convenience greater-than or equal to operator for comparing versions.
bool operator==(const Version &other) const
Convenience equality operator for comparing versions.
bool operator>(const Version &other) const
Convenience greater-than operator for comparing versions.
bool operator<=(const Version &other) const
Convenience less-than or equal to operator for comparing versions.
bool operator<(const Version &other) const
Convenience less-than operator for comparing versions.
uint32_t minor
Minor version number.
std::string to_string() const
Convert a Version info to string for convenience.
Static status info for the MultiSense.
std::optional< ImuInfo > imu
Supported operating modes for the IMU sensors (accelerometer, gyroscope, magnetometer).
SensorVersion version
Sensor Version info.
std::vector< SupportedOperatingMode > operating_modes
Supported operating modes.
DeviceInfo device
Device info.
NetworkInfo network
The network configuration of the MultiSense.
bool processing_pipeline_ok
True if the onboard processing pipeline is ok and currently processing images.
bool cameras_ok
True if the cameras are operating and currently streaming data.
size_t invalid_packets
The total number of invalid packets received on the client side.
size_t dropped_messages
The total number of dropped messages on the client side.
size_t received_messages
The total number of valid messages received from the client.
size_t unprocessed_packets
The total number of packets we received over the wire, but were unable to process due to buffer limit...
float input_current
The current input current in Amperes.
float fpga_power
The current power draw of the FPGA in Watts.
float input_voltage
The current input voltage in volts.
bool grandmaster_present
Status of the grandmaster clock.
std::chrono::nanoseconds path_delay
The estimate delay of the PTP synchronization messages from the grandmaster.
std::array< uint8_t, 8 > grandmaster_id
The id of the current grandmaster clock (8 bytes, 0xXXXXXX.XXXX.XXXXXX)
uint16_t steps_from_local_to_grandmaster
The number of network hops from the grandmaster to the camera's clock.
std::chrono::nanoseconds grandmaster_offset
Offset between the camera's PTP Hardware Clock and the grandmaster clock.
float cpu_temperature
Temperature of the processing subsystem (CPU cores of SoC) in Celsius.
float left_imager_temperature
Temperature of the left imager in Celsius.
float fpga_temperature
Temperature of the FPGA in Celsius.
float right_imager_temperature
Temperature of the right imager in Celsius.
std::chrono::nanoseconds client_host_time
The time of the host machine running the client when the status request was sent.
std::chrono::nanoseconds camera_time
The camera's system time when the status message request was received.
std::chrono::nanoseconds offset_to_host() const
Compute the time offset which can manually be added to all camera timestamps to change the camera tim...
TimeT apply_offset_to_host(const TimeT &input_camera_time) const
Apply the time offset to a camera timestamps to camera timestamp from the reference clock of the came...
std::chrono::nanoseconds network_delay
The estimated network delay between when the status request was sent, and when the status request was...
Consolidated status information which can be queried on demand from the MultiSense.
std::optional< PowerStatus > power
The current power status.
ClientNetworkStatus client_network
The current client network statistics.
std::optional< TemperatureStatus > temperature
The current temperature status.
bool system_ok
Summary of the current MultiSense state.
std::optional< TimeStatus > time
The current timing status information.
std::optional< PtpStatus > ptp
The current ptp status.
CameraStatus camera
The current camera status.
CameraCalibration right
Calibration information for the right camera.
std::optional< CameraCalibration > aux
Calibration information for the aux camera (optional 3rd center camera)
CameraCalibration left
Calibration information for the left camera.