mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-04 20:17:47 +08:00
Update sdk to v2.2.8 and replace Repeat using clean IR video and speckle depth video with skip frame
This commit is contained in:
@@ -77,6 +77,7 @@ OB_EXPORT ob_device *ob_create_net_device(ob_context *context, const char *addre
|
||||
/**
|
||||
* @brief Set a device plug-in callback function
|
||||
* @attention The added and removed device lists returned through the callback interface need to be released manually
|
||||
* @attention This function supports multiple callbacks. Each call to this function adds a new callback to an internal list.
|
||||
*
|
||||
* @param[in] context Pointer to the context object
|
||||
* @param[in] callback Pointer to the callback function triggered when a device is plugged or unplugged
|
||||
|
||||
@@ -241,6 +241,19 @@ OB_EXPORT void ob_device_update_firmware(ob_device *device, const char *path, ob
|
||||
OB_EXPORT void ob_device_update_firmware_from_data(ob_device *device, const uint8_t *data, uint32_t data_size, ob_device_fw_update_callback callback,
|
||||
bool async, void *user_data, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Update the device optional depth presets.
|
||||
*
|
||||
* @param[in] device The device object.
|
||||
* @param[in] file_path_list A list(2D array) of preset file paths, each up to OB_PATH_MAX characters.
|
||||
* @param[in] path_count The number of the preset file paths.
|
||||
* @param[in] callback The preset upgrade progress callback.
|
||||
* @param[in] user_data User-defined data that will be returned in the callback.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*/
|
||||
OB_EXPORT void ob_device_update_optional_depth_presets(ob_device *device, const char file_path_list[][OB_PATH_MAX], uint8_t path_count,
|
||||
ob_device_fw_update_callback callback, void *user_data, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Device reboot
|
||||
* @attention The device will be disconnected and reconnected. After the device is disconnected, the interface access to the device handle may be abnormal.
|
||||
|
||||
@@ -629,7 +629,7 @@ OB_EXPORT void ob_frameset_push_frame(ob_frame *frameset, const ob_frame *frame,
|
||||
#define ob_gyro_frame_temperature ob_gyro_frame_get_temperature
|
||||
#define ob_frameset_get_frame_count ob_frameset_get_count
|
||||
|
||||
#define ob_frame_time_stamp(frame, err) (ob_frame_get_timestamp_us(frame, err))
|
||||
#define ob_frame_time_stamp(frame, err) (ob_frame_get_timestamp_us(frame, err) / 1000)
|
||||
#define ob_frame_system_time_stamp(frame, err) (ob_frame_get_system_timestamp_us(frame, err))
|
||||
#define ob_frame_set_system_time_stamp(frame, system_timestamp, err) (ob_frame_set_system_timestamp_us(frame, system_timestamp * 1000, err))
|
||||
#define ob_frame_set_device_time_stamp(frame, device_timestamp, err) (ob_frame_set_timestamp_us(frame, device_timestamp * 1000, err))
|
||||
@@ -637,4 +637,3 @@ OB_EXPORT void ob_frameset_push_frame(ob_frame *frameset, const ob_frame *frame,
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -49,6 +49,11 @@ typedef struct ob_device_frame_interleave_list_t ob_device_frame_interleave_list
|
||||
#define OB_GYRO_FULL_SCALE_RANGE_ANY OB_GYRO_FS_UNKNOWN
|
||||
#define OB_GYRO_SAMPLE_RATE_ANY OB_SAMPLE_RATE_UNKNOWN
|
||||
|
||||
/**
|
||||
* @brief maximum path length
|
||||
*/
|
||||
#define OB_PATH_MAX (1024)
|
||||
|
||||
/**
|
||||
* @brief the permission type of api or property
|
||||
*/
|
||||
@@ -238,20 +243,24 @@ typedef enum {
|
||||
* @brief Enumeration value describing the firmware upgrade status
|
||||
*/
|
||||
typedef enum {
|
||||
STAT_VERIFY_SUCCESS = 5, /**< Image file verifify success */
|
||||
STAT_FILE_TRANSFER = 4, /**< file transfer */
|
||||
STAT_DONE = 3, /**< update completed */
|
||||
STAT_IN_PROGRESS = 2, /**< upgrade in process */
|
||||
STAT_START = 1, /**< start the upgrade */
|
||||
STAT_VERIFY_IMAGE = 0, /**< Image file verification */
|
||||
ERR_VERIFY = -1, /**< Verification failed */
|
||||
ERR_PROGRAM = -2, /**< Program execution failed */
|
||||
ERR_ERASE = -3, /**< Flash parameter failed */
|
||||
ERR_FLASH_TYPE = -4, /**< Flash type error */
|
||||
ERR_IMAGE_SIZE = -5, /**< Image file size error */
|
||||
ERR_OTHER = -6, /**< other errors */
|
||||
ERR_DDR = -7, /**< DDR access error */
|
||||
ERR_TIMEOUT = -8 /**< timeout error */
|
||||
STAT_DONE_WITH_DUPLICATES = 6, /**< update completed, but some files were duplicated and ignored */
|
||||
STAT_VERIFY_SUCCESS = 5, /**< Image file verifify success */
|
||||
STAT_FILE_TRANSFER = 4, /**< file transfer */
|
||||
STAT_DONE = 3, /**< update completed */
|
||||
STAT_IN_PROGRESS = 2, /**< upgrade in process */
|
||||
STAT_START = 1, /**< start the upgrade */
|
||||
STAT_VERIFY_IMAGE = 0, /**< Image file verification */
|
||||
ERR_VERIFY = -1, /**< Verification failed */
|
||||
ERR_PROGRAM = -2, /**< Program execution failed */
|
||||
ERR_ERASE = -3, /**< Flash parameter failed */
|
||||
ERR_FLASH_TYPE = -4, /**< Flash type error */
|
||||
ERR_IMAGE_SIZE = -5, /**< Image file size error */
|
||||
ERR_OTHER = -6, /**< other errors */
|
||||
ERR_DDR = -7, /**< DDR access error */
|
||||
ERR_TIMEOUT = -8, /**< timeout error */
|
||||
ERR_MISMATCH = -9, /**< Mismatch firmware error */
|
||||
ERR_UNSUPPORT_DEV = -10, /**< Unsupported device error */
|
||||
ERR_INVALID_COUNT = -11, /**< invalid firmware/preset count */
|
||||
} OBUpgradeState,
|
||||
OBFwUpdateState, ob_upgrade_state, ob_fw_update_state;
|
||||
|
||||
@@ -855,6 +864,11 @@ typedef enum {
|
||||
*/
|
||||
OB_SYNC_MODE_SECONDARY_SOFT_TRIGGER = 0x07,
|
||||
|
||||
/**
|
||||
* @brief IR and IMU sync signal
|
||||
*/
|
||||
OB_SYNC_MODE_IR_IMU_SYNC = 0x08,
|
||||
|
||||
/**
|
||||
* @brief Unknown type
|
||||
*/
|
||||
@@ -920,6 +934,16 @@ typedef struct {
|
||||
uint16_t deviceId;
|
||||
|
||||
} OBDeviceSyncConfig, ob_device_sync_config, OB_DEVICE_SYNC_CONFIG;
|
||||
|
||||
/**
|
||||
* @brief Preset tag
|
||||
*/
|
||||
typedef enum {
|
||||
OB_DEVICE_DEPTH_WORK_MODE = 0,
|
||||
OB_CUSTOM_DEPTH_WORK_MODE = 1,
|
||||
} OBDepthWorkModeTag,
|
||||
ob_depth_work_mode_tag;
|
||||
|
||||
/**
|
||||
* @brief Depth work mode
|
||||
*/
|
||||
@@ -933,6 +957,11 @@ typedef struct {
|
||||
* @brief Name of work mode
|
||||
*/
|
||||
char name[32];
|
||||
/**
|
||||
* @brief Preset tag
|
||||
*/
|
||||
OBDepthWorkModeTag tag;
|
||||
|
||||
} OBDepthWorkMode, ob_depth_work_mode;
|
||||
|
||||
/**
|
||||
@@ -1128,6 +1157,12 @@ typedef enum {
|
||||
* @attention In this mode, the user may return null when getting the specified type of data frame from the acquired FrameSet
|
||||
*/
|
||||
OB_FRAME_AGGREGATE_OUTPUT_ANY_SITUATION,
|
||||
/**
|
||||
* @brief Disable Frame Aggreate
|
||||
*
|
||||
* @attention In this mode, All types of data frames will output independently.
|
||||
*/
|
||||
OB_FRAME_AGGREGATE_OUTPUT_DISABLE,
|
||||
} OB_FRAME_AGGREGATE_OUTPUT_MODE,
|
||||
OBFrameAggregateOutputMode, ob_frame_aggregate_output_mode;
|
||||
#define OB_FRAME_AGGREGATE_OUTPUT_FULL_FRAME_REQUIRE OB_FRAME_AGGREGATE_OUTPUT_ALL_TYPE_FRAME_REQUIRE
|
||||
@@ -1240,6 +1275,11 @@ typedef enum {
|
||||
*/
|
||||
OB_MULTI_DEVICE_SYNC_MODE_HARDWARE_TRIGGERING = 1 << 6,
|
||||
|
||||
/**
|
||||
* @brief IR and IMU sync mode
|
||||
*/
|
||||
OB_MULTI_DEVICE_SYNC_MODE_IR_IMU_SYNC = 1 << 7,
|
||||
|
||||
} ob_multi_device_sync_mode,
|
||||
OBMultiDeviceSyncMode;
|
||||
|
||||
@@ -1405,6 +1445,16 @@ typedef struct {
|
||||
char numberStr[16];
|
||||
} OBDeviceSerialNumber, ob_device_serial_number, OBSerialNumber, ob_serial_number;
|
||||
|
||||
/**
|
||||
* @brief Disparity offset interleaving configuration
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t enable;
|
||||
uint8_t offset0;
|
||||
uint8_t offset1;
|
||||
uint8_t reserved;
|
||||
} OBDispOffsetConfig, ob_disp_offset_config;
|
||||
|
||||
/**
|
||||
* @brief Frame metadata types
|
||||
* @brief The frame metadata is a set of meta info generated by the device for current individual frame.
|
||||
@@ -1588,6 +1638,16 @@ typedef enum {
|
||||
*/
|
||||
OB_FRAME_METADATA_TYPE_GPIO_INPUT_DATA = 31,
|
||||
|
||||
/**
|
||||
* @brief disparity search offset value
|
||||
*/
|
||||
OB_FRAME_METADATA_TYPE_DISPARITY_SEARCH_OFFSET = 32,
|
||||
|
||||
/**
|
||||
* @brief disparity search range
|
||||
*/
|
||||
OB_FRAME_METADATA_TYPE_DISPARITY_SEARCH_RANGE = 33,
|
||||
|
||||
/**
|
||||
* @brief The number of frame metadata types, using for types iterating
|
||||
* @attention It is not a valid frame metadata type
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) Orbbec Inc. All Rights Reserved.
|
||||
// Copyright (c) Orbbec Inc. All Rights Reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
/**
|
||||
@@ -440,6 +440,29 @@ typedef enum {
|
||||
*/
|
||||
OB_PROP_DISP_SEARCH_RANGE_MODE_INT = 191,
|
||||
|
||||
/**
|
||||
* @brief Laser high temperature protection
|
||||
*/
|
||||
OB_PROP_LASER_HIGH_TEMPERATURE_PROTECT_BOOL = 193,
|
||||
|
||||
/**
|
||||
* @brief low exposure laser control
|
||||
*
|
||||
* @brief Currently using for DabaiA device,if the exposure value is lower than a certain threshold, the laser is turned off;
|
||||
* if it exceeds another threshold, the laser is turned on again.
|
||||
*/
|
||||
OB_PROP_LOW_EXPOSURE_LASER_CONTROL_BOOL = 194,
|
||||
|
||||
/**
|
||||
* @brief check pps sync in signal
|
||||
*/
|
||||
OB_PROP_CHECK_PPS_SYNC_IN_SIGNAL_BOOL = 195,
|
||||
|
||||
/**
|
||||
* @brief Disparity search range offset, range: [0, 127]
|
||||
*/
|
||||
OB_PROP_DISP_SEARCH_OFFSET_INT = 196,
|
||||
|
||||
/**
|
||||
* @brief Repower device (cut off power and power on again)
|
||||
*
|
||||
@@ -460,7 +483,24 @@ typedef enum {
|
||||
* @brief laser pattern sync with delay(us)
|
||||
*/
|
||||
OB_PROP_FRAME_INTERLEAVE_LASER_PATTERN_SYNC_DELAY_INT = 206,
|
||||
/**
|
||||
* @brief Get the health check result from device,range is [0.0f,1.5f]
|
||||
*/
|
||||
OB_PROP_ON_CHIP_CALIBRATION_HEALTH_CHECK_FLOAT = 209,
|
||||
|
||||
/**
|
||||
* @brief Enable or disable on-chip calibration
|
||||
*/
|
||||
OB_PROP_ON_CHIP_CALIBRATION_ENABLE_BOOL = 210,
|
||||
|
||||
/**
|
||||
* @brief hardware noise remove filter switch
|
||||
*/
|
||||
OB_PROP_HW_NOISE_REMOVE_FILTER_ENABLE_BOOL = 211,
|
||||
/**
|
||||
* @brief hardware noise remove filter threshold ,range [0.0 - 1.0]
|
||||
*/
|
||||
OB_PROP_HW_NOISE_REMOVE_FILTER_THRESHOLD_FLOAT = 212,
|
||||
/**
|
||||
* @brief Baseline calibration parameters
|
||||
*/
|
||||
@@ -545,6 +585,11 @@ typedef enum {
|
||||
*/
|
||||
OB_STRUCT_ASIC_SERIAL_NUMBER = 1063,
|
||||
|
||||
/**
|
||||
* @brief Disparity offset interleaving
|
||||
*/
|
||||
OB_STRUCT_DISP_OFFSET_CONFIG = 1064,
|
||||
|
||||
/**
|
||||
* @brief Color camera auto exposure
|
||||
*/
|
||||
@@ -704,6 +749,10 @@ typedef enum {
|
||||
* @brief Color camera FOCUS
|
||||
*/
|
||||
OB_PROP_COLOR_FOCUS_INT = 2038,
|
||||
/**
|
||||
* @brief ir rectify status,true: ir rectify, false: no rectify
|
||||
*/
|
||||
OB_PROP_IR_RECTIFY_BOOL = 2040,
|
||||
|
||||
/**
|
||||
* @brief Depth camera priority
|
||||
|
||||
@@ -113,6 +113,7 @@ public:
|
||||
|
||||
/**
|
||||
* @brief Set the device plug-in callback function.
|
||||
* @attention This function supports multiple callbacks. Each call to this function adds a new callback to an internal list.
|
||||
*
|
||||
* @param callback The function triggered when the device is plugged and unplugged.
|
||||
*/
|
||||
|
||||
@@ -383,6 +383,20 @@ public:
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Update the device optional depth presets
|
||||
*
|
||||
* @param filePathList A list(2D array) of preset file paths, each up to OB_PATH_MAX characters.
|
||||
* @param pathCount The number of the preset file paths.
|
||||
* @param callback Preset update progress and status callback
|
||||
*/
|
||||
void updateOptionalDepthPresets(const char filePathList[][OB_PATH_MAX], uint8_t pathCount, DeviceFwUpdateCallback callback) {
|
||||
ob_error *error = nullptr;
|
||||
fwUpdateCallback_ = callback;
|
||||
ob_device_update_optional_depth_presets(impl_, filePathList, pathCount, &Device::firmwareUpdateCallback, this, &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the device state changed callbacks
|
||||
*
|
||||
|
||||
@@ -957,7 +957,9 @@ private:
|
||||
|
||||
static void BufferDestroy(uint8_t *buffer, void *context) {
|
||||
auto *ctx = static_cast<BufferDestroyContext *>(context);
|
||||
ctx->callback(buffer);
|
||||
if (ctx->callback) {
|
||||
ctx->callback(buffer);
|
||||
}
|
||||
delete ctx;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user