Skip to content

Commit

Permalink
Update SDK to v1.10.8
Browse files Browse the repository at this point in the history
  • Loading branch information
jian-dong committed Jun 5, 2024
1 parent f7d78c9 commit e03eb66
Show file tree
Hide file tree
Showing 11 changed files with 146 additions and 18 deletions.
35 changes: 21 additions & 14 deletions SDK/include/libobsensor/h/ObTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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 */
Expand All @@ -598,25 +604,27 @@ 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;

/**
* @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;

Expand Down Expand Up @@ -995,7 +1003,6 @@ typedef struct {
uint16_t disp_diff;
OBDDONoiseRemovalType type;
} OBNoiseRemovalFilterParams, ob_noise_removal_filter_params;
;

/**
* @brief Control command protocol version number
Expand Down
45 changes: 45 additions & 0 deletions SDK/include/libobsensor/h/Pipeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions SDK/include/libobsensor/h/Property.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
7 changes: 7 additions & 0 deletions SDK/include/libobsensor/hpp/Device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,13 @@ class OB_EXTENSION_API Device {
*/
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
Expand Down
51 changes: 50 additions & 1 deletion SDK/include/libobsensor/hpp/Pipeline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ class OB_EXTENSION_API Pipeline {
*/
void start(std::shared_ptr<Config> config);

/**
* @brief Start the pipeline with default configuration parameters
*/
void start();

/**
* @brief Start the pipeline and set the frameset data callback
*
Expand All @@ -76,6 +81,10 @@ class OB_EXTENSION_API Pipeline {
*/
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<StreamProfileList> getEnabledStreamProfileList();
/**
* @brief Get the pipeline configuration parameters
* @brief Returns the default configuration if the user has not configured it
Expand All @@ -90,7 +99,7 @@ class OB_EXTENSION_API Pipeline {
* @param timeout_ms The waiting timeout in milliseconds
* @return std::shared_ptr<FrameSet> The waiting frameset data
*/
std::shared_ptr<FrameSet> waitForFrames(uint32_t timeout_ms);
std::shared_ptr<FrameSet> waitForFrames(uint32_t timeout_ms = 1000);

/**
* @brief Get the device object
Expand Down Expand Up @@ -226,6 +235,46 @@ class OB_EXTENSION_API Config {
*/
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
*
Expand Down
2 changes: 1 addition & 1 deletion SDK/lib/arm32/libOrbbecSDK.so.1.10
Binary file not shown.
2 changes: 1 addition & 1 deletion SDK/lib/arm64/libOrbbecSDK.so.1.10
Binary file not shown.
2 changes: 1 addition & 1 deletion SDK/lib/x64/libOrbbecSDK.so.1.10
Binary file not shown.

0 comments on commit e03eb66

Please sign in to comment.