Update lidar SDK to v2.4.6

This commit is contained in:
jj
2025-07-02 16:09:59 +08:00
parent 5067dac5b4
commit c5dfaebe5c
25 changed files with 246 additions and 69 deletions
@@ -269,6 +269,42 @@ OB_EXPORT const char *ob_device_frame_interleave_list_get_name(ob_device_frame_i
OB_EXPORT bool ob_device_frame_interleave_list_has_frame_interleave(ob_device_frame_interleave_list *frame_interleave_list, const char *frame_interleave_name,
ob_error **error);
/* @brief Get the available preset resolution config list.
*
* @param device The device object.
* @param error Log error messages.
* @return The available frame interleave list.
*
*/
OB_EXPORT ob_preset_resolution_config_list *ob_device_get_available_preset_resolution_config_list(ob_device *device, ob_error **error);
/* @brief Get the number of preset resolution in the preset resolution list.
*
* @param ob_preset_resolution_config_list The available preset resolution list.
* @param error Log error messages.
* @return The number of preset resolution in the preset resolution list.
*/
OB_EXPORT uint32_t ob_device_preset_resolution_config_get_count(ob_preset_resolution_config_list *ob_preset_resolution_config_list, ob_error **error);
/**
* @brief Get the preset resolution in the preset resolution list.
*
* @param ob_preset_resolution_config_list The available preset resolution list.
* @param index The index of preset resolution in the preset resolution list.
* @param error Log error messages.
* @return The preset resolution in the preset resolution list.
*/
OB_EXPORT OBPresetResolutionConfig ob_device_preset_resolution_config_list_get_item(const ob_preset_resolution_config_list *ob_preset_resolution_config_lis,
uint32_t index, ob_error **error);
/**
* @brief Delete the available preset resolution list.
*
* @param frame_interleave_list The available preset resolution list.
* @param error Log error messages.
*/
OB_EXPORT void ob_delete_preset_resolution_config_list(ob_preset_resolution_config_list *ob_preset_resolution_config_list, ob_error **error);
// The following interfaces are deprecated and are retained here for compatibility purposes.
#define ob_depth_work_mode_list_count ob_depth_work_mode_list_get_count
#define ob_device_preset_list_count ob_device_preset_list_get_count
@@ -39,6 +39,7 @@ typedef struct ob_depth_work_mode_list_t ob_depth_work_mode_list;
typedef struct ob_device_preset_list_t ob_device_preset_list;
typedef struct ob_filter_config_schema_list_t ob_filter_config_schema_list;
typedef struct ob_device_frame_interleave_list_t ob_device_frame_interleave_list;
typedef struct ob_preset_resolution_config_list_t ob_preset_resolution_config_list;
#define OB_WIDTH_ANY 0
#define OB_HEIGHT_ANY 0
@@ -126,17 +127,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_LIDAR = 9, /**< LiDAR */
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;
@@ -144,18 +146,19 @@ typedef enum {
* @brief Enumeration value describing the type of data stream
*/
typedef enum {
OB_STREAM_UNKNOWN = -1, /**< Unknown type stream */
OB_STREAM_VIDEO = 0, /**< Video stream (infrared, color, depth streams are all video streams) */
OB_STREAM_IR = 1, /**< IR stream */
OB_STREAM_COLOR = 2, /**< color stream */
OB_STREAM_DEPTH = 3, /**< depth stream */
OB_STREAM_ACCEL = 4, /**< Accelerometer data stream */
OB_STREAM_GYRO = 5, /**< Gyroscope data stream */
OB_STREAM_IR_LEFT = 6, /**< Left IR stream for stereo camera */
OB_STREAM_IR_RIGHT = 7, /**< Right IR stream for stereo camera */
OB_STREAM_RAW_PHASE = 8, /**< RawPhase Stream */
OB_STREAM_LIDAR = 9, /**< LiDAR Stream for LiDAR device*/
OB_STREAM_TYPE_COUNT, /**< The total number of stream type,is not a valid stream type */
OB_STREAM_UNKNOWN = -1, /**< Unknown type stream */
OB_STREAM_VIDEO = 0, /**< Video stream (infrared, color, depth streams are all video streams) */
OB_STREAM_IR = 1, /**< IR stream */
OB_STREAM_COLOR = 2, /**< color stream */
OB_STREAM_DEPTH = 3, /**< depth stream */
OB_STREAM_ACCEL = 4, /**< Accelerometer data stream */
OB_STREAM_GYRO = 5, /**< Gyroscope data stream */
OB_STREAM_IR_LEFT = 6, /**< Left IR stream for stereo camera */
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;
@@ -175,7 +178,8 @@ typedef enum {
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_LIDAR_POINTS = 11, /**< LiDAR point3d cloud 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;
@@ -231,10 +235,11 @@ typedef enum {
OB_FORMAT_RGBA = 31, /**< RGBA format */
OB_FORMAT_BYR2 = 32, /**< byr2 format */
OB_FORMAT_RW16 = 33, /**< RAW16 format */
OB_FORMAT_LIDAR_POINT = 34, /**< XYZ 3D coordinate point format with LiDAR information, @ref OBLiDARPoint */
OB_FORMAT_LIDAR_SPHERE_POINT = 35, /**< XYZ 3D coordinate point format with LiDAR information, @ref OBLiDARSpherePoint */
OB_FORMAT_LIDAR_SCAN = 36, /**< LiDAR single-line scan mode data format, @ref OBLiDARScanPoint */
OB_FORMAT_LIDAR_CALIBRATION = 37, /**< LiDAR calibration mode point 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, /**< XYZ 3D 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;
@@ -457,6 +462,13 @@ typedef struct {
bool isMirrored; ///< Whether the image frame corresponding to this group of parameters is mirrored
} OBCameraParam, ob_camera_param;
typedef struct {
int16_t width; ///< width
int16_t height; ///< height
int irDecimationFactor; ///< ir decimation factor
int depthDecimationFactor; ///< depth decimation factor
} OBPresetResolutionConfig, ob_preset_resolution_ratio_config;
/**
* @brief calibration parameters
*/
@@ -648,6 +660,7 @@ typedef enum {
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;
@@ -1882,7 +1895,7 @@ typedef void (*ob_playback_status_changed_callback)(ob_playback_status status, v
*/
#define ob_is_video_sensor_type(sensor_type) \
(sensor_type == OB_SENSOR_COLOR || sensor_type == OB_SENSOR_DEPTH || sensor_type == OB_SENSOR_IR || sensor_type == OB_SENSOR_IR_LEFT \
|| sensor_type == OB_SENSOR_IR_RIGHT)
|| sensor_type == OB_SENSOR_IR_RIGHT || sensor_type == OB_SENSOR_CONFIDENCE)
/**
* @brief check if the stream_type is a video stream
@@ -1892,7 +1905,7 @@ typedef void (*ob_playback_status_changed_callback)(ob_playback_status status, v
*/
#define ob_is_video_stream_type(stream_type) \
(stream_type == OB_STREAM_COLOR || stream_type == OB_STREAM_DEPTH || stream_type == OB_STREAM_IR || stream_type == OB_STREAM_IR_LEFT \
|| stream_type == OB_STREAM_IR_RIGHT || stream_type == OB_STREAM_VIDEO)
|| stream_type == OB_STREAM_IR_RIGHT || stream_type == OB_STREAM_VIDEO || stream_type == OB_STREAM_CONFIDENCE)
/**
* @brief Check if sensor_type is an IR sensor
@@ -515,6 +515,36 @@ typedef enum {
*/
OB_DEVICE_PTP_CLOCK_SYNC_ENABLE_BOOL = 223,
/**
* @brief Depth with confidence stream enable
*/
OB_PROP_DEPTH_WITH_CONFIDENCE_STREAM_ENABLE_BOOL = 224,
/**
* @brief Enable or disable confidence stream filter
*/
OB_PROP_CONFIDENCE_STREAM_FILTER_BOOL = 226,
/**
* @brief Confidence stream filter threshold, range [0, 255]
*/
OB_PROP_CONFIDENCE_STREAM_FILTER_THRESHOLD_INT = 227,
/**
* @brief Confidence stream mirror enable
*/
OB_PROP_CONFIDENCE_MIRROR_BOOL = 229,
/**
* @brief Confidence stream flip enable
*/
OB_PROP_CONFIDENCE_FLIP_BOOL = 230,
/**
* @brief Confidence stream rotate angle{0, 90, 180, 270}
*/
OB_PROP_CONFIDENCE_ROTATE_INT = 231,
/**
* @brief Baseline calibration parameters
*/
@@ -604,6 +634,11 @@ typedef enum {
*/
OB_STRUCT_DISP_OFFSET_CONFIG = 1064,
/**
* @brief Preset resolution ratio configuration
*/
OB_STRUCT_PRESET_RESOLUTION_CONFIG = 1069,
/**
* @brief Color camera auto exposure
*/
@@ -998,6 +1033,11 @@ typedef enum {
* @brief LiDAR: get/set specific mode
*/
OB_PROP_LIDAR_SPECIFIC_MODE_INT = 8033,
/**
* @brief LiDAR: get/set repetitive scan mode
*/
OB_PROP_LIDAR_REPETITIVE_SCAN_MODE_INT = 8034,
} OBPropertyID,
ob_property_id;