diff --git a/orbbec_camera/SDK/include/libobsensor/h/ObTypes.h b/orbbec_camera/SDK/include/libobsensor/h/ObTypes.h index 92c7d656..9b6ce026 100644 --- a/orbbec_camera/SDK/include/libobsensor/h/ObTypes.h +++ b/orbbec_camera/SDK/include/libobsensor/h/ObTypes.h @@ -77,6 +77,11 @@ typedef struct DevicePresetListImpl ob_device_preset_list; #define OB_FORMAT_ANY OB_FORMAT_UNKNOWN #define OB_PROFILE_DEFAULT 0 +#define OB_ACCEL_FULL_SCALE_RANGE_ANY OB_ACCEL_FS_UNKNOWN +#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 + /** * @brief send data or receive data return status type */ @@ -458,7 +463,7 @@ typedef struct { OBCameraIntrinsic rgbIntrinsic; ///< Color camera internal parameters OBCameraDistortion depthDistortion; ///< Depth camera distortion parameters OBCameraDistortion rgbDistortion; ///< Color camera distortion parameters - OBD2CTransform transform; ///< Rotation/transformation matrix + OBD2CTransform transform; ///< Rotation/transformation matrix (from depth to color) bool isMirrored; ///< Whether the image frame corresponding to this group of parameters is mirrored } OBCameraParam, ob_camera_param; @@ -576,6 +581,7 @@ typedef enum { * @brief Enumeration of IMU sample rate values (gyroscope or accelerometer) */ typedef enum { + OB_SAMPLE_RATE_UNKNOWN = 0, /**< Unknown sample rate */ OB_SAMPLE_RATE_1_5625_HZ = 1, /**< 1.5625Hz */ OB_SAMPLE_RATE_3_125_HZ, /**< 3.125Hz */ OB_SAMPLE_RATE_6_25_HZ, /**< 6.25Hz */ @@ -598,14 +604,15 @@ typedef enum { * @brief Enumeration of gyroscope ranges */ typedef enum { - OB_GYRO_FS_16dps = 1, /**< 16 degrees per second */ - OB_GYRO_FS_31dps, /**< 31 degrees per second */ - OB_GYRO_FS_62dps, /**< 62 degrees per second */ - OB_GYRO_FS_125dps, /**< 125 degrees per second */ - OB_GYRO_FS_250dps, /**< 250 degrees per second */ - OB_GYRO_FS_500dps, /**< 500 degrees per second */ - OB_GYRO_FS_1000dps, /**< 1000 degrees per second */ - OB_GYRO_FS_2000dps, /**< 2000 degrees per second */ + OB_GYRO_FS_UNKNOWN = 0, /**< Unknown range */ + OB_GYRO_FS_16dps = 1, /**< 16 degrees per second */ + OB_GYRO_FS_31dps, /**< 31 degrees per second */ + OB_GYRO_FS_62dps, /**< 62 degrees per second */ + OB_GYRO_FS_125dps, /**< 125 degrees per second */ + OB_GYRO_FS_250dps, /**< 250 degrees per second */ + OB_GYRO_FS_500dps, /**< 500 degrees per second */ + OB_GYRO_FS_1000dps, /**< 1000 degrees per second */ + OB_GYRO_FS_2000dps, /**< 2000 degrees per second */ } OBGyroFullScaleRange, ob_gyro_full_scale_range, OB_GYRO_FULL_SCALE_RANGE; @@ -613,10 +620,11 @@ typedef enum { * @brief Enumeration of accelerometer ranges */ typedef enum { - OB_ACCEL_FS_2g = 1, /**< 1x the acceleration of gravity */ - OB_ACCEL_FS_4g, /**< 4x the acceleration of gravity */ - OB_ACCEL_FS_8g, /**< 8x the acceleration of gravity */ - OB_ACCEL_FS_16g, /**< 16x the acceleration of gravity */ + OB_ACCEL_FS_UNKNOWN = 0, /**< Unknown range */ + OB_ACCEL_FS_2g = 1, /**< 1x the acceleration of gravity */ + OB_ACCEL_FS_4g, /**< 4x the acceleration of gravity */ + OB_ACCEL_FS_8g, /**< 8x the acceleration of gravity */ + OB_ACCEL_FS_16g, /**< 16x the acceleration of gravity */ } OBAccelFullScaleRange, ob_accel_full_scale_range, OB_ACCEL_FULL_SCALE_RANGE; @@ -995,7 +1003,6 @@ typedef struct { uint16_t disp_diff; OBDDONoiseRemovalType type; } OBNoiseRemovalFilterParams, ob_noise_removal_filter_params; -; /** * @brief Control command protocol version number diff --git a/orbbec_camera/SDK/include/libobsensor/h/Pipeline.h b/orbbec_camera/SDK/include/libobsensor/h/Pipeline.h index fbaa0029..9edbd4b6 100644 --- a/orbbec_camera/SDK/include/libobsensor/h/Pipeline.h +++ b/orbbec_camera/SDK/include/libobsensor/h/Pipeline.h @@ -263,6 +263,51 @@ void ob_delete_config(ob_config *config, ob_error **error); */ void ob_config_enable_stream(ob_config *config, ob_stream_profile *profile, ob_error **error); +/** + * @brief Enable a video stream to be used in the configuration. + * + * This function configures and enables a video stream with specific parameters. + * Users must specify all parameters explicitly as C does not support default arguments. + * Refer to the product manual for details on supported resolutions and formats for different camera models. + * + * @param config Pointer to the configuration structure. + * @param type The video stream type. + * @param width The video stream width. + * @param height The video stream height. + * @param fps The video stream frame rate. + * @param format The video stream format. + * @param error Pointer to store the error if operation fails. + */ +void ob_config_enable_video_stream(ob_config *config, ob_stream_type type, int width, int height, int fps, ob_format format, ob_error **error); + +/** + * @brief Enable an accelerometer stream to be used in the configuration. + * + * This function configures and enables an accelerometer stream with specific parameters. + * Users must specify all parameters explicitly. For details on available full-scale ranges and sample rates, + * please refer to the product manual. + * + * @param config Pointer to the configuration structure. + * @param fullScaleRange The full-scale range of the accelerometer. + * @param sampleRate The sample rate of the accelerometer. + * @param error Pointer to store the error if operation fails. + */ +void ob_config_enable_accel_stream(ob_config *config, ob_accel_full_scale_range full_scale_range, ob_accel_sample_rate sample_rate, ob_error **error); + +/** + * @brief Enable a gyroscope stream to be used in the configuration. + * + * This function configures and enables a gyroscope stream with specific parameters. + * Users must specify all parameters explicitly. For details on available full-scale ranges and sample rates, + * please refer to the product manual. + * + * @param config Pointer to the configuration structure. + * @param fullScaleRange The full-scale range of the gyroscope. + * @param sampleRate The sample rate of the gyroscope. + * @param error Pointer to store the error if operation fails. + */ +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); + /** * @deprecated Use @ref ob_config_enable_stream instead * @brief Enable all streams in the pipeline configuration diff --git a/orbbec_camera/SDK/include/libobsensor/h/Property.h b/orbbec_camera/SDK/include/libobsensor/h/Property.h index 2af0c5eb..65ae774a 100644 --- a/orbbec_camera/SDK/include/libobsensor/h/Property.h +++ b/orbbec_camera/SDK/include/libobsensor/h/Property.h @@ -413,6 +413,26 @@ typedef enum { */ OB_PROP_IR_BRIGHTNESS_INT = 184, + /** + * @brief slave device sync status + */ + OB_PROP_SLAVE_DEVICE_SYNC_STATUS_BOOL = 188, + + /** + * @brief Color AE max exposure + */ + OB_PROP_COLOR_AE_MAX_EXPOSURE_INT = 189, + + /** + * @brief IR AE max exposure + */ + OB_PROP_IR_AE_MAX_EXPOSURE_INT = 190, + + /** + * @brief disparity search range mode + */ + OB_PROP_DISP_SEARCH_RANGE_MODE_INT = 191, + /** * @brief Baseline calibration parameters */ diff --git a/orbbec_camera/SDK/include/libobsensor/hpp/Device.hpp b/orbbec_camera/SDK/include/libobsensor/hpp/Device.hpp index 2cb6ed57..b4bf8d74 100644 --- a/orbbec_camera/SDK/include/libobsensor/hpp/Device.hpp +++ b/orbbec_camera/SDK/include/libobsensor/hpp/Device.hpp @@ -558,6 +558,13 @@ public: */ const char *getCurrentPresetName(); + /** + * @brief Get current depth mode name + * @brief According the current preset name to return current depth mode name + * @return const char* return the current depth mode name. + */ + const char *getCurrentDepthModeName(); + /** * @brief load the preset according to the preset name. * @attention After loading the preset, the settings in the preset will set to the device immediately. Therefore, it is recommended to re-read the device diff --git a/orbbec_camera/SDK/include/libobsensor/hpp/Pipeline.hpp b/orbbec_camera/SDK/include/libobsensor/hpp/Pipeline.hpp index 6b4639a3..88a4bcf4 100644 --- a/orbbec_camera/SDK/include/libobsensor/hpp/Pipeline.hpp +++ b/orbbec_camera/SDK/include/libobsensor/hpp/Pipeline.hpp @@ -63,6 +63,11 @@ public: */ void start(std::shared_ptr config); + /** + * @brief Start the pipeline with default configuration parameters + */ + void start(); + /** * @brief Start the pipeline and set the frameset data callback * @@ -76,6 +81,10 @@ public: */ void stop(); + /** + * @brief get Enabled Stream Profile List,It must be called after the pipeline is started, otherwise it will return an empty list + */ + std::shared_ptr getEnabledStreamProfileList(); /** * @brief Get the pipeline configuration parameters * @brief Returns the default configuration if the user has not configured it @@ -90,7 +99,7 @@ public: * @param timeout_ms The waiting timeout in milliseconds * @return std::shared_ptr The waiting frameset data */ - std::shared_ptr waitForFrames(uint32_t timeout_ms); + std::shared_ptr waitForFrames(uint32_t timeout_ms = 1000); /** * @brief Get the device object @@ -226,6 +235,46 @@ public: */ void enableAllStream(); + /** + * @brief Enable a video stream to be used in the pipeline. + * + * This function allows users to enable a video stream with customizable parameters. + * If no parameters are specified, the stream will be enabled with default resolution settings. + * Users who wish to set custom resolutions should refer to the product manual, as available resolutions vary by camera model. + * + * @param type The video stream type. + * @param width The video stream width (default is OB_WIDTH_ANY, which selects the default resolution). + * @param height The video stream height (default is OB_HEIGHT_ANY, which selects the default resolution). + * @param fps The video stream frame rate (default is OB_FPS_ANY, which selects the default frame rate). + * @param format The video stream format (default is OB_FORMAT_ANY, which selects the default format). + */ + void enableVideoStream(ob_stream_type type, int width = OB_WIDTH_ANY, int height = OB_HEIGHT_ANY, int fps = OB_FPS_ANY, OBFormat format = OB_FORMAT_ANY); + + /** + * @brief Enable an accelerometer stream to be used in the pipeline. + * + * This function allows users to enable an accelerometer 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 fullScaleRange The full-scale range of the accelerometer (default is OB_ACCEL_FULL_SCALE_RANGE_ANY, which selects the default range). + * @param sampleRate The sample rate of the accelerometer (default is OB_ACCEL_SAMPLE_RATE_ANY, which selects the default rate). + */ + void enableAccelStream(ob_accel_full_scale_range fullScaleRange = OB_ACCEL_FULL_SCALE_RANGE_ANY, + ob_accel_sample_rate sampleRate = OB_ACCEL_SAMPLE_RATE_ANY); + + /** + * @brief Enable a gyroscope stream to be used in the pipeline. + * + * This function allows users to enable a gyroscope 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 fullScaleRange The full-scale range of the gyroscope (default is OB_GYRO_FULL_SCALE_RANGE_ANY, which selects the default range). + * @param sampleRate The sample rate of the gyroscope (default is OB_GYRO_SAMPLE_RATE_ANY, which selects the default rate). + */ + void enableGyroStream(ob_gyro_full_scale_range fullScaleRange = OB_GYRO_FULL_SCALE_RANGE_ANY, ob_gyro_sample_rate sampleRate = OB_GYRO_SAMPLE_RATE_ANY); + /** * @brief Disable a stream to be used in the pipeline * diff --git a/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10 b/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10 index 84e0b235..0afd92f2 120000 --- a/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10 +++ b/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10 @@ -1 +1 @@ -libOrbbecSDK.so.1.10.7 \ No newline at end of file +libOrbbecSDK.so.1.10.8 \ No newline at end of file diff --git a/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10.7 b/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10.8 similarity index 71% rename from orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10.7 rename to orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10.8 index 2c37c99e..f361e8c7 100644 Binary files a/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10.7 and b/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10.8 differ diff --git a/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10 b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10 index 84e0b235..0afd92f2 120000 --- a/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10 +++ b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10 @@ -1 +1 @@ -libOrbbecSDK.so.1.10.7 \ No newline at end of file +libOrbbecSDK.so.1.10.8 \ No newline at end of file diff --git a/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10.7 b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10.8 similarity index 65% rename from orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10.7 rename to orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10.8 index 235a6452..808ff895 100644 Binary files a/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10.7 and b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10.8 differ diff --git a/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10 b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10 index 84e0b235..0afd92f2 120000 --- a/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10 +++ b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10 @@ -1 +1 @@ -libOrbbecSDK.so.1.10.7 \ No newline at end of file +libOrbbecSDK.so.1.10.8 \ No newline at end of file diff --git a/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10.7 b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10.8 similarity index 67% rename from orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10.7 rename to orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10.8 index 7a26ac7b..59f4d6ce 100644 Binary files a/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10.7 and b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10.8 differ