mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-09-14 20:10:19 +08:00
update OrbbecSDK version to 2.6.1
This commit is contained in:
@@ -93,6 +93,21 @@ OB_EXPORT bool ob_force_ip_config(const char *macAddress, ob_net_ip_config confi
|
||||
*/
|
||||
OB_EXPORT ob_device *ob_create_net_device(ob_context *context, const char *address, uint16_t port, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Create a network device object
|
||||
*
|
||||
* @param[in] context Pointer to the context object
|
||||
* @param[in] address IP address of the device
|
||||
* @param[in] port Port number of the device
|
||||
* @param[in] accessMode Device access mode. @ref ob_device_access_mode.
|
||||
* If the device does not support setting the Access Mode, the default OB_DEVICE_DEFAULT_ACCESS is used.
|
||||
* Applies only on first device creation or after release and re-creation; subsequent calls ignore it.
|
||||
* @param[out] error Pointer to an error object that will be populated if an error occurs during device creation
|
||||
*
|
||||
* @return Pointer to the created device object
|
||||
*/
|
||||
OB_EXPORT ob_device *ob_create_net_device_ex(ob_context *context, const char *address, uint16_t port, ob_device_access_mode accessMode, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Set a device plug-in callback function
|
||||
*
|
||||
|
||||
@@ -712,9 +712,26 @@ OB_EXPORT const char *ob_device_list_get_device_local_gateway(const ob_device_li
|
||||
*
|
||||
* @return ob_device* The created device.
|
||||
*
|
||||
* @note Default access mode is OB_DEVICE_DEFAULT_ACCESS
|
||||
*/
|
||||
OB_EXPORT ob_device *ob_device_list_get_device(const ob_device_list *list, uint32_t index, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Create a device.
|
||||
*
|
||||
* @attention If the device has already been acquired and created elsewhere, repeated acquisitions will return an error.
|
||||
*
|
||||
* @param[in] list Device list object.
|
||||
* @param[in] index The index of the device to create.
|
||||
* @param[in] accessMode Device access mode. @ref ob_device_access_mode.
|
||||
* If the device does not support setting the Access Mode, the default OB_DEVICE_DEFAULT_ACCESS is used.
|
||||
* Applies only on first device creation or after release and re-creation; subsequent calls ignore it.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return ob_device* The created device.
|
||||
*/
|
||||
OB_EXPORT ob_device *ob_device_list_get_device_ex(const ob_device_list *list, uint32_t index, ob_device_access_mode accessMode, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Create a device.
|
||||
*
|
||||
@@ -725,9 +742,28 @@ OB_EXPORT ob_device *ob_device_list_get_device(const ob_device_list *list, uint3
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return ob_device* The created device.
|
||||
*
|
||||
* @note Default access mode is OB_DEVICE_DEFAULT_ACCESS
|
||||
*/
|
||||
OB_EXPORT ob_device *ob_device_list_get_device_by_serial_number(const ob_device_list *list, const char *serial_number, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Create a device.
|
||||
*
|
||||
* @attention If the device has already been acquired and created elsewhere, repeated acquisitions will return an error.
|
||||
*
|
||||
* @param[in] list Device list object.
|
||||
* @param[in] serial_number The serial number of the device to create.
|
||||
* @param[in] accessMode Device access mode. @ref ob_device_access_mode.
|
||||
* If the device does not support setting the Access Mode, the default OB_DEVICE_DEFAULT_ACCESS is used.
|
||||
* Applies only on first device creation or after release and re-creation; subsequent calls ignore it.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return ob_device* The created device.
|
||||
*/
|
||||
OB_EXPORT ob_device *ob_device_list_get_device_by_serial_number_ex(const ob_device_list *list, const char *serial_number, ob_device_access_mode accessMode,
|
||||
ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Create device by uid
|
||||
* @brief On Linux platform, for usb device, the uid of the device is composed of bus-port-dev, for example 1-1.2-1. But the SDK will remove the dev number and
|
||||
@@ -742,9 +778,31 @@ OB_EXPORT ob_device *ob_device_list_get_device_by_serial_number(const ob_device_
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return ob_device* The created device.
|
||||
*
|
||||
* @note Default access mode is OB_DEVICE_DEFAULT_ACCESS
|
||||
*/
|
||||
OB_EXPORT ob_device *ob_device_list_get_device_by_uid(const ob_device_list *list, const char *uid, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Create device by uid
|
||||
* @brief On Linux platform, for usb device, the uid of the device is composed of bus-port-dev, for example 1-1.2-1. But the SDK will remove the dev number and
|
||||
* only keep the bus-port as the uid to create the device, for example 1-1.2, so that we can create a device connected to the specified USB port. Similarly,
|
||||
* users can also directly pass in bus-port as uid to create device.
|
||||
* @brief For GMSL device, the uid is GMSL port with "gmsl2-" prefix, for example gmsl2-1.
|
||||
*
|
||||
* @attention If the device has already been acquired and created elsewhere, repeated acquisitions will return an error.
|
||||
*
|
||||
* @param[in] list Device list object.
|
||||
* @param[in] uid The UID of the device to create.
|
||||
* @param[in] accessMode Device access mode. @ref ob_device_access_mode.
|
||||
* If the device does not support setting the Access Mode, the default OB_DEVICE_DEFAULT_ACCESS is used.
|
||||
* Applies only on first device creation or after release and re-creation; subsequent calls ignore it.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return ob_device* The created device.
|
||||
*/
|
||||
OB_EXPORT ob_device *ob_device_list_get_device_by_uid_ex(const ob_device_list *list, const char *uid, ob_device_access_mode accessMode, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get the original parameter list of camera calibration saved on the device.
|
||||
*
|
||||
|
||||
@@ -51,6 +51,7 @@ typedef struct ob_preset_resolution_config_list_t ob_preset_resolution_config_li
|
||||
#define OB_ACCEL_SAMPLE_RATE_ANY OB_SAMPLE_RATE_UNKNOWN
|
||||
#define OB_GYRO_FULL_SCALE_RANGE_ANY OB_GYRO_FS_UNKNOWN
|
||||
#define OB_GYRO_SAMPLE_RATE_ANY OB_SAMPLE_RATE_UNKNOWN
|
||||
#define OB_LIDAR_SCAN_ANY OB_LIDAR_SCAN_UNKNOWN
|
||||
|
||||
/**
|
||||
* @brief maximum path length
|
||||
@@ -108,6 +109,7 @@ typedef enum {
|
||||
OB_EXCEPTION_TYPE_IO, /**< SDK access IO exception error */
|
||||
OB_EXCEPTION_TYPE_MEMORY, /**< SDK access and use memory errors. For example, the frame fails to allocate memory */
|
||||
OB_EXCEPTION_TYPE_UNSUPPORTED_OPERATION, /**< Unsupported operation type error by SDK or device */
|
||||
OB_EXCEPTION_TYPE_ACCESS_DENIED, /**< Device access denied */
|
||||
} OBExceptionType,
|
||||
ob_exception_type;
|
||||
|
||||
@@ -126,17 +128,18 @@ typedef struct ob_error {
|
||||
* @brief Enumeration value describing the sensor type
|
||||
*/
|
||||
typedef enum {
|
||||
OB_SENSOR_UNKNOWN = 0, /**< Unknown type sensor */
|
||||
OB_SENSOR_IR = 1, /**< IR */
|
||||
OB_SENSOR_COLOR = 2, /**< Color */
|
||||
OB_SENSOR_DEPTH = 3, /**< Depth */
|
||||
OB_SENSOR_ACCEL = 4, /**< Accel */
|
||||
OB_SENSOR_GYRO = 5, /**< Gyro */
|
||||
OB_SENSOR_IR_LEFT = 6, /**< left IR for stereo camera*/
|
||||
OB_SENSOR_IR_RIGHT = 7, /**< Right IR for stereo camera*/
|
||||
OB_SENSOR_RAW_PHASE = 8, /**< Raw Phase */
|
||||
OB_SENSOR_CONFIDENCE = 9, /**< Confidence */
|
||||
OB_SENSOR_TYPE_COUNT, /**The total number of sensor types, is not a valid sensor type */
|
||||
OB_SENSOR_UNKNOWN = 0, /**< Unknown type sensor */
|
||||
OB_SENSOR_IR = 1, /**< IR */
|
||||
OB_SENSOR_COLOR = 2, /**< Color */
|
||||
OB_SENSOR_DEPTH = 3, /**< Depth */
|
||||
OB_SENSOR_ACCEL = 4, /**< Accel */
|
||||
OB_SENSOR_GYRO = 5, /**< Gyro */
|
||||
OB_SENSOR_IR_LEFT = 6, /**< left IR for stereo camera*/
|
||||
OB_SENSOR_IR_RIGHT = 7, /**< Right IR for stereo camera*/
|
||||
OB_SENSOR_RAW_PHASE = 8, /**< Raw Phase */
|
||||
OB_SENSOR_CONFIDENCE = 9, /**< Confidence */
|
||||
OB_SENSOR_LIDAR = 10, /**< LiDAR */
|
||||
OB_SENSOR_TYPE_COUNT, /**The total number of sensor types, is not a valid sensor type */
|
||||
} OBSensorType,
|
||||
ob_sensor_type;
|
||||
|
||||
@@ -155,6 +158,7 @@ typedef enum {
|
||||
OB_STREAM_IR_RIGHT = 7, /**< Right IR stream for stereo camera */
|
||||
OB_STREAM_RAW_PHASE = 8, /**< RawPhase Stream */
|
||||
OB_STREAM_CONFIDENCE = 9, /**< Confidence Stream*/
|
||||
OB_STREAM_LIDAR = 10, /**< LiDAR Stream for LiDAR device*/
|
||||
OB_STREAM_TYPE_COUNT, /**< The total number of stream type,is not a valid stream type */
|
||||
} OBStreamType,
|
||||
ob_stream_type;
|
||||
@@ -163,20 +167,21 @@ typedef enum {
|
||||
* @brief Enumeration value describing the type of frame
|
||||
*/
|
||||
typedef enum {
|
||||
OB_FRAME_UNKNOWN = -1, /**< Unknown frame type */
|
||||
OB_FRAME_VIDEO = 0, /**< Video frame */
|
||||
OB_FRAME_IR = 1, /**< IR frame */
|
||||
OB_FRAME_COLOR = 2, /**< Color frame */
|
||||
OB_FRAME_DEPTH = 3, /**< Depth frame */
|
||||
OB_FRAME_ACCEL = 4, /**< Accelerometer data frame */
|
||||
OB_FRAME_SET = 5, /**< Frame collection (internally contains a variety of data frames) */
|
||||
OB_FRAME_POINTS = 6, /**< Point cloud frame */
|
||||
OB_FRAME_GYRO = 7, /**< Gyroscope data frame */
|
||||
OB_FRAME_IR_LEFT = 8, /**< Left IR frame for stereo camera */
|
||||
OB_FRAME_IR_RIGHT = 9, /**< Right IR frame for stereo camera */
|
||||
OB_FRAME_RAW_PHASE = 10, /**< Raw Phase frame*/
|
||||
OB_FRAME_CONFIDENCE = 11, /**< Confidence frame*/
|
||||
OB_FRAME_TYPE_COUNT, /**< The total number of frame types, is not a valid frame type */
|
||||
OB_FRAME_UNKNOWN = -1, /**< Unknown frame type */
|
||||
OB_FRAME_VIDEO = 0, /**< Video frame */
|
||||
OB_FRAME_IR = 1, /**< IR frame */
|
||||
OB_FRAME_COLOR = 2, /**< Color frame */
|
||||
OB_FRAME_DEPTH = 3, /**< Depth frame */
|
||||
OB_FRAME_ACCEL = 4, /**< Accelerometer data frame */
|
||||
OB_FRAME_SET = 5, /**< Frame collection (internally contains a variety of data frames) */
|
||||
OB_FRAME_POINTS = 6, /**< Point cloud frame */
|
||||
OB_FRAME_GYRO = 7, /**< Gyroscope data frame */
|
||||
OB_FRAME_IR_LEFT = 8, /**< Left IR frame for stereo camera */
|
||||
OB_FRAME_IR_RIGHT = 9, /**< Right IR frame for stereo camera */
|
||||
OB_FRAME_RAW_PHASE = 10, /**< Raw Phase frame*/
|
||||
OB_FRAME_CONFIDENCE = 11, /**< Confidence frame*/
|
||||
OB_FRAME_LIDAR_POINTS = 12, /**< LiDAR point3d cloud frame*/
|
||||
OB_FRAME_TYPE_COUNT, /**< The total number of frame types, is not a valid frame type */
|
||||
} OBFrameType,
|
||||
ob_frame_type;
|
||||
|
||||
@@ -197,41 +202,45 @@ typedef enum {
|
||||
* @brief Enumeration value describing the pixel format
|
||||
*/
|
||||
typedef enum {
|
||||
OB_FORMAT_UNKNOWN = -1, /**< unknown format */
|
||||
OB_FORMAT_YUYV = 0, /**< YUYV format */
|
||||
OB_FORMAT_YUY2 = 1, /**< YUY2 format (the actual format is the same as YUYV) */
|
||||
OB_FORMAT_UYVY = 2, /**< UYVY format */
|
||||
OB_FORMAT_NV12 = 3, /**< NV12 format */
|
||||
OB_FORMAT_NV21 = 4, /**< NV21 format */
|
||||
OB_FORMAT_MJPG = 5, /**< MJPEG encoding format */
|
||||
OB_FORMAT_H264 = 6, /**< H.264 encoding format */
|
||||
OB_FORMAT_H265 = 7, /**< H.265 encoding format */
|
||||
OB_FORMAT_Y16 = 8, /**< Y16 format, 16-bit per pixel, single-channel*/
|
||||
OB_FORMAT_Y8 = 9, /**< Y8 format, 8-bit per pixel, single-channel */
|
||||
OB_FORMAT_Y10 = 10, /**< Y10 format, 10-bit per pixel, single-channel(SDK will unpack into Y16 by default) */
|
||||
OB_FORMAT_Y11 = 11, /**< Y11 format, 11-bit per pixel, single-channel (SDK will unpack into Y16 by default) */
|
||||
OB_FORMAT_Y12 = 12, /**< Y12 format, 12-bit per pixel, single-channel(SDK will unpack into Y16 by default) */
|
||||
OB_FORMAT_GRAY = 13, /**< GRAY (the actual format is the same as YUYV) */
|
||||
OB_FORMAT_HEVC = 14, /**< HEVC encoding format (the actual format is the same as H265) */
|
||||
OB_FORMAT_I420 = 15, /**< I420 format */
|
||||
OB_FORMAT_ACCEL = 16, /**< Acceleration data format */
|
||||
OB_FORMAT_GYRO = 17, /**< Gyroscope data format */
|
||||
OB_FORMAT_POINT = 19, /**< XYZ 3D coordinate point format, @ref OBPoint */
|
||||
OB_FORMAT_RGB_POINT = 20, /**< XYZ 3D coordinate point format with RGB information, @ref OBColorPoint */
|
||||
OB_FORMAT_RLE = 21, /**< RLE pressure test format (SDK will be unpacked into Y16 by default) */
|
||||
OB_FORMAT_RGB = 22, /**< RGB format (actual RGB888) */
|
||||
OB_FORMAT_BGR = 23, /**< BGR format (actual BGR888) */
|
||||
OB_FORMAT_Y14 = 24, /**< Y14 format, 14-bit per pixel, single-channel (SDK will unpack into Y16 by default) */
|
||||
OB_FORMAT_BGRA = 25, /**< BGRA format */
|
||||
OB_FORMAT_COMPRESSED = 26, /**< Compression format */
|
||||
OB_FORMAT_RVL = 27, /**< RVL pressure test format (SDK will be unpacked into Y16 by default) */
|
||||
OB_FORMAT_Z16 = 28, /**< Is same as Y16*/
|
||||
OB_FORMAT_YV12 = 29, /**< Is same as Y12, using for right ir stream*/
|
||||
OB_FORMAT_BA81 = 30, /**< Is same as Y8, using for right ir stream*/
|
||||
OB_FORMAT_RGBA = 31, /**< RGBA format */
|
||||
OB_FORMAT_BYR2 = 32, /**< byr2 format */
|
||||
OB_FORMAT_RW16 = 33, /**< RAW16 format */
|
||||
OB_FORMAT_Y12C4 = 34, /**< Y12C4 format */
|
||||
OB_FORMAT_UNKNOWN = -1, /**< unknown format */
|
||||
OB_FORMAT_YUYV = 0, /**< YUYV format */
|
||||
OB_FORMAT_YUY2 = 1, /**< YUY2 format (the actual format is the same as YUYV) */
|
||||
OB_FORMAT_UYVY = 2, /**< UYVY format */
|
||||
OB_FORMAT_NV12 = 3, /**< NV12 format */
|
||||
OB_FORMAT_NV21 = 4, /**< NV21 format */
|
||||
OB_FORMAT_MJPG = 5, /**< MJPEG encoding format */
|
||||
OB_FORMAT_H264 = 6, /**< H.264 encoding format */
|
||||
OB_FORMAT_H265 = 7, /**< H.265 encoding format */
|
||||
OB_FORMAT_Y16 = 8, /**< Y16 format, 16-bit per pixel, single-channel*/
|
||||
OB_FORMAT_Y8 = 9, /**< Y8 format, 8-bit per pixel, single-channel */
|
||||
OB_FORMAT_Y10 = 10, /**< Y10 format, 10-bit per pixel, single-channel(SDK will unpack into Y16 by default) */
|
||||
OB_FORMAT_Y11 = 11, /**< Y11 format, 11-bit per pixel, single-channel (SDK will unpack into Y16 by default) */
|
||||
OB_FORMAT_Y12 = 12, /**< Y12 format, 12-bit per pixel, single-channel(SDK will unpack into Y16 by default) */
|
||||
OB_FORMAT_GRAY = 13, /**< GRAY (the actual format is the same as YUYV) */
|
||||
OB_FORMAT_HEVC = 14, /**< HEVC encoding format (the actual format is the same as H265) */
|
||||
OB_FORMAT_I420 = 15, /**< I420 format */
|
||||
OB_FORMAT_ACCEL = 16, /**< Acceleration data format */
|
||||
OB_FORMAT_GYRO = 17, /**< Gyroscope data format */
|
||||
OB_FORMAT_POINT = 19, /**< XYZ 3D coordinate point format, @ref OBPoint */
|
||||
OB_FORMAT_RGB_POINT = 20, /**< XYZ 3D coordinate point format with RGB information, @ref OBColorPoint */
|
||||
OB_FORMAT_RLE = 21, /**< RLE pressure test format (SDK will be unpacked into Y16 by default) */
|
||||
OB_FORMAT_RGB = 22, /**< RGB format (actual RGB888) */
|
||||
OB_FORMAT_BGR = 23, /**< BGR format (actual BGR888) */
|
||||
OB_FORMAT_Y14 = 24, /**< Y14 format, 14-bit per pixel, single-channel (SDK will unpack into Y16 by default) */
|
||||
OB_FORMAT_BGRA = 25, /**< BGRA format */
|
||||
OB_FORMAT_COMPRESSED = 26, /**< Compression format */
|
||||
OB_FORMAT_RVL = 27, /**< RVL pressure test format (SDK will be unpacked into Y16 by default) */
|
||||
OB_FORMAT_Z16 = 28, /**< Is same as Y16*/
|
||||
OB_FORMAT_YV12 = 29, /**< Is same as Y12, using for right ir stream*/
|
||||
OB_FORMAT_BA81 = 30, /**< Is same as Y8, using for right ir stream*/
|
||||
OB_FORMAT_RGBA = 31, /**< RGBA format */
|
||||
OB_FORMAT_BYR2 = 32, /**< byr2 format */
|
||||
OB_FORMAT_RW16 = 33, /**< RAW16 format */
|
||||
OB_FORMAT_Y12C4 = 34, /**< Y12C4 format */
|
||||
OB_FORMAT_LIDAR_POINT = 35, /**< XYZ 3D coordinate point format with LiDAR information, @ref OBLiDARPoint */
|
||||
OB_FORMAT_LIDAR_SPHERE_POINT = 36, /**< Spherical coordinate point format with LiDAR information, @ref OBLiDARSpherePoint */
|
||||
OB_FORMAT_LIDAR_SCAN = 37, /**< LiDAR single-line scan mode data format, @ref OBLiDARScanPoint */
|
||||
OB_FORMAT_LIDAR_CALIBRATION = 38, /**< LiDAR calibration mode point format */
|
||||
} OBFormat,
|
||||
ob_format;
|
||||
|
||||
@@ -643,6 +652,21 @@ typedef struct {
|
||||
float z; ///< Z-direction component
|
||||
} OBAccelValue, OBGyroValue, OBFloat3D, ob_accel_value, ob_gyro_value, ob_float_3d;
|
||||
|
||||
/**
|
||||
* @brief Data structures for LiDAR scan rate
|
||||
*/
|
||||
typedef enum {
|
||||
OB_LIDAR_SCAN_UNKNOWN = 0,
|
||||
OB_LIDAR_SCAN_5HZ = 1,
|
||||
OB_LIDAR_SCAN_10HZ = 2,
|
||||
OB_LIDAR_SCAN_15HZ = 3,
|
||||
OB_LIDAR_SCAN_20HZ = 4,
|
||||
OB_LIDAR_SCAN_25HZ = 5,
|
||||
OB_LIDAR_SCAN_30HZ = 6,
|
||||
OB_LIDAR_SCAN_40HZ = 7,
|
||||
} OBLiDARScanRate,
|
||||
ob_lidar_scan_rate, OB_LIDAR_SCAN_RATE;
|
||||
|
||||
/**
|
||||
* @brief Device state
|
||||
*/
|
||||
@@ -800,6 +824,37 @@ typedef struct {
|
||||
float b; ///< Blue channel component
|
||||
} OBColorPoint, ob_color_point;
|
||||
|
||||
/**
|
||||
* @brief 3D point structure with LiDAR information
|
||||
*/
|
||||
typedef struct {
|
||||
float angle; ///< angle, unit: degrees
|
||||
float distance; ///< distance, unit: mm
|
||||
uint16_t intensity; ///< intensity, 0~2000
|
||||
} OBLiDARScanPoint, ob_lidar_scan_point;
|
||||
|
||||
/**
|
||||
* @brief 3D point structure with LiDAR information
|
||||
*/
|
||||
typedef struct {
|
||||
float x; ///< X coordinate, unit mm
|
||||
float y; ///< Y coordinate, unit mm
|
||||
float z; ///< Z coordinate, unit mm
|
||||
uint8_t reflectivity; ///< reflectivity
|
||||
uint8_t tag; ///< point state
|
||||
} OBLiDARPoint, ob_lidar_point;
|
||||
|
||||
/**
|
||||
* @brief 3D point structure with LiDAR information
|
||||
*/
|
||||
typedef struct {
|
||||
float distance; ///< distance, unit: mm
|
||||
float theta; ///< azimuth angle, unit: degrees
|
||||
float phi; ///< zenith angle, unit: degrees
|
||||
uint8_t reflectivity; ///< reflectivity
|
||||
uint8_t tag; ///< tag
|
||||
} OBLiDARSpherePoint, ob_lidar_sphere_point;
|
||||
|
||||
/**
|
||||
* @brief Compression mode
|
||||
*/
|
||||
@@ -1469,13 +1524,13 @@ typedef enum {
|
||||
* @brief Configuration Item for the filter
|
||||
*/
|
||||
typedef struct {
|
||||
const char *name; ///< Name of the configuration item
|
||||
const char * name; ///< Name of the configuration item
|
||||
OBFilterConfigValueType type; ///< Value type of the configuration item
|
||||
double min; ///< Minimum value casted to double
|
||||
double max; ///< Maximum value casted to double
|
||||
double step; ///< Step value casted to double
|
||||
double def; ///< Default value casted to double
|
||||
const char *desc; ///< Description of the configuration item
|
||||
const char * desc; ///< Description of the configuration item
|
||||
} OBFilterConfigSchemaItem, ob_filter_config_schema_item;
|
||||
|
||||
/**
|
||||
@@ -1742,15 +1797,30 @@ typedef enum {
|
||||
* @brief Intra-camera Sync Reference based on the exposure start time, the exposure middle time, or the exposure end time.
|
||||
*/
|
||||
typedef enum {
|
||||
START_OF_EXPOSURE = 0, /**< start of exposure */
|
||||
MIDDLE_OF_EXPOSURE, /**< middle of exposure */
|
||||
END_OF_EXPOSURE, /**< end of exposure */
|
||||
OB_START_OF_EXPOSURE = 0, /**< start of exposure */
|
||||
OB_MIDDLE_OF_EXPOSURE, /**< middle of exposure */
|
||||
OB_END_OF_EXPOSURE, /**< end of exposure */
|
||||
} ob_intra_camera_sync_reference,
|
||||
OBIntraCameraSyncReference;
|
||||
|
||||
// For compatibility
|
||||
#define OB_FRAME_METADATA_TYPE_LASER_POWER_MODE OB_FRAME_METADATA_TYPE_LASER_POWER_LEVEL
|
||||
#define OB_FRAME_METADATA_TYPE_EMITTER_MODE OB_FRAME_METADATA_TYPE_LASER_STATUS
|
||||
#define START_OF_EXPOSURE OB_START_OF_EXPOSURE
|
||||
#define MIDDLE_OF_EXPOSURE OB_MIDDLE_OF_EXPOSURE
|
||||
#define END_OF_EXPOSURE OB_END_OF_EXPOSURE
|
||||
|
||||
/**
|
||||
* @brief Device access mode for GigE network device
|
||||
*/
|
||||
typedef enum {
|
||||
OB_DEVICE_ACCESS_DENIED = 0, ///< No access. This value is only used as a return value
|
||||
OB_DEVICE_EXCLUSIVE_ACCESS = 1, ///< Exclusive access: full read/write, no other application allowed; can preempt existing monitor access
|
||||
OB_DEVICE_CONTROL_ACCESS = 2, ///< Control access: read/write allowed; other applications permitted read-only monitor access
|
||||
OB_DEVICE_MONITOR_ACCESS = 3, ///< Monitor access: read-only; no write or control privileges
|
||||
OB_DEVICE_DEFAULT_ACCESS = 4, ///< Default access: control access for capable devices, ignored otherwise
|
||||
} ob_device_access_mode,
|
||||
OBDeviceAccessMode;
|
||||
|
||||
/**
|
||||
* @brief Callback for file transfer
|
||||
|
||||
@@ -244,6 +244,16 @@ OB_EXPORT void ob_config_enable_accel_stream(ob_config *config, ob_accel_full_sc
|
||||
*/
|
||||
OB_EXPORT void ob_config_enable_gyro_stream(ob_config *config, ob_gyro_full_scale_range full_scale_range, ob_gyro_sample_rate sample_rate, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Enable LiDAR stream with specified parameters
|
||||
*
|
||||
* @param[in] config The pipeline configuration object
|
||||
* @param[in] scan_rate The scan rate of LiDAR
|
||||
* @param[in] format The format of the LiDAR stream
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*/
|
||||
OB_EXPORT void ob_config_enable_lidar_stream(ob_config *config, ob_lidar_scan_rate scan_rate, ob_format format, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get the enabled stream profile list in the pipeline configuration
|
||||
*
|
||||
@@ -344,4 +354,3 @@ OB_EXPORT ob_calibration_param ob_pipeline_get_calibration_param(ob_pipeline *pi
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -556,6 +556,11 @@ typedef enum {
|
||||
*/
|
||||
OB_PROP_INTRA_CAMERA_SYNC_REFERENCE_INT = 236,
|
||||
|
||||
/**
|
||||
* @brief Color camera ROI brightness adjustment
|
||||
*/
|
||||
OB_PROP_COLOR_ROI_BRIGHTNESS_INT = 249,
|
||||
|
||||
/**
|
||||
* @brief Baseline calibration parameters
|
||||
*/
|
||||
@@ -885,6 +890,96 @@ typedef enum {
|
||||
* @note This setting has no effect when AE (Auto Exposure) is disabled.
|
||||
*/
|
||||
OB_PROP_COLOR_DENOISING_LEVEL_INT = 5525,
|
||||
|
||||
/*
|
||||
* @brief LiDAR: set/get IP address
|
||||
*/
|
||||
OB_RAW_DATA_LIDAR_IP_ADDRESS = 8000,
|
||||
|
||||
/**
|
||||
* @brief LiDAR: set/get port
|
||||
*/
|
||||
OB_PROP_LIDAR_PORT_INT = 8001,
|
||||
|
||||
/**
|
||||
* @brief LiDAR: set/get MAC address
|
||||
*/
|
||||
OB_RAW_DATA_LIDAR_MAC_ADDRESS = 8002,
|
||||
|
||||
/**
|
||||
* @brief LiDAR: set/get subnet mask
|
||||
*/
|
||||
OB_RAW_DATA_LIDAR_SUBNET_MASK = 8003,
|
||||
|
||||
/**
|
||||
* @brief LiDAR: set/get work mode
|
||||
*/
|
||||
OB_PROP_LIDAR_WORK_MODE_INT = 8004,
|
||||
|
||||
/**
|
||||
* @brief LiDAR: apply configs
|
||||
*/
|
||||
OB_PROP_LIDAR_APPLY_CONFIGS_INT = 8005,
|
||||
|
||||
/**
|
||||
* @brief LiDAR: set/get tail filter level
|
||||
*/
|
||||
OB_PROP_LIDAR_TAIL_FILTER_LEVEL_INT = 8006,
|
||||
|
||||
/**
|
||||
* @brief LiDAR: set/get mems fov size
|
||||
*/
|
||||
OB_PROP_LIDAR_MEMS_FOV_SIZE_FLOAT = 8007,
|
||||
|
||||
/**
|
||||
* @brief LiDAR: set/get mems frequency
|
||||
*/
|
||||
OB_PROP_LIDAR_MEMS_FRENQUENCY_FLOAT = 8008,
|
||||
|
||||
/**
|
||||
* @brief LiDAR: get product model
|
||||
*/
|
||||
OB_RAW_DATA_LIDAR_PRODUCT_MODEL = 8009,
|
||||
|
||||
/**
|
||||
* @brief LiDAR: get firmware version
|
||||
*/
|
||||
OB_RAW_DATA_LIDAR_FIRMWARE_VERSION = 8010,
|
||||
|
||||
/**
|
||||
* @brief LiDAR: get fpga version
|
||||
*/
|
||||
OB_RAW_DATA_LIDAR_FPGA_VERSION = 8011,
|
||||
|
||||
/**
|
||||
* @brief LiDAR: get warning info
|
||||
*/
|
||||
OB_PROP_LIDAR_WARNING_INFO_INT = 8012,
|
||||
|
||||
/**
|
||||
* @brief LiDAR: get realtime motor spin speed, unit:0.01rpm
|
||||
*/
|
||||
OB_PROP_LIDAR_MOTOR_SPIN_SPEED_INT = 8013,
|
||||
|
||||
/**
|
||||
* @brief LiDAR: get mcu temperature, uint: 0.01degrees delsius
|
||||
*/
|
||||
OB_PROP_LIDAR_MCU_TEMPERATURE_INT = 8014,
|
||||
|
||||
/**
|
||||
* @brief LiDAR: get apd temperature, uint: 0.01degrees delsius
|
||||
*/
|
||||
OB_PROP_LIDAR_APD_TEMPERATURE_INT = 8015,
|
||||
|
||||
/**
|
||||
* @brief LiDAR: get/set specific mode
|
||||
*/
|
||||
OB_PROP_LIDAR_SPECIFIC_MODE_INT = 8016,
|
||||
|
||||
/**
|
||||
* @brief LiDAR: get/set repetitive scan mode
|
||||
*/
|
||||
OB_PROP_LIDAR_REPETITIVE_SCAN_MODE_INT = 8017,
|
||||
} OBPropertyID,
|
||||
ob_property_id;
|
||||
|
||||
|
||||
@@ -58,10 +58,20 @@ OB_EXPORT ob_stream_profile *ob_create_accel_stream_profile(ob_accel_full_scale_
|
||||
* @param[in] sample_rate Gyro sample rate
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return ob_stream_profile* return the accel stream profile object
|
||||
* @return ob_stream_profile* return the gyro stream profile object
|
||||
*/
|
||||
OB_EXPORT ob_stream_profile *ob_create_gyro_stream_profile(ob_gyro_full_scale_range full_scale_range, ob_gyro_sample_rate sample_rate, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Create a LiDAR stream profile object
|
||||
*
|
||||
* @param[in] scan_rate The scan rate of LiDAR
|
||||
* @param[in] format The format of the LiDAR stream
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
* @return ob_stream_profile* return the LiDAR stream profile object
|
||||
*/
|
||||
OB_EXPORT ob_stream_profile *ob_create_lidar_stream_profile(ob_lidar_scan_rate scan_rate, ob_format format, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Copy the stream profile object from an other stream profile object
|
||||
*
|
||||
@@ -343,6 +353,15 @@ OB_EXPORT ob_gyro_intrinsic ob_gyro_stream_get_intrinsic(const ob_stream_profile
|
||||
*/
|
||||
OB_EXPORT void ob_gyro_stream_set_intrinsic(ob_stream_profile *profile, ob_gyro_intrinsic intrinsic, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get the scan rate of the LiDAR stream.
|
||||
*
|
||||
* @param[in] profile Stream profile object. If the profile is not for the LiDAR stream, an error will be returned.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
* @return The scan rate of the LiDAR stream.
|
||||
*/
|
||||
OB_EXPORT ob_lidar_scan_rate ob_lidar_stream_profile_get_scan_rate(const ob_stream_profile *profile, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get the number of StreamProfile lists.
|
||||
*
|
||||
@@ -418,6 +437,21 @@ OB_EXPORT ob_stream_profile *ob_stream_profile_list_get_gyro_stream_profile(cons
|
||||
ob_gyro_full_scale_range full_scale_range, ob_gyro_sample_rate sample_rate,
|
||||
ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Match the corresponding ob_stream_profile through the passed parameters. If there are multiple matches,
|
||||
* the first one in the list will be returned by default. If no matched profile is found, an error will be returned.
|
||||
*
|
||||
* @attention The stream profile returned by this function should be deleted by calling @ref ob_delete_stream_profile() when it is no longer needed.
|
||||
*
|
||||
* @param[in] profile_list Resolution list.
|
||||
* @param[in] scan_rate The scan rate of LiDAR. If you don't need to add matching conditions, you can pass OB_LIDAR_SCAN_ANY.
|
||||
* @param[in] format The format of the LiDAR stream. If you don't need to add matching conditions, you can pass OB_FORMAT_ANY.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
* @return The matching profile.
|
||||
*/
|
||||
OB_EXPORT ob_stream_profile *ob_stream_profile_list_get_lidar_stream_profile(const ob_stream_profile_list *profile_list, ob_lidar_scan_rate scan_rate,
|
||||
ob_format format, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Delete the stream profile list.
|
||||
*
|
||||
|
||||
@@ -72,6 +72,14 @@ OB_EXPORT const char* ob_gyro_range_type_to_string(OBGyroFullScaleRange type);
|
||||
*/
|
||||
OB_EXPORT const char* ob_accel_range_type_to_string(OBAccelFullScaleRange type);
|
||||
|
||||
/**
|
||||
* @brief Convert OBLiDARScanRate to " char* " type and then return.
|
||||
*
|
||||
* @param[in] type OBLiDARScanRate type.
|
||||
* @return OBLiDARScanRate of "char*" type.
|
||||
*/
|
||||
OB_EXPORT const char *ob_lidar_scan_rate_type_to_string(OBLiDARScanRate type);
|
||||
|
||||
/**
|
||||
* @brief Convert OBFrameMetadataType to " char* " type and then return.
|
||||
*
|
||||
|
||||
@@ -119,6 +119,18 @@ OB_EXPORT bool ob_calibration_2d_to_2d(const ob_calibration_param calibration_pa
|
||||
* @return bool save point cloud result
|
||||
*/
|
||||
OB_EXPORT bool ob_save_pointcloud_to_ply(const char *file_name, ob_frame *frame, bool save_binary, bool use_mesh, float mesh_threshold, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief save LiDAR point cloud to ply file.
|
||||
*
|
||||
* @param[in] file_name Point cloud save path
|
||||
* @param[in] frame LiDAR point cloud frame
|
||||
* @param[in] save_binary Binary or textual,true: binary, false: textual
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return bool save LiDAR point cloud result
|
||||
*/
|
||||
OB_EXPORT bool ob_save_lidar_pointcloud_to_ply(const char *file_name, ob_frame *frame, bool save_binary, ob_error **error);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -121,11 +121,15 @@ public:
|
||||
*
|
||||
* @param[in] address The IP address, ipv4 only. such as "192.168.1.10"
|
||||
* @param[in] port The port number, currently only support 8090
|
||||
* @param[in] accessMode Device access mode. @ref ob_device_access_mode.
|
||||
* If the device does not support setting the Access Mode, the default OB_DEVICE_DEFAULT_ACCESS is used.
|
||||
* Applies only on first device creation or after release and re-creation; subsequent calls ignore it.
|
||||
*
|
||||
* @return std::shared_ptr<Device> The created device object.
|
||||
*/
|
||||
std::shared_ptr<Device> createNetDevice(const char *address, uint16_t port) const {
|
||||
std::shared_ptr<Device> createNetDevice(const char *address, uint16_t port, OBDeviceAccessMode accessMode = OB_DEVICE_DEFAULT_ACCESS) const {
|
||||
ob_error *error = nullptr;
|
||||
auto device = ob_create_net_device(impl_, address, port, &error);
|
||||
auto device = ob_create_net_device_ex(impl_, address, port, accessMode, &error);
|
||||
Error::handle(&error);
|
||||
return std::make_shared<Device>(device);
|
||||
}
|
||||
|
||||
@@ -1062,7 +1062,7 @@ public:
|
||||
*
|
||||
* @return const char* the gateway address of the device, such as "192.168.1.1"
|
||||
*/
|
||||
const char *getDevicegateway() const {
|
||||
const char *getDeviceGateway() const {
|
||||
ob_error *error = nullptr;
|
||||
const char *subnetMask = ob_device_info_get_gateway(impl_, &error);
|
||||
Error::handle(&error);
|
||||
@@ -1071,6 +1071,10 @@ public:
|
||||
|
||||
public:
|
||||
// The following interfaces are deprecated and are retained here for compatibility purposes.
|
||||
const char *getDevicegateway() {
|
||||
return getDeviceGateway();
|
||||
}
|
||||
|
||||
const char *name() const {
|
||||
return getName();
|
||||
}
|
||||
@@ -1353,12 +1357,15 @@ public:
|
||||
* @attention If the device has already been acquired and created elsewhere, repeated acquisition will throw an exception
|
||||
*
|
||||
* @param[in] index the index of the device to create
|
||||
* @param[in] accessMode Device access mode. @ref ob_device_access_mode.
|
||||
* If the device does not support setting the Access Mode, the default OB_DEVICE_DEFAULT_ACCESS is used.
|
||||
* Applies only on first device creation or after release and re-creation; subsequent calls ignore it.
|
||||
*
|
||||
* @return std::shared_ptr<Device> the device object
|
||||
*/
|
||||
std::shared_ptr<Device> getDevice(uint32_t index) const {
|
||||
std::shared_ptr<Device> getDevice(uint32_t index, OBDeviceAccessMode accessMode = OB_DEVICE_DEFAULT_ACCESS) const {
|
||||
ob_error *error = nullptr;
|
||||
auto device = ob_device_list_get_device(impl_, index, &error);
|
||||
auto device = ob_device_list_get_device_ex(impl_, index, accessMode, &error);
|
||||
Error::handle(&error);
|
||||
return std::make_shared<Device>(device);
|
||||
}
|
||||
@@ -1369,12 +1376,15 @@ public:
|
||||
* @attention If the device has already been acquired and created elsewhere, repeated acquisition will throw an exception
|
||||
*
|
||||
* @param[in] serialNumber the serial number of the device to create
|
||||
* @param[in] accessMode Device access mode. @ref ob_device_access_mode.
|
||||
* If the device does not support setting the Access Mode, the default OB_DEVICE_DEFAULT_ACCESS is used.
|
||||
* Applies only on first device creation or after release and re-creation; subsequent calls ignore it.
|
||||
*
|
||||
* @return std::shared_ptr<Device> the device object
|
||||
*/
|
||||
std::shared_ptr<Device> getDeviceBySN(const char *serialNumber) const {
|
||||
std::shared_ptr<Device> getDeviceBySN(const char *serialNumber, OBDeviceAccessMode accessMode = OB_DEVICE_DEFAULT_ACCESS) const {
|
||||
ob_error *error = nullptr;
|
||||
auto device = ob_device_list_get_device_by_serial_number(impl_, serialNumber, &error);
|
||||
auto device = ob_device_list_get_device_by_serial_number_ex(impl_, serialNumber, accessMode, &error);
|
||||
Error::handle(&error);
|
||||
return std::make_shared<Device>(device);
|
||||
}
|
||||
@@ -1389,12 +1399,15 @@ public:
|
||||
* @attention If the device has been acquired and created elsewhere, repeated acquisition will throw an exception
|
||||
*
|
||||
* @param[in] uid The uid of the device to be created
|
||||
* @param[in] accessMode Device access mode. @ref ob_device_access_mode.
|
||||
* If the device does not support setting the Access Mode, the default OB_DEVICE_DEFAULT_ACCESS is used.
|
||||
* Applies only on first device creation or after release and re-creation; subsequent calls ignore it.
|
||||
*
|
||||
* @return std::shared_ptr<Device> returns the device object
|
||||
*/
|
||||
std::shared_ptr<Device> getDeviceByUid(const char *uid) const {
|
||||
std::shared_ptr<Device> getDeviceByUid(const char *uid, OBDeviceAccessMode accessMode = OB_DEVICE_DEFAULT_ACCESS) const {
|
||||
ob_error *error = nullptr;
|
||||
auto device = ob_device_list_get_device_by_uid(impl_, uid, &error);
|
||||
auto device = ob_device_list_get_device_by_uid_ex(impl_, uid, accessMode, &error);
|
||||
Error::handle(&error);
|
||||
return std::make_shared<Device>(device);
|
||||
}
|
||||
|
||||
@@ -398,10 +398,9 @@ public:
|
||||
|
||||
/**
|
||||
* @brief Set the point cloud decimation factor.
|
||||
* Calling this function to decimation factor will output thedownsampled data of the the cloud frame
|
||||
*
|
||||
* @brief Calling this function to decimation factor will output thedownsampled data of the the cloud frame
|
||||
*
|
||||
* @param factor The decimation factor.
|
||||
* @param value The decimation factor.
|
||||
*/
|
||||
void setDecimationFactor(int value) {
|
||||
setConfigValue("decimate", value);
|
||||
|
||||
@@ -870,6 +870,34 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Define the LiDARPointsFrame class, which inherits from the Frame class
|
||||
* @brief The LiDARPointsFrame class is used to obtain LiDAR point cloud data.
|
||||
*
|
||||
* @note The pointcloud data format can be obtained from the @ref Frame::getFormat() function. Witch can be one of the following formats:
|
||||
* - @ref OB_FORMAT_LIDAR_POINT: @ref OBLiDARPoint
|
||||
* - @ref OB_FORMAT_LIDAR_SPHERE_POINT: @ref OBLiDARSpherePoint
|
||||
* - @ref OB_FORMAT_LIDAR_SCAN: @ref OBLiDARScanPoint
|
||||
* - @ref OB_FORMAT_LIDAR_CALIBRATION: LiDAR calibration mode point cloud, raw data
|
||||
* - The pointcloud data holds a set of points. To find the number of points, divide the dataSize by the structure
|
||||
* size of the corresponding point type.
|
||||
*/
|
||||
class LiDARPointsFrame : public Frame {
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a new LiDARPointsFrame object with a given pointer to the internal frame object.
|
||||
*
|
||||
* @attention After calling this constructor, the frame object will own the internal frame object, and the internal frame object will be deleted when the
|
||||
* frame object is destroyed.
|
||||
* @attention The internal frame object should not be deleted by the caller.
|
||||
* @attention Please use the FrameFactory to create a Frame object.
|
||||
*
|
||||
* @param[in] impl The pointer to the internal frame object.
|
||||
*/
|
||||
explicit LiDARPointsFrame(const ob_frame *impl) : Frame(impl){};
|
||||
~LiDARPointsFrame() noexcept override = default;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Define the FrameSet class, which inherits from the Frame class
|
||||
* @brief A FrameSet is a container for multiple frames of different types.
|
||||
@@ -1274,6 +1302,8 @@ template <typename T> bool Frame::is() const {
|
||||
return (typeid(T) == typeid(AccelFrame));
|
||||
case OB_FRAME_POINTS:
|
||||
return (typeid(T) == typeid(PointsFrame));
|
||||
case OB_FRAME_LIDAR_POINTS:
|
||||
return (typeid(T) == typeid(LiDARPointsFrame));
|
||||
case OB_FRAME_SET:
|
||||
return (typeid(T) == typeid(FrameSet));
|
||||
default:
|
||||
|
||||
@@ -157,6 +157,22 @@ public:
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable a LiDAR stream to be used in the pipeline.
|
||||
*
|
||||
* This function allows users to enable a LiDAR stream with customizable parameters.
|
||||
* If no parameters are specified, the stream will be enabled with default settings.
|
||||
* Users who wish to set custom full-scale ranges or sample rates should refer to the product manual, as available settings vary by device model.
|
||||
*
|
||||
* @param[in] scanRate The scan rate of the LiDAR (default is OB_LIDAR_SCAN_ANY, which selects the default scan rate).
|
||||
* @param[in] format The stream format (default is OB_FORMAT_ANY, which selects the default format).
|
||||
*/
|
||||
void enableLiDARStream(OBLiDARScanRate scanRate = OB_LIDAR_SCAN_ANY, OBFormat format = OB_FORMAT_ANY) const {
|
||||
ob_error *error = nullptr;
|
||||
ob_config_enable_lidar_stream(impl_, scanRate, format, &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use enableStream(std::shared_ptr<StreamProfile> streamProfile) instead
|
||||
* @brief Enable all streams to be used in the pipeline
|
||||
|
||||
@@ -381,6 +381,24 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Class representing a LiDAR stream profile.
|
||||
*/
|
||||
|
||||
class LiDARStreamProfile : public StreamProfile {
|
||||
public:
|
||||
explicit LiDARStreamProfile(const ob_stream_profile_t *impl) : StreamProfile(impl) {}
|
||||
|
||||
~LiDARStreamProfile() noexcept override = default;
|
||||
|
||||
OBLiDARScanRate getScanRate() const {
|
||||
ob_error *error = nullptr;
|
||||
auto rate = ob_lidar_stream_profile_get_scan_rate(impl_, &error);
|
||||
Error::handle(&error);
|
||||
return rate;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T> bool StreamProfile::is() const {
|
||||
switch(this->getType()) {
|
||||
case OB_STREAM_VIDEO:
|
||||
@@ -396,6 +414,8 @@ template <typename T> bool StreamProfile::is() const {
|
||||
return typeid(T) == typeid(AccelStreamProfile);
|
||||
case OB_STREAM_GYRO:
|
||||
return typeid(T) == typeid(GyroStreamProfile);
|
||||
case OB_STREAM_LIDAR:
|
||||
return typeid(T) == typeid(LiDARStreamProfile);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -421,6 +441,8 @@ public:
|
||||
return std::make_shared<AccelStreamProfile>(impl);
|
||||
case OB_STREAM_GYRO:
|
||||
return std::make_shared<GyroStreamProfile>(impl);
|
||||
case OB_STREAM_LIDAR:
|
||||
return std::make_shared<LiDARStreamProfile>(impl);
|
||||
default: {
|
||||
ob_error *err = ob_create_error(OB_STATUS_ERROR, "Unsupported stream type.", "StreamProfileFactory::create", "", OB_EXCEPTION_TYPE_INVALID_VALUE);
|
||||
Error::handle(&err);
|
||||
@@ -519,6 +541,21 @@ public:
|
||||
return gsp->as<GyroStreamProfile>();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Match the corresponding LiDAR stream profile based on the passed-in parameters. If multiple Match are found, the first one in the list is
|
||||
* returned by default. Throws an exception if no matching profile is found.
|
||||
*
|
||||
* @param[in] scanRate The scan rate of LiDAR. Pass OB_LIDAR_SCAN_ANY if no matching condition is required.
|
||||
* @param[in] format The type of the stream. Pass OB_FORMAT_ANY if no matching condition is required.
|
||||
*/
|
||||
std::shared_ptr<LiDARStreamProfile> getLiDARStreamProfile(OBLiDARScanRate scanRate, OBFormat format) const {
|
||||
ob_error *error = nullptr;
|
||||
auto profile = ob_stream_profile_list_get_lidar_stream_profile(impl_, scanRate, format, &error);
|
||||
Error::handle(&error);
|
||||
auto lsp = StreamProfileFactory::create(profile);
|
||||
return lsp->as<LiDARStreamProfile>();
|
||||
}
|
||||
|
||||
public:
|
||||
// The following interfaces are deprecated and are retained here for compatibility purposes.
|
||||
uint32_t count() const {
|
||||
|
||||
@@ -90,6 +90,16 @@ public:
|
||||
return ob_accel_range_type_to_string(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Convert OBLiDARScanRate to " string " type and then return.
|
||||
*
|
||||
* @param[in] type OBLiDARScanRate type.
|
||||
* @return OBLiDARScanRate of "string" type.
|
||||
*/
|
||||
static std::string convertOBLiDARScanRateTypeToString(const OBLiDARScanRate &type) {
|
||||
return ob_lidar_scan_rate_type_to_string(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Convert OBFrameMetadataType to " string " type and then return.
|
||||
*
|
||||
@@ -152,4 +162,3 @@ public:
|
||||
}
|
||||
};
|
||||
} // namespace ob
|
||||
|
||||
|
||||
@@ -186,5 +186,21 @@ public:
|
||||
Error::handle(&error, false);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Save LiDAR point cloud to PLY file.
|
||||
*
|
||||
* @param[in] fileName Point cloud save path
|
||||
* @param[in] frame LiDAR point cloud frame
|
||||
* @param[in] saveBinary Binary or textual,true: binary, false: textual
|
||||
* @return bool save LiDAR point cloud result
|
||||
*/
|
||||
static bool saveLiDARPointcloudToPly(const char *fileName, std::shared_ptr<ob::LiDARPointsFrame> frame, bool saveBinary) {
|
||||
ob_error *error = NULL;
|
||||
auto unConstImpl = const_cast<ob_frame *>(frame->getImpl());
|
||||
bool result = ob_save_lidar_pointcloud_to_ply(fileName, unConstImpl, saveBinary, &error);
|
||||
Error::handle(&error, false);
|
||||
return result;
|
||||
}
|
||||
};
|
||||
} // namespace ob
|
||||
|
||||
@@ -8,12 +8,12 @@ set(CMAKE_IMPORT_FILE_VERSION 1)
|
||||
# Import target "ob::OrbbecSDK" for configuration "Release"
|
||||
set_property(TARGET ob::OrbbecSDK APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(ob::OrbbecSDK PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.6.0"
|
||||
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.6.1"
|
||||
IMPORTED_SONAME_RELEASE "libOrbbecSDK.so.2"
|
||||
)
|
||||
|
||||
list(APPEND _cmake_import_check_targets ob::OrbbecSDK )
|
||||
list(APPEND _cmake_import_check_files_for_ob::OrbbecSDK "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.6.0" )
|
||||
list(APPEND _cmake_import_check_files_for_ob::OrbbecSDK "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.6.1" )
|
||||
|
||||
# Commands beyond this point should not need to know the version.
|
||||
set(CMAKE_IMPORT_FILE_VERSION)
|
||||
|
||||
@@ -9,19 +9,19 @@
|
||||
# The variable CVF_VERSION must be set before calling configure_file().
|
||||
|
||||
|
||||
set(PACKAGE_VERSION "2.6.0")
|
||||
set(PACKAGE_VERSION "2.6.1")
|
||||
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
|
||||
if("2.6.0" MATCHES "^([0-9]+)\\.")
|
||||
if("2.6.1" MATCHES "^([0-9]+)\\.")
|
||||
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
|
||||
if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
|
||||
string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
|
||||
endif()
|
||||
else()
|
||||
set(CVF_VERSION_MAJOR "2.6.0")
|
||||
set(CVF_VERSION_MAJOR "2.6.1")
|
||||
endif()
|
||||
|
||||
if(PACKAGE_FIND_VERSION_RANGE)
|
||||
|
||||
@@ -1 +1 @@
|
||||
libOrbbecSDK.so.2.6.0
|
||||
libOrbbecSDK.so.2.6.1
|
||||
BIN
Binary file not shown.
@@ -8,12 +8,12 @@ set(CMAKE_IMPORT_FILE_VERSION 1)
|
||||
# Import target "ob::OrbbecSDK" for configuration "Release"
|
||||
set_property(TARGET ob::OrbbecSDK APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(ob::OrbbecSDK PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.6.0"
|
||||
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.6.1"
|
||||
IMPORTED_SONAME_RELEASE "libOrbbecSDK.so.2"
|
||||
)
|
||||
|
||||
list(APPEND _cmake_import_check_targets ob::OrbbecSDK )
|
||||
list(APPEND _cmake_import_check_files_for_ob::OrbbecSDK "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.6.0" )
|
||||
list(APPEND _cmake_import_check_files_for_ob::OrbbecSDK "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.6.1" )
|
||||
|
||||
# Commands beyond this point should not need to know the version.
|
||||
set(CMAKE_IMPORT_FILE_VERSION)
|
||||
|
||||
@@ -9,19 +9,19 @@
|
||||
# The variable CVF_VERSION must be set before calling configure_file().
|
||||
|
||||
|
||||
set(PACKAGE_VERSION "2.6.0")
|
||||
set(PACKAGE_VERSION "2.6.1")
|
||||
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
|
||||
if("2.6.0" MATCHES "^([0-9]+)\\.")
|
||||
if("2.6.1" MATCHES "^([0-9]+)\\.")
|
||||
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
|
||||
if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
|
||||
string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
|
||||
endif()
|
||||
else()
|
||||
set(CVF_VERSION_MAJOR "2.6.0")
|
||||
set(CVF_VERSION_MAJOR "2.6.1")
|
||||
endif()
|
||||
|
||||
if(PACKAGE_FIND_VERSION_RANGE)
|
||||
|
||||
@@ -1 +1 @@
|
||||
libOrbbecSDK.so.2.6.0
|
||||
libOrbbecSDK.so.2.6.1
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user