mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-09-12 19:20:20 +08:00
Merge branch 'v2/develop' into v2-main
This commit is contained in:
@@ -769,3 +769,6 @@ FodyWeavers.xsd
|
||||
# Additional files built by Visual Studio
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/visualstudio,visualstudiocode,c++,python,jetbrains+all,ros,ros2
|
||||
|
||||
# Local agent instructions
|
||||
AGENTS.md
|
||||
|
||||
@@ -373,19 +373,19 @@ For optimal performance, we strongly recommend updating to the latest firmware v
|
||||
<tr>
|
||||
<td style="text-align: center; font-weight: bold;">Gemini 430</td>
|
||||
<td>Gemini 435Le</td>
|
||||
<td><a href="https://github.com/orbbec/OrbbecFirmware/releases/tag/Gemin435Le-Firmware">1.3.6</a></td>
|
||||
<td><a href="https://github.com/orbbec/OrbbecFirmware/releases/tag/Gemin435Le-Firmware">1.3.19</a></td>
|
||||
<td>gemini435_le.launch.py</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2" style="text-align: center; font-weight: bold;">Gemini 301</td>
|
||||
<td rowspan="3" style="text-align: center; font-weight: bold;">Gemini 301</td>
|
||||
<td>Gemini 305</td>
|
||||
<td><a href="https://doc.orbbec.com/documentation/Gemini%20305%20Documentation/Firmware%20Release%20of%20Gemini%20305">1.0.70</a></td>
|
||||
<td>gemini305.launch.py</td>
|
||||
<td>gemini_301_series.launch.py</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gemini 305g</td>
|
||||
<td><a href="https://doc.orbbec.com/documentation/Gemini%20305%20Documentation/Firmware%20Release%20of%20Gemini%20305">1.0.70</a></td>
|
||||
<td>gemini305_g.launch.py</td>
|
||||
<td>gemini_301_series.launch.py</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="8" style="text-align: center; font-weight: bold;">Gemini 330</td>
|
||||
|
||||
+4
-4
@@ -371,19 +371,19 @@ ros2 service call /camera/get_sdk_version orbbec_camera_msgs/srv/GetString '{}'
|
||||
<tr>
|
||||
<td style="text-align: center; font-weight: bold;">Gemini 430</td>
|
||||
<td>Gemini 435Le</td>
|
||||
<td><a href="https://github.com/orbbec/OrbbecFirmware/releases/tag/Gemin435Le-Firmware">1.3.6</a></td>
|
||||
<td><a href="https://github.com/orbbec/OrbbecFirmware/releases/tag/Gemin435Le-Firmware">1.3.19</a></td>
|
||||
<td>gemini435_le.launch.py</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2" style="text-align: center; font-weight: bold;">Gemini 301</td>
|
||||
<td rowspan="3" style="text-align: center; font-weight: bold;">Gemini 301</td>
|
||||
<td>Gemini 305</td>
|
||||
<td><a href="https://doc.orbbec.com/documentation/Gemini%20305%20Documentation/Firmware%20Release%20of%20Gemini%20305">1.0.70</a></td>
|
||||
<td>gemini305.launch.py</td>
|
||||
<td>gemini_301_series.launch.py</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gemini 305g</td>
|
||||
<td><a href="https://doc.orbbec.com/documentation/Gemini%20305%20Documentation/Firmware%20Release%20of%20Gemini%20305">1.0.70</a></td>
|
||||
<td>gemini305_g.launch.py</td>
|
||||
<td>gemini_301_series.launch.py</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="8" style="text-align: center; font-weight: bold;">Gemini 330</td>
|
||||
|
||||
@@ -239,6 +239,7 @@ install(DIRECTORY include/ DESTINATION include)
|
||||
install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}/)
|
||||
install(DIRECTORY config DESTINATION share/${PROJECT_NAME}/)
|
||||
install(DIRECTORY examples DESTINATION share/${PROJECT_NAME}/)
|
||||
install(DIRECTORY SDK/licenses/ DESTINATION share/${PROJECT_NAME}/SDK/licenses)
|
||||
install(DIRECTORY ${ORBBEC_INCLUDE_DIR} DESTINATION include)
|
||||
install(DIRECTORY ${ORBBEC_LIBS_DIR}/ DESTINATION lib/ FILES_MATCHING PATTERN "*.so*")
|
||||
# Install extensions directory with explicit file copying to avoid symlink issues
|
||||
|
||||
@@ -21,3 +21,4 @@
|
||||
#include <libobsensor/h/Version.h>
|
||||
#include <libobsensor/h/TypeHelper.h>
|
||||
#include <libobsensor/h/RecordPlayback.h>
|
||||
#include <libobsensor/h/ApplicationConfig.h>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <libobsensor/hpp/Frame.hpp>
|
||||
#include <libobsensor/hpp/Pipeline.hpp>
|
||||
#include <libobsensor/hpp/RecordPlayback.hpp>
|
||||
#include <libobsensor/hpp/ApplicationConfig.hpp>
|
||||
#include <libobsensor/hpp/Sensor.hpp>
|
||||
#include <libobsensor/hpp/StreamProfile.hpp>
|
||||
#include <libobsensor/hpp/Version.hpp>
|
||||
|
||||
@@ -226,9 +226,10 @@ OB_EXPORT bool ob_device_preset_list_has_preset(const ob_device_preset_list *pre
|
||||
* @return bool Returns true if the device supports the frame interleave feature.
|
||||
*/
|
||||
OB_EXPORT bool ob_device_is_frame_interleave_supported(const ob_device *device, ob_error **error);
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief load the frame interleave mode according to frame interleavee name.
|
||||
* @brief load the frame interleave mode according to frame interleave name.
|
||||
*
|
||||
* @param[in] device The device object.
|
||||
* @param[in] frame_interleave_name The name should be one of the frame interleave names returned by @ref ob_device_get_available_frame_interleave_list.
|
||||
@@ -236,6 +237,19 @@ OB_EXPORT bool ob_device_is_frame_interleave_supported(const ob_device *device,
|
||||
*/
|
||||
OB_EXPORT void ob_device_load_frame_interleave(ob_device *device, const char *frame_interleave_name, ob_error **error);
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Get current frame interleave name.
|
||||
*
|
||||
* @param[in] device The device object.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return const char* return the current frame interleave name.
|
||||
* Returns an empty string ("") if no interleave is loaded.
|
||||
* Returns nullptr if an error occurs.
|
||||
*/
|
||||
OB_EXPORT const char *ob_device_get_current_frame_interleave_name(const ob_device *device, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get the available frame interleave list.
|
||||
*
|
||||
@@ -328,6 +342,74 @@ OB_EXPORT OBPresetResolutionConfig ob_device_preset_resolution_config_list_get_i
|
||||
*/
|
||||
OB_EXPORT void ob_delete_preset_resolution_config_list(ob_preset_resolution_config_list *ob_preset_resolution_config_list, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Check if the device supports color preset.
|
||||
*
|
||||
* @param[in] device The device object.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return bool Returns true if the device supports color preset.
|
||||
*/
|
||||
OB_EXPORT bool ob_device_is_color_preset_supported(const ob_device *device, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get the current color preset name.
|
||||
*
|
||||
* @param[in] device The device object.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return const char* The current color preset name.
|
||||
*/
|
||||
OB_EXPORT const char *ob_device_get_current_color_preset_name(const ob_device *device, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Switch the color preset by name.
|
||||
*
|
||||
* @param[in] device The device object.
|
||||
* @param[in] preset_name The color preset name.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*/
|
||||
OB_EXPORT void ob_device_switch_color_preset(ob_device *device, const char *preset_name, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get the available color preset list.
|
||||
*
|
||||
* @param[in] device The device object.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return ob_color_preset_list* The color preset list.
|
||||
*/
|
||||
OB_EXPORT ob_color_preset_list *ob_device_get_color_preset_list(const ob_device *device, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get the number of color preset in the list.
|
||||
*
|
||||
* @param[in] list The color preset list.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return uint32_t The number of color preset in the list.
|
||||
*/
|
||||
OB_EXPORT uint32_t ob_color_preset_list_get_count(const ob_color_preset_list *list, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get the name of color preset at the specified index.
|
||||
*
|
||||
* @param[in] list The color preset list.
|
||||
* @param[in] index The index of the color preset.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return const char* The name of the color preset.
|
||||
*/
|
||||
OB_EXPORT const char *ob_color_preset_list_get_name(const ob_color_preset_list *list, uint32_t index, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Delete the color preset list.
|
||||
*
|
||||
* @param[in] list The color preset list.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*/
|
||||
OB_EXPORT void ob_delete_color_preset_list(ob_color_preset_list *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
|
||||
|
||||
@@ -0,0 +1,267 @@
|
||||
// Copyright (c) Orbbec Inc. All Rights Reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ObTypes.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Application configuration key.
|
||||
* Each key has a fixed value type and item usage.
|
||||
* Keys must stay within the low 32 bits because @ref OBAppConfigItem stores the key in bits 0-31.
|
||||
*/
|
||||
typedef enum {
|
||||
OB_APP_CONFIG_SENSORS = 0, /**< array, sensor list. Use @ref ob_application_config_get_count to get sensor count. */
|
||||
OB_APP_CONFIG_SENSOR_TYPE = 1, /**< int32_t, sensor item: OBSensorType. */
|
||||
OB_APP_CONFIG_STREAM_ENABLED = 2, /**< bool, sensor item: whether the sensor stream should be started. */
|
||||
OB_APP_CONFIG_STREAM_PROFILE = 3, /**< ob_stream_profile, sensor item: stream profile. */
|
||||
OB_APP_CONFIG_UNDISTORTION_ENABLED = 4, /**< bool, sensor item: whether undistortion should be enabled. */
|
||||
|
||||
OB_APP_CONFIG_DEVICE_DECIMATION_ENABLED = 5, /**< bool, global item: whether device-level decimation should be applied. */
|
||||
OB_APP_CONFIG_DEVICE_DECIMATION = 6, /**< OBPresetResolutionConfig, global item: device-level decimation configuration. */
|
||||
/**< Currently applied only by Gemini 435Le. */
|
||||
// Point cloud
|
||||
OB_APP_CONFIG_POINTCLOUD_ENABLED = 100, /**< bool, global item: whether point cloud output should be enabled. */
|
||||
OB_APP_CONFIG_POINTCLOUD_FORMAT = 101, /**< int32_t, global item: OBFormat, point cloud output format. */
|
||||
OB_APP_CONFIG_POINTCLOUD_DECIMATION_FACTOR = 102, /**< int32_t, global item: point cloud decimation factor. */
|
||||
OB_APP_CONFIG_POINTCLOUD_ALIGN_MODE = 103, /**< int32_t, global item: OBAlignMode. */
|
||||
OB_APP_CONFIG_POINTCLOUD_FRAME_SYNC = 104, /**< bool, global item: whether frame sync should be enabled. */
|
||||
OB_APP_CONFIG_POINTCLOUD_ALL_FRAME_TYPE_REQUIRED = 105, /**< bool, global item: false: output on any situation, true: require all frame types. */
|
||||
OB_APP_CONFIG_POINTCLOUD_MATCH_TARGET_RESOLUTION = 106, /**< bool, global item: whether to match target resolution. */
|
||||
// HDR Merge
|
||||
OB_APP_CONFIG_HDR_MERGE_ENABLED = 200, /**< bool, global item: whether HDR merge should be enabled. */
|
||||
OB_APP_CONFIG_HDR_MERGE_IR_ENABLED = 201, /**< bool, global item: whether IR frame should be enabled for HDR merge. */
|
||||
} OBAppConfigKey,
|
||||
ob_app_config_key;
|
||||
|
||||
/**
|
||||
* @brief Application configuration item.
|
||||
* An item combines a configuration key and an optional array index.
|
||||
* Non-array keys use @ref OB_APP_CONFIG_ITEM.
|
||||
* Array keys use @ref OB_APP_CONFIG_ARRAY_ITEM.
|
||||
* The key is stored in bits 0-31 and the index is stored in bits 32-63.
|
||||
*/
|
||||
typedef uint64_t OBAppConfigItem, ob_app_config_item;
|
||||
|
||||
#define OB_APP_CONFIG_INDEX_NONE (0u)
|
||||
#define OB_APP_CONFIG_ITEM(key) ((OBAppConfigItem)(uint32_t)(key))
|
||||
#define OB_APP_CONFIG_ARRAY_ITEM(key, index) ((((OBAppConfigItem)(uint32_t)(index)) << 32) | (OBAppConfigItem)(uint32_t)(key))
|
||||
#define OB_APP_CONFIG_ITEM_KEY(item) ((OBAppConfigKey)((uint32_t)((item) & 0xFFFFFFFFu)))
|
||||
#define OB_APP_CONFIG_ITEM_INDEX(item) ((uint32_t)(((item) >> 32) & 0xFFFFFFFFu))
|
||||
|
||||
/**
|
||||
* @brief Application configuration value type.
|
||||
*/
|
||||
typedef enum {
|
||||
OB_APP_CONFIG_VALUE_BOOL, /**< Boolean value. */
|
||||
OB_APP_CONFIG_VALUE_INT, /**< int32_t value. */
|
||||
OB_APP_CONFIG_VALUE_FLOAT, /**< float value. */
|
||||
OB_APP_CONFIG_VALUE_STRING, /**< String value. The returned pointer is owned by the config object. */
|
||||
OB_APP_CONFIG_VALUE_STRUCT, /**< Fixed-size SDK structure value. */
|
||||
} OBAppConfigValueType,
|
||||
ob_app_config_value_type;
|
||||
|
||||
/**
|
||||
* @brief Get the application runtime configuration cache for the device.
|
||||
*
|
||||
* @param[in] device The device object.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return ob_application_config* The application configuration object cached by the device.
|
||||
* @attention If the device has no application configuration cache, the SDK creates one with default values.
|
||||
* @attention Changes made through the returned config update the device cache directly.
|
||||
* @attention The returned config should be released by calling @ref ob_delete_application_config.
|
||||
*/
|
||||
OB_EXPORT ob_application_config *ob_device_get_application_config(ob_device *device, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get the application configuration carried by an externally imported preset, by preset name.
|
||||
*
|
||||
* @param[in] device The device object.
|
||||
* @param[in] preset_name The preset name to query.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return ob_application_config* The application configuration imported with the given preset, or NULL for
|
||||
* built-in presets or presets that carry no application configuration.
|
||||
* @attention The returned config is owned by the device; it should still be released by calling
|
||||
* @ref ob_delete_application_config (releasing the handle does not destroy the cached object).
|
||||
*/
|
||||
OB_EXPORT ob_application_config *ob_device_get_application_config_by_preset(ob_device *device, const char *preset_name, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Delete an application configuration object.
|
||||
*
|
||||
* @param[in] config The application configuration object to be deleted.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*/
|
||||
OB_EXPORT void ob_delete_application_config(ob_application_config *config, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Check whether the current device supports application runtime configuration import/export.
|
||||
*
|
||||
* @param[in] device The device object.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return bool Return true if application configuration import/export is supported, false otherwise.
|
||||
*/
|
||||
OB_EXPORT bool ob_device_is_application_config_supported(ob_device *device, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Reset an application configuration object to default values.
|
||||
*
|
||||
* @param[in] config The application configuration object.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*/
|
||||
OB_EXPORT void ob_application_config_reset(ob_application_config *config, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Set a bool value.
|
||||
*
|
||||
* @param[in] config The application configuration object.
|
||||
* @param[in] item The configuration item to update. Use @ref OB_APP_CONFIG_ITEM or @ref OB_APP_CONFIG_ARRAY_ITEM to build it.
|
||||
* @param[in] value The bool value to be set.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*/
|
||||
OB_EXPORT void ob_application_config_set_bool(ob_application_config *config, OBAppConfigItem item, bool value, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get a bool value.
|
||||
*
|
||||
* @param[in] config The application configuration object.
|
||||
* @param[in] item The configuration item to read. Use @ref OB_APP_CONFIG_ITEM or @ref OB_APP_CONFIG_ARRAY_ITEM to build it.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return bool The bool value.
|
||||
*/
|
||||
OB_EXPORT bool ob_application_config_get_bool(const ob_application_config *config, OBAppConfigItem item, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Set an int32_t value.
|
||||
*
|
||||
* @param[in] config The application configuration object.
|
||||
* @param[in] item The configuration item to update. Use @ref OB_APP_CONFIG_ITEM or @ref OB_APP_CONFIG_ARRAY_ITEM to build it.
|
||||
* @param[in] value The int32_t value to be set.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*/
|
||||
OB_EXPORT void ob_application_config_set_int(ob_application_config *config, OBAppConfigItem item, int32_t value, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get an int32_t value.
|
||||
*
|
||||
* @param[in] config The application configuration object.
|
||||
* @param[in] item The configuration item to read. Use @ref OB_APP_CONFIG_ITEM or @ref OB_APP_CONFIG_ARRAY_ITEM to build it.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return int32_t The int32_t value.
|
||||
*/
|
||||
OB_EXPORT int32_t ob_application_config_get_int(const ob_application_config *config, OBAppConfigItem item, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Set a float value.
|
||||
*
|
||||
* @param[in] config The application configuration object.
|
||||
* @param[in] item The configuration item to update. Use @ref OB_APP_CONFIG_ITEM or @ref OB_APP_CONFIG_ARRAY_ITEM to build it.
|
||||
* @param[in] value The float value to be set.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*/
|
||||
OB_EXPORT void ob_application_config_set_float(ob_application_config *config, OBAppConfigItem item, float value, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get a float value.
|
||||
*
|
||||
* @param[in] config The application configuration object.
|
||||
* @param[in] item The configuration item to read. Use @ref OB_APP_CONFIG_ITEM or @ref OB_APP_CONFIG_ARRAY_ITEM to build it.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return float The float value.
|
||||
*/
|
||||
OB_EXPORT float ob_application_config_get_float(const ob_application_config *config, OBAppConfigItem item, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Set a string value.
|
||||
*
|
||||
* @param[in] config The application configuration object.
|
||||
* @param[in] item The configuration item to update. Use @ref OB_APP_CONFIG_ITEM or @ref OB_APP_CONFIG_ARRAY_ITEM to build it.
|
||||
* @param[in] value The string value to be set.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*/
|
||||
OB_EXPORT void ob_application_config_set_string(ob_application_config *config, OBAppConfigItem item, const char *value, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get a string value.
|
||||
*
|
||||
* @param[in] config The application configuration object.
|
||||
* @param[in] item The configuration item to read. Use @ref OB_APP_CONFIG_ITEM or @ref OB_APP_CONFIG_ARRAY_ITEM to build it.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return const char* The string value.
|
||||
* @attention The returned pointer is owned by the config object and becomes invalid after the config is modified or deleted.
|
||||
*/
|
||||
OB_EXPORT const char *ob_application_config_get_string(const ob_application_config *config, OBAppConfigItem item, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Set a fixed-size SDK structure value.
|
||||
*
|
||||
* @param[in] config The application configuration object.
|
||||
* @param[in] item The configuration item to update. Use @ref OB_APP_CONFIG_ITEM or @ref OB_APP_CONFIG_ARRAY_ITEM to build it.
|
||||
* @param[in] value Pointer to the structure value to be copied.
|
||||
* @param[in] valueSize Size of the structure value in bytes.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*/
|
||||
OB_EXPORT void ob_application_config_set_struct(ob_application_config *config, OBAppConfigItem item, const void *value, uint32_t valueSize, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get a fixed-size SDK structure value.
|
||||
*
|
||||
* @param[in] config The application configuration object.
|
||||
* @param[in] item The configuration item to read. Use @ref OB_APP_CONFIG_ITEM or @ref OB_APP_CONFIG_ARRAY_ITEM to build it.
|
||||
* @param[out] value Pointer to the buffer that receives the structure value.
|
||||
* @param[in] valueSize Size of the output buffer in bytes.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*/
|
||||
OB_EXPORT void ob_application_config_get_struct(const ob_application_config *config, OBAppConfigItem item, void *value, uint32_t valueSize, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Set the stream profile for a sensor item.
|
||||
*
|
||||
* @param[in] config The application configuration object.
|
||||
* @param[in] item The sensor stream profile item to update. Use @ref OB_APP_CONFIG_ARRAY_ITEM with @ref OB_APP_CONFIG_STREAM_PROFILE.
|
||||
* @param[in] profile The stream profile to be copied into the config object.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @attention The config object clones the profile. The caller still owns and should release the input profile.
|
||||
*/
|
||||
OB_EXPORT void ob_application_config_set_profile(ob_application_config *config, OBAppConfigItem item, const ob_stream_profile *profile, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get the stream profile from a sensor item.
|
||||
*
|
||||
* @param[in] config The application configuration object.
|
||||
* @param[in] item The sensor stream profile item to read. Use @ref OB_APP_CONFIG_ARRAY_ITEM with @ref OB_APP_CONFIG_STREAM_PROFILE.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return ob_stream_profile* The stream profile stored in the sensor item.
|
||||
* @attention The returned profile should be released by calling @ref ob_delete_stream_profile.
|
||||
*/
|
||||
OB_EXPORT ob_stream_profile *ob_application_config_get_profile(const ob_application_config *config, OBAppConfigItem item, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get the number of items in an array key.
|
||||
*
|
||||
* Currently only @ref OB_APP_CONFIG_SENSORS is supported.
|
||||
*
|
||||
* @param[in] config The application configuration object.
|
||||
* @param[in] key The array key to count. Refer to @ref OBAppConfigKey for available keys.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return uint32_t The number of items in the array key.
|
||||
*/
|
||||
OB_EXPORT uint32_t ob_application_config_get_count(const ob_application_config *config, OBAppConfigKey key, ob_error **error);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -184,6 +184,15 @@ OB_EXPORT void ob_unregister_device_changed_callback(ob_context *context, ob_cal
|
||||
*/
|
||||
OB_EXPORT void ob_enable_device_clock_sync(ob_context *context, uint64_t repeat_interval_msec, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Synchronize the device time (synchronize hardwarePPS time to all created devices)
|
||||
*
|
||||
* @param[in] context Pointer to the context object
|
||||
* @param[in] hardware_pps_time unit: ms.
|
||||
* @param[out] error Pointer to an error object that will be populated if an error occurs during execution
|
||||
*/
|
||||
OB_EXPORT void ob_sync_device_hardware_pps_time(ob_context *context, uint64_t hardware_pps_time, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Free idle memory from the internal frame memory pool
|
||||
*
|
||||
@@ -281,6 +290,30 @@ OB_EXPORT void ob_log_external_message(ob_log_severity severity, const char *mod
|
||||
*/
|
||||
OB_EXPORT void ob_set_extensions_directory(const char *directory, ob_error **error);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Set the host-side timestamp clock type for the current context.
|
||||
*
|
||||
* @attention All ob::Context instances share the same underlying SDK runtime and clock type.
|
||||
* @attention Switching affects frame system and global timestamps; avoid switching during streaming.
|
||||
* @attention It is recommended to synchronize device timestamps after switching.
|
||||
*
|
||||
* @param[in] context Pointer to the context object
|
||||
* @param[in] clock_type The clock type to use for host-side timestamps
|
||||
* @param[out] error Pointer to an error object that will be populated if an error occurs
|
||||
*/
|
||||
OB_EXPORT void ob_context_set_timestamp_clock_type(ob_context *context, ob_clock_type clock_type, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get the current host-side timestamp clock type for the context.
|
||||
*
|
||||
* @param[in] context Pointer to the context object
|
||||
* @param[out] error Pointer to an error object that will be populated if an error occurs
|
||||
*
|
||||
* @return ob_clock_type The current clock type
|
||||
*/
|
||||
OB_EXPORT ob_clock_type ob_context_get_timestamp_clock_type(const ob_context *context, ob_error **error);
|
||||
|
||||
// The following interfaces are deprecated and are retained here for compatibility purposes.
|
||||
#define ob_enable_multi_device_sync ob_enable_device_clock_sync
|
||||
#define ob_set_logger_callback ob_set_logger_to_callback
|
||||
|
||||
@@ -163,6 +163,76 @@ OB_EXPORT void ob_device_set_structured_data(ob_device *device, ob_property_id p
|
||||
*/
|
||||
OB_EXPORT void ob_device_get_structured_data(ob_device *device, ob_property_id property_id, uint8_t *data, uint32_t *data_size, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Check whether the device supports license authorization.
|
||||
*
|
||||
* This function only reports whether the device provides the license authorization
|
||||
* capability. It does not read or validate the license information.
|
||||
*
|
||||
* @param[in] device The device object.
|
||||
* @param[out] error Log error messages.
|
||||
* @return true if the device supports license authorization, false otherwise.
|
||||
*/
|
||||
OB_EXPORT bool ob_device_is_license_authorization_supported(const ob_device *device, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Write signed device license information.
|
||||
*
|
||||
* The license_info_json is a UTF-8 JSON string with the following structure. All
|
||||
* binary fields are lowercase hex strings without a "0x" prefix and with a fixed
|
||||
* length. Before writing, the SDK reads the currently connected device and compares
|
||||
* it against "devInfo" to prevent writing a license to the wrong device; it does NOT
|
||||
* verify the signature or recompute deviceHash (signature and device-binding checks
|
||||
* are performed by the consumer/filter at runtime).
|
||||
*
|
||||
* {
|
||||
* "formatVersion": 1, // license_info envelope version
|
||||
* "devInfo": { // plaintext, NOT signed; used only to
|
||||
* "deviceSn": "SN123456789", // guard against mis-writing to the
|
||||
* "vid": "2BC5", // wrong device. vid/pid are 4-char
|
||||
* "pid": "0660" // uppercase hex.
|
||||
* },
|
||||
* "licenseInfo": { // signed authorization credential
|
||||
* "schemaVersion": 1, // credential schema version
|
||||
* "keyVersion": 1, // 16-bit signing public key id
|
||||
* "featureFlags": "0000000000000001",// 8 bytes, 16-char lowercase hex
|
||||
* "expireDate": 4294967295, // YYYYMMDD; 0xFFFFFFFF = permanent
|
||||
* "deviceHash": "00112233445566778899aabbccddeeff", // 16 bytes, 32-char hex
|
||||
* "signature": "...", // ECDSA P-256 r||s, 64 bytes, 128-char hex
|
||||
* "vendorLicense": "..." // third-party vendor blob, lowercase hex (235 bytes)
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* @param[in] device The device object.
|
||||
* @param[in] license_info_json The SDK license_info JSON string described above.
|
||||
* @param[in] license_info_json_size The byte size of license_info_json, excluding any trailing null terminator.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*/
|
||||
OB_EXPORT void ob_device_write_license_info(ob_device *device, const char *license_info_json, uint32_t license_info_json_size, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Read signed device license information as SDK license_info JSON.
|
||||
*
|
||||
* @param[in] device The device object.
|
||||
* @param[out] license_info_json The output buffer for SDK license_info JSON, null-terminated on success.
|
||||
* @param[in] license_info_json_size Size of the output buffer in bytes. Must be large enough to hold the JSON string and a trailing null terminator; 512
|
||||
* bytes is sufficient for the current schema.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*/
|
||||
OB_EXPORT void ob_device_read_license_info(const ob_device *device, char *license_info_json, uint32_t license_info_json_size, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Clear license information stored on the device.
|
||||
*
|
||||
* Erases the device license storage area so that the device returns to the
|
||||
* "no license" state. Intended for internal repair, re-activation or debugging
|
||||
* builds and should be gated by caller-side confirmation.
|
||||
*
|
||||
* @param[in] device The device object.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*/
|
||||
OB_EXPORT void ob_device_clear_license_info(ob_device *device, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get raw data of a device property.
|
||||
*
|
||||
@@ -286,6 +356,19 @@ OB_EXPORT void ob_device_update_firmware_from_data(ob_device *device, const uint
|
||||
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 Update the device optional depth presets from data loaded in memory.
|
||||
*
|
||||
* @param[in] device The device object.
|
||||
* @param[in] data_list A list of preset data blocks, each holding a data pointer and its size.
|
||||
* @param[in] count The number of the preset data blocks.
|
||||
* @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_from_data(ob_device *device, const ob_data_view *data_list, uint8_t 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.
|
||||
@@ -337,6 +420,27 @@ OB_EXPORT void ob_device_enable_heartbeat(ob_device *device, bool enable, ob_err
|
||||
*/
|
||||
OB_EXPORT void ob_device_enable_firmware_log(ob_device *device, bool enable, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Check whether the device firmware log is enabled.
|
||||
*
|
||||
* @param[in] device The device object.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return bool Whether the firmware log is enabled.
|
||||
*/
|
||||
OB_EXPORT bool ob_device_is_firmware_log_enabled(ob_device *device, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Synchronize the device time (synchronize hardwarePPS time to device)
|
||||
*
|
||||
* @param[in] device The device object.
|
||||
* @param[in] hardware_pps_time unit: ms.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return bool Whether the synchronisation is successful.
|
||||
*/
|
||||
OB_EXPORT bool ob_device_sync_hardware_pps_time(ob_device *device, uint64_t hardware_pps_time, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Send data to the device and receive data from the device.
|
||||
* @brief This is a factory and debug function, which can be used to send and receive data from the device. The data format is secret and belongs to the device
|
||||
@@ -415,7 +519,7 @@ OB_EXPORT const char *ob_device_info_get_uid(const ob_device_info *info, ob_erro
|
||||
*
|
||||
* @param[in] info Device Information
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
*
|
||||
* @return const char* return device serial number
|
||||
*/
|
||||
OB_EXPORT const char *ob_device_info_get_serial_number(const ob_device_info *info, ob_error **error);
|
||||
@@ -425,7 +529,7 @@ OB_EXPORT const char *ob_device_info_get_serial_number(const ob_device_info *inf
|
||||
*
|
||||
* @param[in] info Device Information
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
*
|
||||
* @return int return the firmware version number
|
||||
*/
|
||||
OB_EXPORT const char *ob_device_info_get_firmware_version(const ob_device_info *info, ob_error **error);
|
||||
@@ -447,7 +551,7 @@ OB_EXPORT const char *ob_device_info_get_connection_type(const ob_device_info *i
|
||||
*
|
||||
* @param[in] info Device Information
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
*
|
||||
* @return const char* The IP address, such as "192.168.1.10"
|
||||
*/
|
||||
OB_EXPORT const char *ob_device_info_get_ip_address(const ob_device_info *info, ob_error **error);
|
||||
@@ -509,7 +613,7 @@ OB_EXPORT const char *ob_device_get_extension_info(const ob_device *device, cons
|
||||
*
|
||||
* @param[in] info Device Information
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
*
|
||||
* @return const char* The minimum SDK version number supported by the device
|
||||
*/
|
||||
OB_EXPORT const char *ob_device_info_get_supported_min_sdk_version(const ob_device_info *info, ob_error **error);
|
||||
@@ -519,7 +623,7 @@ OB_EXPORT const char *ob_device_info_get_supported_min_sdk_version(const ob_devi
|
||||
*
|
||||
* @param[in] info Device Information
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
*
|
||||
* @return const char* The ASIC name
|
||||
*/
|
||||
OB_EXPORT const char *ob_device_info_get_asicName(const ob_device_info *info, ob_error **error);
|
||||
@@ -529,7 +633,7 @@ OB_EXPORT const char *ob_device_info_get_asicName(const ob_device_info *info, ob
|
||||
*
|
||||
* @param[in] info Device Information
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
*
|
||||
* @return ob_device_type The device type
|
||||
*/
|
||||
OB_EXPORT ob_device_type ob_device_info_get_device_type(const ob_device_info *info, ob_error **error);
|
||||
@@ -547,7 +651,7 @@ OB_EXPORT void ob_delete_device_list(ob_device_list *list, ob_error **error);
|
||||
*
|
||||
* @param[in] list Device list object
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
*
|
||||
* @return uint32_t return the number of devices
|
||||
*/
|
||||
OB_EXPORT uint32_t ob_device_list_get_count(const ob_device_list *list, ob_error **error);
|
||||
@@ -558,7 +662,7 @@ OB_EXPORT uint32_t ob_device_list_get_count(const ob_device_list *list, ob_error
|
||||
* @param[in] list Device list object
|
||||
* @param[in] index Device index
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
*
|
||||
* @return const char* return device name
|
||||
*/
|
||||
OB_EXPORT const char *ob_device_list_get_device_name(const ob_device_list *list, uint32_t index, ob_error **error);
|
||||
@@ -569,7 +673,7 @@ OB_EXPORT const char *ob_device_list_get_device_name(const ob_device_list *list,
|
||||
* @param[in] list Device list object
|
||||
* @param[in] index Device index
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
*
|
||||
* @return int return the device pid
|
||||
*/
|
||||
OB_EXPORT int ob_device_list_get_device_pid(const ob_device_list *list, uint32_t index, ob_error **error);
|
||||
@@ -752,6 +856,46 @@ OB_EXPORT ob_ip_source_type ob_device_list_get_device_ip_source_type(const ob_de
|
||||
*/
|
||||
OB_EXPORT const char *ob_device_list_get_device_user_name(const ob_device_list *list, uint32_t index, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Query the current device access state without opening the device.
|
||||
*
|
||||
* @attention This is a non-invasive GVCP CCP query for supported Ethernet devices. It reports device-side CCP state, not the owner process or host.
|
||||
* For non-Ethernet devices or Ethernet devices without CCP support, it returns OB_DEVICE_ACCESS_STATE_UNSUPPORTED.
|
||||
* CONTROLLED means monitor access may still be available, while default/control access may still fail.
|
||||
* This call is synchronous and blocks while waiting for the device's GVCP response over the network; querying an unreachable device blocks until the
|
||||
* underlying retry logic gives up, so prefer calling it off the UI thread when querying multiple devices.
|
||||
* The returned state reflects the device access state only at the moment of the query and does not guarantee that a subsequent access (such as creating or
|
||||
* opening the device) will succeed, as another client may change the state in between.
|
||||
*
|
||||
* @param[in] list Device list object.
|
||||
* @param[in] index The index of the device.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return The current access state of the device.
|
||||
*/
|
||||
OB_EXPORT ob_device_access_state ob_device_list_query_device_access_state(const ob_device_list *list, uint32_t index, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Query the current device access state by serial number without opening the device.
|
||||
*
|
||||
* @attention This is a non-invasive GVCP CCP query for supported Ethernet devices. It reports device-side CCP state, not the owner process or host.
|
||||
* For non-Ethernet devices or Ethernet devices without CCP support, it returns OB_DEVICE_ACCESS_STATE_UNSUPPORTED.
|
||||
* CONTROLLED means monitor access may still be available, while default/control access may still fail.
|
||||
* This call is synchronous and blocks while waiting for the device's GVCP response over the network; querying an unreachable device blocks until the
|
||||
* underlying retry logic gives up, so prefer calling it off the UI thread when querying multiple devices.
|
||||
* The returned state reflects the device access state only at the moment of the query and does not guarantee that a subsequent access (such as creating or
|
||||
* opening the device) will succeed, as another client may change the state in between.
|
||||
* If no device in the list matches the given serial number, an error is set via the error parameter.
|
||||
*
|
||||
* @param[in] list Device list object.
|
||||
* @param[in] serial_number The serial number of the device.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return The current access state of the device.
|
||||
*/
|
||||
OB_EXPORT ob_device_access_state ob_device_list_query_device_access_state_by_serial_number(const ob_device_list *list, const char *serial_number,
|
||||
ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Create a device.
|
||||
*
|
||||
|
||||
@@ -56,6 +56,16 @@ OB_EXPORT const char *ob_filter_get_vendor_specific_code(const char *name, ob_er
|
||||
*/
|
||||
OB_EXPORT ob_filter *ob_create_private_filter(const char *name, const char *activation_key, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Activate a private filter object with a specific device.
|
||||
*
|
||||
* @param[in] filter The private filter object.
|
||||
* @param[in] device The device to associate with the activation.
|
||||
* @param[in] options Optional extensible activation options (may be NULL). See @ref ob_priv_filter_activate_options.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*/
|
||||
OB_EXPORT void ob_filter_activate_private_ex(ob_filter *filter, ob_device *device, const ob_priv_filter_activate_options *options, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Delete the filter.
|
||||
*
|
||||
|
||||
@@ -397,6 +397,35 @@ OB_EXPORT ob_sensor *ob_frame_get_sensor(const ob_frame *frame, ob_error **error
|
||||
*/
|
||||
OB_EXPORT ob_device *ob_frame_get_device(const ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get the auth token carried by the frame.
|
||||
*
|
||||
* @param[in] frame Frame object.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return uint64_t The auth token value.
|
||||
*/
|
||||
OB_EXPORT uint64_t ob_frame_get_token(const ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Set the auth token carried by the frame.
|
||||
*
|
||||
* @param[in] frame Frame object.
|
||||
* @param[in] token The auth token value.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*/
|
||||
OB_EXPORT void ob_frame_set_token(ob_frame *frame, uint64_t token, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get the device information attached to the frame.
|
||||
*
|
||||
* @param[in] frame Frame object.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return ob_device_info* Return the attached device information, or NULL if not available.
|
||||
*/
|
||||
OB_EXPORT ob_device_info *ob_frame_get_device_info(const ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get video frame width
|
||||
*
|
||||
|
||||
@@ -66,7 +66,7 @@ OB_EXPORT ob_multi_device_sync_config ob_device_get_multi_device_sync_config(con
|
||||
* number of frames per trigger can be set by @ref ob_multi_device_sync_config::framesPerTrigger.
|
||||
* @attention For some models, receive and execute the capture command will have a certain delay and performance consumption, so the frequency of calling this
|
||||
* function should not be too high, please refer to the product manual for the specific supported frequency.
|
||||
* @attention If the device is not in the @ref OB_MULTI_DEVICE_SYNC_MODE_HARDWARE_TRIGGERING mode, device will ignore the capture command.
|
||||
* @attention If the device is not in the @ref OB_MULTI_DEVICE_SYNC_MODE_SOFTWARE_TRIGGERING mode, device will ignore the capture command.
|
||||
*
|
||||
* @param[in] device The device handle.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
|
||||
@@ -35,11 +35,13 @@ typedef struct ob_filter_t ob_filter;
|
||||
typedef struct ob_filter_list_t ob_filter_list;
|
||||
typedef struct ob_pipeline_t ob_pipeline;
|
||||
typedef struct ob_config_t ob_config;
|
||||
typedef struct ob_application_config_t ob_application_config;
|
||||
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;
|
||||
typedef struct ob_color_preset_list_t ob_color_preset_list;
|
||||
|
||||
#define OB_WIDTH_ANY 0
|
||||
#define OB_HEIGHT_ANY 0
|
||||
@@ -150,6 +152,7 @@ typedef enum {
|
||||
OB_EXCEPTION_TYPE_INVALID_DATA, /**< Runtime data is invalid, check data content or size */
|
||||
OB_EXCEPTION_TYPE_NOT_FOUND, /**< The requested item was not found */
|
||||
OB_EXCEPTION_TYPE_RESOURCE_BUSY, /**< Resource is busy or locked by another operation */
|
||||
OB_EXCEPTION_TYPE_LICENSE_VERIFY_FAILED, /**< License verification failed, the device/feature license is missing, invalid or expired */
|
||||
} OBExceptionType,
|
||||
ob_exception_type;
|
||||
|
||||
@@ -382,6 +385,14 @@ typedef struct {
|
||||
uint32_t fullDataSize; ///< Size of full data
|
||||
} OBDataChunk, ob_data_chunk;
|
||||
|
||||
/**
|
||||
* @brief A read-only, non-owning view over a byte buffer (a data pointer plus its size)
|
||||
*/
|
||||
typedef struct {
|
||||
const uint8_t *data; ///< Pointer to the data
|
||||
uint32_t dataSize; ///< Size of the data in bytes
|
||||
} OBDataView, ob_data_view;
|
||||
|
||||
/**
|
||||
* @brief Structure for integer range
|
||||
*/
|
||||
@@ -574,6 +585,7 @@ typedef enum {
|
||||
ALIGN_DISABLE, /**< Turn off alignment */
|
||||
ALIGN_D2C_HW_MODE, /**< Hardware D2C alignment mode */
|
||||
ALIGN_D2C_SW_MODE, /**< Software D2C alignment mode */
|
||||
ALIGN_C2D_SW_MODE, /**< Software C2D alignment mode */
|
||||
} OBAlignMode,
|
||||
ob_align_mode;
|
||||
|
||||
@@ -1724,6 +1736,18 @@ typedef struct {
|
||||
const char *desc; ///< Description of the configuration item
|
||||
} OBFilterConfigSchemaItem, ob_filter_config_schema_item;
|
||||
|
||||
/**
|
||||
* @brief Extensible options for activating a private filter instance.
|
||||
* @brief Passed to @ref ob_filter_activate_private_ex / @ref ob_priv_filter_activate_ex. New fields must only be
|
||||
* appended at the end. The caller sets @ref struct_size to sizeof(ob_priv_filter_activate_options); the callee
|
||||
* uses it to detect which fields a (possibly older) caller actually provided, keeping the ABI compatible as the
|
||||
* struct grows. This is the single extension point for future activation parameters.
|
||||
*/
|
||||
typedef struct ob_priv_filter_activate_options {
|
||||
uint32_t struct_size; ///< Size of this struct in bytes, set by the caller to sizeof(ob_priv_filter_activate_options).
|
||||
const char *model_path; ///< Path to the inference model file. NULL or empty selects the filter's default model.
|
||||
}OBPrivFilterActivateOptions, ob_priv_filter_activate_options;
|
||||
|
||||
/**
|
||||
* @brief struct of serial number
|
||||
*/
|
||||
@@ -2022,6 +2046,20 @@ typedef enum {
|
||||
} ob_device_access_mode,
|
||||
OBDeviceAccessMode;
|
||||
|
||||
/**
|
||||
* @brief Device access state queried from GVCP CCP without opening the device.
|
||||
*/
|
||||
typedef enum {
|
||||
OB_DEVICE_ACCESS_STATE_UNKNOWN = 0, ///< The access state cannot be determined
|
||||
OB_DEVICE_ACCESS_STATE_UNSUPPORTED = 1, ///< The device or current build does not support access-state query
|
||||
OB_DEVICE_ACCESS_STATE_AVAILABLE = 2, ///< The device is available for control access
|
||||
OB_DEVICE_ACCESS_STATE_CONTROLLED = 3, ///< The device has a controller; monitor access may still be available
|
||||
OB_DEVICE_ACCESS_STATE_EXCLUSIVE = 4, ///< The device is held exclusively and cannot be accessed
|
||||
OB_DEVICE_ACCESS_STATE_UNREACHABLE = 5, ///< The device did not respond or the network path is unreachable
|
||||
OB_DEVICE_ACCESS_STATE_FW_NOT_SUPPORTED = 6, ///< The device supports CCP, but the firmware version is too old
|
||||
} ob_device_access_state,
|
||||
OBDeviceAccessState;
|
||||
|
||||
typedef enum {
|
||||
OB_IP_SOURCE_NONE = 0, ///< No IP configuration active (e.g. USB device).
|
||||
OB_IP_SOURCE_LLA = 1, ///< LLA (Link-Local Address / Auto IP).
|
||||
@@ -2030,6 +2068,15 @@ typedef enum {
|
||||
} ob_ip_source_type,
|
||||
OBIpSourceType;
|
||||
|
||||
/**
|
||||
* @brief Host-side timestamp clock type for device.
|
||||
*/
|
||||
typedef enum {
|
||||
OB_CLOCK_TYPE_REALTIME = 0, /**< Wall clock (system_clock), epoch-based. Default. */
|
||||
OB_CLOCK_TYPE_MONOTONIC = 1, /**< System monotonic clock, non-epoch. */
|
||||
} OBClockType,
|
||||
ob_clock_type;
|
||||
|
||||
/**
|
||||
* @brief Callback for file transfer
|
||||
*
|
||||
|
||||
@@ -99,6 +99,16 @@ typedef enum {
|
||||
*/
|
||||
OB_PROP_DEPTH_NOISE_REMOVAL_FILTER_BOOL = 24,
|
||||
|
||||
/**
|
||||
* @brief Depth outliers filter switch
|
||||
*/
|
||||
OB_PROP_DEPTH_OUTLIERS_FILTER_BOOL = 25,
|
||||
|
||||
/**
|
||||
* @brief Depth outliers filter search range mode
|
||||
*/
|
||||
OB_PROP_DEPTH_OUTLIERS_FILTER_SEARCH_MODE_INT = 26,
|
||||
|
||||
/**
|
||||
* @brief LDP status
|
||||
*/
|
||||
@@ -638,11 +648,40 @@ typedef enum {
|
||||
*/
|
||||
OB_PROP_DEVICE_IP_MODE_INT = 260,
|
||||
|
||||
/**
|
||||
/**
|
||||
* @brief DHCP assign IP timeout, unit: second
|
||||
*/
|
||||
*/
|
||||
OB_PROP_DHCP_ASSIGN_IP_TIMEOUT_INT = 261,
|
||||
|
||||
/**
|
||||
* @brief USB sync I/O voltage level
|
||||
*/
|
||||
OB_PROP_USB_SYNC_VOLTAGE_LEVEL_INT = 270,
|
||||
|
||||
/**
|
||||
* @brief Get the current disparity search range mode value
|
||||
*
|
||||
* @attention read only
|
||||
*/
|
||||
OB_PROP_CURRENT_DISP_SEARCH_RANGE_MODE_INT = 271,
|
||||
|
||||
/**
|
||||
* @brief Get the current disparity search offset value
|
||||
*
|
||||
* @attention read only
|
||||
*/
|
||||
OB_PROP_CURRENT_DISP_SEARCH_OFFSET_INT = 272,
|
||||
|
||||
/**
|
||||
* @brief Enable FPS boost in trigger mode
|
||||
*/
|
||||
OB_PROP_FPS_BOOST_BOOL = 275,
|
||||
|
||||
/**
|
||||
* @brief MJPEG encoding quality factor
|
||||
*/
|
||||
OB_PROP_MJPEG_QUALITY_INT = 277,
|
||||
|
||||
/**
|
||||
* @brief Baseline calibration parameters
|
||||
*/
|
||||
|
||||
@@ -54,6 +54,24 @@ OB_EXPORT const char* ob_sensor_type_to_string(OBSensorType type);
|
||||
*/
|
||||
OB_EXPORT const char* ob_imu_rate_type_to_string(OBIMUSampleRate type);
|
||||
|
||||
/**
|
||||
* @brief Convert OBIMUSampleRate to its numeric frequency value in Hz.
|
||||
*
|
||||
* @param[in] type OBIMUSampleRate type.
|
||||
*
|
||||
* @return IMU sample rate value in Hz. Returns 0 for unknown values.
|
||||
*/
|
||||
OB_EXPORT float ob_imu_rate_type_to_value(OBIMUSampleRate type);
|
||||
|
||||
/**
|
||||
* @brief Convert a numeric IMU sample rate value in Hz to OBIMUSampleRate.
|
||||
*
|
||||
* @param[in] value IMU sample rate value in Hz.
|
||||
*
|
||||
* @return Matching OBIMUSampleRate. Returns OB_SAMPLE_RATE_UNKNOWN when no exact SDK rate matches.
|
||||
*/
|
||||
OB_EXPORT OBIMUSampleRate ob_imu_rate_value_to_type(float value);
|
||||
|
||||
/**
|
||||
* @brief Convert OBGyroFullScaleRange to " char* " type and then return.
|
||||
*
|
||||
@@ -90,14 +108,50 @@ OB_EXPORT const char *ob_lidar_scan_rate_type_to_string(OBLiDARScanRate type);
|
||||
OB_EXPORT const char* ob_meta_data_type_to_string(OBFrameMetadataType type);
|
||||
|
||||
/**
|
||||
* @brief Convert OBStreamType to OBSensorType.
|
||||
* @brief Convert OBSensorType to OBStreamType.
|
||||
*
|
||||
* @param[in] type The sensor type to convert.
|
||||
*
|
||||
* @return OBStreamType The corresponding stream type.
|
||||
* @return The corresponding stream type.
|
||||
*/
|
||||
OB_EXPORT OBStreamType ob_sensor_type_to_stream_type(OBSensorType type);
|
||||
|
||||
/**
|
||||
* @brief Convert OBStreamType to OBSensorType.
|
||||
*
|
||||
* @param[in] type The stream type to convert.
|
||||
*
|
||||
* @return The corresponding sensor type.
|
||||
*/
|
||||
OB_EXPORT OBSensorType ob_stream_type_to_sensor_type(OBStreamType type);
|
||||
|
||||
/**
|
||||
* @brief Convert OBStreamType to OBFrameType.
|
||||
*
|
||||
* @param[in] type The stream type to convert.
|
||||
*
|
||||
* @return The corresponding frame type.
|
||||
*/
|
||||
OB_EXPORT OBFrameType ob_stream_type_to_frame_type(OBStreamType type);
|
||||
|
||||
/**
|
||||
* @brief Convert OBFrameType to OBStreamType.
|
||||
*
|
||||
* @param[in] type The frame type to convert.
|
||||
*
|
||||
* @return The corresponding stream type.
|
||||
*/
|
||||
OBStreamType ob_frame_type_to_stream_type(OBFrameType type);
|
||||
|
||||
/**
|
||||
* @brief Convert OBFrameType to OBSensorType.
|
||||
*
|
||||
* @param[in] type The frame type to convert.
|
||||
*
|
||||
* @return The corresponding sensor type.
|
||||
*/
|
||||
OB_EXPORT OBSensorType ob_frame_type_to_sensor_type(OBFrameType type);
|
||||
|
||||
/**
|
||||
* @brief Convert OBFormat to " char* " type and then return.
|
||||
*
|
||||
|
||||
@@ -0,0 +1,404 @@
|
||||
// Copyright (c) Orbbec Inc. All Rights Reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Device.hpp"
|
||||
#include "StreamProfile.hpp"
|
||||
#include "Error.hpp"
|
||||
#include "libobsensor/h/Advanced.h"
|
||||
#include "libobsensor/h/ApplicationConfig.h"
|
||||
|
||||
#include <memory>
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
|
||||
namespace ob {
|
||||
|
||||
class ApplicationSensorConfig {
|
||||
public:
|
||||
explicit ApplicationSensorConfig(OBSensorType sensorType) : sensorType_(sensorType) {}
|
||||
|
||||
OBSensorType sensorType() const {
|
||||
return sensorType_;
|
||||
}
|
||||
|
||||
void enableStream(bool enabled) {
|
||||
streamEnabled_ = enabled;
|
||||
}
|
||||
|
||||
bool isStreamEnabled() const {
|
||||
return streamEnabled_;
|
||||
}
|
||||
|
||||
void setStreamProfile(const std::shared_ptr<StreamProfile> &profile) {
|
||||
streamProfile_ = profile;
|
||||
}
|
||||
|
||||
std::shared_ptr<StreamProfile> streamProfile() const {
|
||||
return streamProfile_;
|
||||
}
|
||||
|
||||
void enableUndistortion(bool enabled) {
|
||||
undistortionEnabled_ = enabled;
|
||||
}
|
||||
|
||||
bool isUndistortionEnabled() const {
|
||||
return undistortionEnabled_;
|
||||
}
|
||||
|
||||
private:
|
||||
OBSensorType sensorType_{ OB_SENSOR_UNKNOWN };
|
||||
bool streamEnabled_ = { false };
|
||||
std::shared_ptr<StreamProfile> streamProfile_;
|
||||
bool undistortionEnabled_ = { false };
|
||||
};
|
||||
|
||||
class ApplicationPointCloudConfig {
|
||||
public:
|
||||
void enable(bool enabled) {
|
||||
enabled_ = enabled;
|
||||
}
|
||||
|
||||
bool isEnabled() const {
|
||||
return enabled_;
|
||||
}
|
||||
|
||||
void setFormat(OBFormat format) {
|
||||
format_ = format;
|
||||
}
|
||||
|
||||
OBFormat format() const {
|
||||
return format_;
|
||||
}
|
||||
|
||||
void setDecimationFactor(int32_t factor) {
|
||||
decimationFactor_ = factor;
|
||||
}
|
||||
|
||||
int32_t decimationFactor() const {
|
||||
return decimationFactor_;
|
||||
}
|
||||
|
||||
void setAlignMode(OBAlignMode mode) {
|
||||
alignMode_ = mode;
|
||||
}
|
||||
|
||||
OBAlignMode alignMode() const {
|
||||
return alignMode_;
|
||||
}
|
||||
|
||||
void enableFrameSync(bool enabled) {
|
||||
frameSync_ = enabled;
|
||||
}
|
||||
|
||||
bool isFrameSyncEnabled() const {
|
||||
return frameSync_;
|
||||
}
|
||||
|
||||
void setAllFrameTypeRequired(bool enabled) {
|
||||
allFrameTypeRequired_ = enabled;
|
||||
}
|
||||
|
||||
bool isAllFrameTypeRequired() const {
|
||||
return allFrameTypeRequired_;
|
||||
}
|
||||
|
||||
void enableMatchTargetResolution(bool enabled) {
|
||||
matchTargetResolution_ = enabled;
|
||||
}
|
||||
|
||||
bool isMatchTargetResolutionEnabled() const {
|
||||
return matchTargetResolution_;
|
||||
}
|
||||
|
||||
private:
|
||||
bool enabled_{ false };
|
||||
OBFormat format_{ OB_FORMAT_POINT };
|
||||
int32_t decimationFactor_{ 0 };
|
||||
OBAlignMode alignMode_{ ALIGN_DISABLE };
|
||||
bool frameSync_{ false };
|
||||
bool allFrameTypeRequired_{ false };
|
||||
bool matchTargetResolution_{ false };
|
||||
};
|
||||
|
||||
class ApplicationHDRMergeConfig {
|
||||
public:
|
||||
void enable(bool enabled) {
|
||||
enabled_ = enabled;
|
||||
}
|
||||
|
||||
bool isEnabled() const {
|
||||
return enabled_;
|
||||
}
|
||||
|
||||
void enableIR(bool enabled) {
|
||||
enableIRforHDR_ = enabled;
|
||||
}
|
||||
|
||||
bool isIREnabled() const {
|
||||
return enableIRforHDR_;
|
||||
}
|
||||
|
||||
private:
|
||||
bool enabled_{ false };
|
||||
bool enableIRforHDR_{ true };
|
||||
};
|
||||
|
||||
class ApplicationDevDecimationConfig {
|
||||
public:
|
||||
void enable(bool enabled) {
|
||||
enabled_ = enabled;
|
||||
}
|
||||
|
||||
bool isEnabled() const {
|
||||
return enabled_;
|
||||
}
|
||||
|
||||
void setPresetResolutionConfig(const OBPresetResolutionConfig &config) {
|
||||
config_ = config;
|
||||
}
|
||||
|
||||
const OBPresetResolutionConfig &presetResolutionConfig() const {
|
||||
return config_;
|
||||
}
|
||||
|
||||
private:
|
||||
bool enabled_{ false };
|
||||
OBPresetResolutionConfig config_;
|
||||
};
|
||||
|
||||
class ApplicationConfig {
|
||||
public:
|
||||
static bool isSupported(const std::shared_ptr<Device> &device) {
|
||||
ob_error *error = nullptr;
|
||||
auto ret = ob_device_is_application_config_supported(device->getImpl(), &error);
|
||||
Error::handle(&error);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static std::shared_ptr<ApplicationConfig> get(const std::shared_ptr<Device> &device) {
|
||||
ob_error *error = nullptr;
|
||||
auto handle = ob_device_get_application_config(device->getImpl(), &error);
|
||||
Error::handle(&error);
|
||||
return std::make_shared<ApplicationConfig>(handle);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the application config carried by an externally imported preset, by preset name.
|
||||
* @return nullptr for built-in presets or presets that carry no application config.
|
||||
*/
|
||||
static std::shared_ptr<ApplicationConfig> get(const std::shared_ptr<Device> &device, const std::string &presetName) {
|
||||
ob_error *error = nullptr;
|
||||
auto handle = ob_device_get_application_config_by_preset(device->getImpl(), presetName.c_str(), &error);
|
||||
Error::handle(&error);
|
||||
if(!handle) {
|
||||
return nullptr;
|
||||
}
|
||||
return std::make_shared<ApplicationConfig>(handle);
|
||||
}
|
||||
|
||||
explicit ApplicationConfig(ob_application_config *handle) : handle_(handle) {}
|
||||
|
||||
~ApplicationConfig() noexcept {
|
||||
if(handle_) {
|
||||
ob_error *error = nullptr;
|
||||
ob_delete_application_config(handle_, &error);
|
||||
Error::handle(&error, false);
|
||||
}
|
||||
}
|
||||
|
||||
ob_application_config *handle() const {
|
||||
return handle_;
|
||||
}
|
||||
|
||||
void reset() {
|
||||
ob_error *error = nullptr;
|
||||
ob_application_config_reset(handle_, &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
std::vector<std::shared_ptr<ApplicationSensorConfig>> sensors() const {
|
||||
std::vector<std::shared_ptr<ApplicationSensorConfig>> result;
|
||||
ob_error *error = nullptr;
|
||||
auto count = ob_application_config_get_count(handle_, OB_APP_CONFIG_SENSORS, &error);
|
||||
Error::handle(&error);
|
||||
for(uint32_t i = 0; i < count; ++i) {
|
||||
auto sensorType = static_cast<OBSensorType>(ob_application_config_get_int(handle_, OB_APP_CONFIG_ARRAY_ITEM(OB_APP_CONFIG_SENSOR_TYPE, i), &error));
|
||||
Error::handle(&error);
|
||||
auto sensorConfig = std::make_shared<ApplicationSensorConfig>(sensorType);
|
||||
// enable
|
||||
auto enable = ob_application_config_get_bool(handle_, OB_APP_CONFIG_ARRAY_ITEM(OB_APP_CONFIG_STREAM_ENABLED, i), &error);
|
||||
Error::handle(&error);
|
||||
sensorConfig->enableStream(enable);
|
||||
// profile
|
||||
auto profile = ob_application_config_get_profile(handle_, OB_APP_CONFIG_ARRAY_ITEM(OB_APP_CONFIG_STREAM_PROFILE, i), &error);
|
||||
Error::handle(&error);
|
||||
sensorConfig->setStreamProfile(StreamProfileFactory::create(profile));
|
||||
result.emplace_back(sensorConfig);
|
||||
// undistortion
|
||||
enable = ob_application_config_get_bool(handle_, OB_APP_CONFIG_ARRAY_ITEM(OB_APP_CONFIG_UNDISTORTION_ENABLED, i), &error);
|
||||
Error::handle(&error, false); // optional
|
||||
sensorConfig->enableUndistortion(enable);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void setSensors(const std::vector<std::shared_ptr<ApplicationSensorConfig>> &sensors) {
|
||||
for(const auto &sensor: sensors) {
|
||||
setSensor(sensor);
|
||||
}
|
||||
}
|
||||
|
||||
void setSensor(const std::shared_ptr<ApplicationSensorConfig> &sensor) {
|
||||
if(!sensor) {
|
||||
return;
|
||||
}
|
||||
ob_error *error = nullptr;
|
||||
auto index = sensorIndex(sensor->sensorType());
|
||||
// enable
|
||||
ob_application_config_set_bool(handle_, OB_APP_CONFIG_ARRAY_ITEM(OB_APP_CONFIG_STREAM_ENABLED, index), sensor->isStreamEnabled(), &error);
|
||||
Error::handle(&error);
|
||||
// profile
|
||||
auto profile = sensor->streamProfile();
|
||||
if(!profile) {
|
||||
throw std::runtime_error("ApplicationSensorConfig: stream profile must not be null");
|
||||
}
|
||||
ob_application_config_set_profile(handle_, OB_APP_CONFIG_ARRAY_ITEM(OB_APP_CONFIG_STREAM_PROFILE, index), profile->getImpl(), &error);
|
||||
Error::handle(&error);
|
||||
// undistortion
|
||||
ob_application_config_set_bool(handle_, OB_APP_CONFIG_ARRAY_ITEM(OB_APP_CONFIG_UNDISTORTION_ENABLED, index), sensor->isUndistortionEnabled(), &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
std::shared_ptr<ApplicationDevDecimationConfig> deviceDecimation() const {
|
||||
auto cfg = std::make_shared<ApplicationDevDecimationConfig>();
|
||||
ob_error *error = nullptr;
|
||||
// enable
|
||||
auto enable = ob_application_config_get_bool(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_DEVICE_DECIMATION_ENABLED), &error);
|
||||
Error::handle(&error);
|
||||
cfg->enable(enable);
|
||||
if(enable) {
|
||||
// Preset resolution
|
||||
OBPresetResolutionConfig config{};
|
||||
ob_application_config_get_struct(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_DEVICE_DECIMATION), &config, sizeof(config), &error);
|
||||
Error::handle(&error);
|
||||
cfg->setPresetResolutionConfig(config);
|
||||
}
|
||||
return cfg;
|
||||
}
|
||||
|
||||
void setDeviceDecimation(const std::shared_ptr<ApplicationDevDecimationConfig> &config) {
|
||||
if(!config) {
|
||||
return;
|
||||
}
|
||||
ob_error *error = nullptr;
|
||||
ob_application_config_set_bool(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_DEVICE_DECIMATION_ENABLED), config->isEnabled(), &error);
|
||||
Error::handle(&error);
|
||||
auto presetResConfig = config->presetResolutionConfig();
|
||||
ob_application_config_set_struct(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_DEVICE_DECIMATION), &presetResConfig, sizeof(presetResConfig), &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
std::shared_ptr<ApplicationPointCloudConfig> pointCloud() const {
|
||||
auto cfg = std::make_shared<ApplicationPointCloudConfig>();
|
||||
ob_error *error = nullptr;
|
||||
// enable
|
||||
auto enable = ob_application_config_get_bool(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_POINTCLOUD_ENABLED), &error);
|
||||
Error::handle(&error);
|
||||
cfg->enable(enable);
|
||||
// format
|
||||
auto value = ob_application_config_get_int(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_POINTCLOUD_FORMAT), &error);
|
||||
Error::handle(&error);
|
||||
cfg->setFormat(static_cast<OBFormat>(value));
|
||||
// decimation factor
|
||||
value = ob_application_config_get_int(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_POINTCLOUD_DECIMATION_FACTOR), &error);
|
||||
Error::handle(&error);
|
||||
cfg->setDecimationFactor(value);
|
||||
// align mode
|
||||
value = ob_application_config_get_int(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_POINTCLOUD_ALIGN_MODE), &error);
|
||||
Error::handle(&error);
|
||||
cfg->setAlignMode(static_cast<OBAlignMode>(value));
|
||||
// frame sync
|
||||
enable = ob_application_config_get_bool(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_POINTCLOUD_FRAME_SYNC), &error);
|
||||
Error::handle(&error);
|
||||
cfg->enableFrameSync(enable);
|
||||
// frame aggregate mode
|
||||
enable = ob_application_config_get_bool(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_POINTCLOUD_ALL_FRAME_TYPE_REQUIRED), &error);
|
||||
Error::handle(&error);
|
||||
cfg->setAllFrameTypeRequired(enable);
|
||||
// match target resolution
|
||||
enable = ob_application_config_get_bool(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_POINTCLOUD_MATCH_TARGET_RESOLUTION), &error);
|
||||
Error::handle(&error);
|
||||
cfg->enableMatchTargetResolution(enable);
|
||||
return cfg;
|
||||
}
|
||||
|
||||
void setPointCloud(const std::shared_ptr<ApplicationPointCloudConfig> &config) {
|
||||
if(!config) {
|
||||
return;
|
||||
}
|
||||
ob_error *error = nullptr;
|
||||
ob_application_config_set_bool(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_POINTCLOUD_ENABLED), config->isEnabled(), &error);
|
||||
Error::handle(&error);
|
||||
ob_application_config_set_int(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_POINTCLOUD_FORMAT), static_cast<int32_t>(config->format()), &error);
|
||||
Error::handle(&error);
|
||||
ob_application_config_set_int(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_POINTCLOUD_DECIMATION_FACTOR), config->decimationFactor(), &error);
|
||||
Error::handle(&error);
|
||||
ob_application_config_set_int(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_POINTCLOUD_ALIGN_MODE), static_cast<int32_t>(config->alignMode()), &error);
|
||||
Error::handle(&error);
|
||||
ob_application_config_set_bool(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_POINTCLOUD_FRAME_SYNC), config->isFrameSyncEnabled(), &error);
|
||||
Error::handle(&error);
|
||||
ob_application_config_set_bool(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_POINTCLOUD_ALL_FRAME_TYPE_REQUIRED), config->isAllFrameTypeRequired(), &error);
|
||||
Error::handle(&error);
|
||||
ob_application_config_set_bool(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_POINTCLOUD_MATCH_TARGET_RESOLUTION), config->isMatchTargetResolutionEnabled(),
|
||||
&error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
std::shared_ptr<ApplicationHDRMergeConfig> hdrMerge() const {
|
||||
auto cfg = std::make_shared<ApplicationHDRMergeConfig>();
|
||||
ob_error *error = nullptr;
|
||||
// enable
|
||||
auto enable = ob_application_config_get_bool(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_HDR_MERGE_ENABLED), &error);
|
||||
Error::handle(&error);
|
||||
cfg->enable(enable);
|
||||
// IR enable
|
||||
enable = ob_application_config_get_bool(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_HDR_MERGE_IR_ENABLED), &error);
|
||||
Error::handle(&error);
|
||||
cfg->enableIR(enable);
|
||||
return cfg;
|
||||
}
|
||||
|
||||
void setHDRMerge(const std::shared_ptr<ApplicationHDRMergeConfig> &config) {
|
||||
if(!config) {
|
||||
return;
|
||||
}
|
||||
ob_error *error = nullptr;
|
||||
ob_application_config_set_bool(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_HDR_MERGE_ENABLED), config->isEnabled(), &error);
|
||||
Error::handle(&error);
|
||||
ob_application_config_set_bool(handle_, OB_APP_CONFIG_ITEM(OB_APP_CONFIG_HDR_MERGE_IR_ENABLED), config->isIREnabled(), &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
private:
|
||||
uint32_t sensorIndex(OBSensorType sensorType) const {
|
||||
ob_error *error = nullptr;
|
||||
auto count = ob_application_config_get_count(handle_, OB_APP_CONFIG_SENSORS, &error);
|
||||
Error::handle(&error);
|
||||
for(uint32_t i = 0; i < count; ++i) {
|
||||
auto current = static_cast<OBSensorType>(ob_application_config_get_int(handle_, OB_APP_CONFIG_ARRAY_ITEM(OB_APP_CONFIG_SENSOR_TYPE, i), &error));
|
||||
Error::handle(&error);
|
||||
if(current == sensorType) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
throw std::runtime_error("Application sensor config not found");
|
||||
}
|
||||
|
||||
ob_application_config *handle_ = nullptr;
|
||||
};
|
||||
|
||||
using ApplicationConfigPtr = std::shared_ptr<ApplicationConfig>;
|
||||
|
||||
} // namespace ob
|
||||
@@ -85,6 +85,33 @@ public:
|
||||
Error::handle(&error, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the host-side timestamp clock type for the current context.
|
||||
*
|
||||
* @attention All ob::Context instances share the same underlying SDK runtime and clock type.
|
||||
* @attention Switching affects frame system and global timestamps; avoid switching during streaming.
|
||||
* @attention It is recommended to synchronize device timestamps after switching.
|
||||
*
|
||||
* @param[in] type The clock type to use for host-side timestamps.
|
||||
*/
|
||||
void setTimestampClockType(OBClockType type) const {
|
||||
ob_error *error = nullptr;
|
||||
ob_context_set_timestamp_clock_type(impl_, type, &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the current host-side timestamp clock type for the context.
|
||||
*
|
||||
* @return OBClockType The current clock type.
|
||||
*/
|
||||
OBClockType getTimestampClockType() const {
|
||||
ob_error *error = nullptr;
|
||||
auto type = ob_context_get_timestamp_clock_type(impl_, &error);
|
||||
Error::handle(&error);
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Queries the enumerated device list.
|
||||
*
|
||||
@@ -232,6 +259,17 @@ public:
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Activates synchronization time to all created devices (if supported).
|
||||
*
|
||||
* @param[in] hardwarePPSTime unit:ms.
|
||||
*/
|
||||
void syncDeviceHardwarePPSTime(uint64_t hardwarePPSTime) const {
|
||||
ob_error *error = nullptr;
|
||||
ob_sync_device_hardware_pps_time(impl_, hardwarePPSTime, &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Frees idle memory from the internal frame memory pool.
|
||||
* @brief The SDK includes an internal frame memory pool that caches memory allocated for frames received from devices.
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace ob {
|
||||
class DeviceInfo;
|
||||
class SensorList;
|
||||
class DevicePresetList;
|
||||
class ColorPresetList;
|
||||
class OBDepthWorkModeList;
|
||||
class CameraParamList;
|
||||
class DeviceFrameInterleaveList;
|
||||
@@ -301,6 +302,51 @@ public:
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check whether the device supports license authorization.
|
||||
*
|
||||
* @return true if the device supports license authorization, false otherwise.
|
||||
*/
|
||||
bool isLicenseAuthorizationSupported() const {
|
||||
ob_error *error = nullptr;
|
||||
auto res = ob_device_is_license_authorization_supported(impl_, &error);
|
||||
Error::handle(&error);
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Write signed device license information.
|
||||
*
|
||||
* @param[in] licenseInfo SDK license_info JSON string
|
||||
*/
|
||||
void writeLicenseInfo(const std::string &licenseInfo) const {
|
||||
ob_error *error = nullptr;
|
||||
ob_device_write_license_info(impl_, licenseInfo.c_str(), static_cast<uint32_t>(licenseInfo.size()), &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Clear license information stored on the device.
|
||||
*/
|
||||
void clearLicenseInfo() const {
|
||||
ob_error *error = nullptr;
|
||||
ob_device_clear_license_info(impl_, &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Read signed device license information as SDK license_info JSON.
|
||||
*
|
||||
* @return std::string SDK license_info JSON string
|
||||
*/
|
||||
std::string readLicenseInfo() const {
|
||||
ob_error *error = nullptr;
|
||||
char buf[4096] = {};
|
||||
ob_device_read_license_info(impl_, buf, sizeof(buf), &error);
|
||||
Error::handle(&error);
|
||||
return std::string(buf);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the customer data type of a device property
|
||||
*
|
||||
@@ -392,6 +438,8 @@ public:
|
||||
/**
|
||||
* @brief Update the device firmware
|
||||
*
|
||||
* @attention Only one firmware/preset update may run per device at a time
|
||||
*
|
||||
* @param[in] filePath Firmware path
|
||||
* @param[in] callback Firmware Update progress and status callback
|
||||
* @param[in] async Whether to execute asynchronously
|
||||
@@ -406,6 +454,8 @@ public:
|
||||
/**
|
||||
* @brief Update the device firmware from data
|
||||
*
|
||||
* @attention Only one firmware/preset update may run per device at a time
|
||||
*
|
||||
* @param[in] firmwareData Firmware data
|
||||
* @param[in] firmwareDataSize Firmware data size
|
||||
* @param[in] callback Firmware Update progress and status callback
|
||||
@@ -421,6 +471,8 @@ public:
|
||||
/**
|
||||
* @brief Update the device optional depth presets
|
||||
*
|
||||
* @attention Only one firmware/preset update may run per device at a time
|
||||
*
|
||||
* @param[in] filePathList A list(2D array) of preset file paths, each up to OB_PATH_MAX characters.
|
||||
* @param[in] pathCount The number of the preset file paths.
|
||||
* @param[in] callback Preset update progress and status callback
|
||||
@@ -432,6 +484,27 @@ public:
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Update the device optional depth presets from data loaded in memory
|
||||
*
|
||||
* @attention Only one firmware/preset update may run per device at a time
|
||||
*
|
||||
* @param[in] dataList A list of preset data blocks, each holding the raw bytes of one preset.
|
||||
* @param[in] callback Preset update progress and status callback
|
||||
*/
|
||||
void updateOptionalDepthPresets(const std::vector<std::vector<uint8_t>> &dataList, DeviceFwUpdateCallback callback) {
|
||||
ob_error *error = nullptr;
|
||||
std::vector<OBDataView> presets;
|
||||
presets.reserve(dataList.size());
|
||||
for(const auto &data: dataList) {
|
||||
presets.push_back({data.data(), static_cast<uint32_t>(data.size())});
|
||||
}
|
||||
fwUpdateCallback_ = callback;
|
||||
auto count = static_cast<uint8_t>(presets.size());
|
||||
ob_device_update_optional_depth_presets_from_data(impl_, presets.data(), count, &Device::firmwareUpdateCallback, this, &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the device state changed callbacks
|
||||
*
|
||||
@@ -511,6 +584,53 @@ public:
|
||||
return std::make_shared<OBDepthWorkModeList>(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check if the device supports color preset.
|
||||
*
|
||||
* @return bool Returns true if the device supports color preset.
|
||||
*/
|
||||
bool isColorPresetSupported() const {
|
||||
ob_error *error = nullptr;
|
||||
auto result = ob_device_is_color_preset_supported(impl_, &error);
|
||||
Error::handle(&error);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the current color preset name.
|
||||
*
|
||||
* @return const char* The current color preset name.
|
||||
*/
|
||||
const char *getCurrentColorPresetName() const {
|
||||
ob_error *error = nullptr;
|
||||
const char *name = ob_device_get_current_color_preset_name(impl_, &error);
|
||||
Error::handle(&error);
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Switch the color preset by name.
|
||||
*
|
||||
* @param[in] presetName The color preset name.
|
||||
*/
|
||||
void switchColorPreset(const char *presetName) const {
|
||||
ob_error *error = nullptr;
|
||||
ob_device_switch_color_preset(impl_, presetName, &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the available color preset list.
|
||||
*
|
||||
* @return std::shared_ptr<ColorPresetList> The color preset list.
|
||||
*/
|
||||
std::shared_ptr<ColorPresetList> getColorPresetList() const {
|
||||
ob_error *error = nullptr;
|
||||
auto list = ob_device_get_color_preset_list(impl_, &error);
|
||||
Error::handle(&error);
|
||||
return std::make_shared<ColorPresetList>(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Device restart
|
||||
* @attention The device will be disconnected and reconnected. After the device is disconnected, the access to the Device object interface may be abnormal.
|
||||
@@ -535,6 +655,18 @@ public:
|
||||
reboot();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief synchronization the device time (synchronize hardwarePPS time to device)
|
||||
* @param[in] hardwarePPSTime unit:ms
|
||||
* @return Whether the synchronisation is successful
|
||||
*/
|
||||
bool syncDeviceHardwarePPSTime(uint64_t hardwarePPSTime) const {
|
||||
ob_error *error = nullptr;
|
||||
bool success = ob_device_sync_hardware_pps_time(impl_, hardwarePPSTime, &error);
|
||||
Error::handle(&error);
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable or disable the device heartbeat.
|
||||
* @brief After enable the device heartbeat, the sdk will start a thread to send heartbeat signal to the device error every 3 seconds.
|
||||
@@ -560,6 +692,18 @@ public:
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check whether the device firmware log is enabled.
|
||||
*
|
||||
* @return bool Whether the firmware log is enabled.
|
||||
*/
|
||||
bool isFirmwareLogEnabled() const {
|
||||
ob_error *error = nullptr;
|
||||
bool enable = ob_device_is_firmware_log_enabled(impl_, &error);
|
||||
Error::handle(&error);
|
||||
return enable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the supported multi device sync mode bitmap of the device.
|
||||
* @brief For example, if the return value is 0b00001100, it means the device supports @ref OB_MULTI_DEVICE_SYNC_MODE_PRIMARY and @ref
|
||||
@@ -839,6 +983,24 @@ public:
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Get current frame interleave name.
|
||||
*
|
||||
* @param[in] device The device object.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return const char* return the current frame interleave name.
|
||||
* Returns an empty string ("") if no interleave is loaded.
|
||||
* Returns nullptr if an error occurs.
|
||||
*/
|
||||
OB_EXPORT const char *getCurrentFrameInterleaveName() const {
|
||||
ob_error *error = nullptr;
|
||||
auto name = ob_device_get_current_frame_interleave_name(impl_, &error);
|
||||
Error::handle(&error);
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get available frame interleave list
|
||||
*
|
||||
@@ -1371,9 +1533,9 @@ public:
|
||||
*
|
||||
* @return const char* The host network interface name (e.g., "eth0", "en0").
|
||||
*/
|
||||
const char* getLocalNetInterfaceName(uint32_t index) const {
|
||||
ob_error *error = nullptr;
|
||||
auto netItfName = ob_device_list_get_device_local_net_if_name(impl_, index, &error);
|
||||
const char *getLocalNetInterfaceName(uint32_t index) const {
|
||||
ob_error *error = nullptr;
|
||||
auto netItfName = ob_device_list_get_device_local_net_if_name(impl_, index, &error);
|
||||
Error::handle(&error);
|
||||
return netItfName;
|
||||
}
|
||||
@@ -1410,6 +1572,49 @@ public:
|
||||
return userName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Query the current device access state without opening the device.
|
||||
*
|
||||
* @attention This is a non-invasive GVCP CCP query for supported Ethernet devices. It reports device-side CCP state, not the owner process or host.
|
||||
* CONTROLLED means monitor access may still be available, while default/control access may still fail.
|
||||
* This call is synchronous and blocks while waiting for the device's GVCP response over the network; querying an unreachable device blocks until the
|
||||
* underlying retry logic gives up, so prefer calling it off the UI thread when querying multiple devices.
|
||||
* The returned state reflects the device access state only at the moment of the query and does not guarantee that a subsequent access (such as creating
|
||||
* or opening the device) will succeed, as another client may change the state in between.
|
||||
*
|
||||
* @param[in] index The index of the device.
|
||||
*
|
||||
* @return OBDeviceAccessState The current access state of the device.
|
||||
*/
|
||||
OBDeviceAccessState queryDeviceAccessState(uint32_t index) const {
|
||||
ob_error *error = nullptr;
|
||||
auto state = ob_device_list_query_device_access_state(impl_, index, &error);
|
||||
Error::handle(&error);
|
||||
return state;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Query the current device access state by serial number without opening the device.
|
||||
*
|
||||
* @attention This is a non-invasive GVCP CCP query for supported Ethernet devices. It reports device-side CCP state, not the owner process or host.
|
||||
* CONTROLLED means monitor access may still be available, while default/control access may still fail.
|
||||
* This call is synchronous and blocks while waiting for the device's GVCP response over the network; querying an unreachable device blocks until the
|
||||
* underlying retry logic gives up, so prefer calling it off the UI thread when querying multiple devices.
|
||||
* The returned state reflects the device access state only at the moment of the query and does not guarantee that a subsequent access (such as creating
|
||||
* or opening the device) will succeed, as another client may change the state in between.
|
||||
* If no device in the list matches the given serial number, this throws an ob::Error.
|
||||
*
|
||||
* @param[in] serialNumber The serial number of the device.
|
||||
*
|
||||
* @return OBDeviceAccessState The current access state of the device.
|
||||
*/
|
||||
OBDeviceAccessState queryDeviceAccessStateBySN(const char *serialNumber) const {
|
||||
ob_error *error = nullptr;
|
||||
auto state = ob_device_list_query_device_access_state_by_serial_number(impl_, serialNumber, &error);
|
||||
Error::handle(&error);
|
||||
return state;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the device object at the specified index
|
||||
*
|
||||
@@ -1624,6 +1829,36 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Class representing a list of color presets
|
||||
*/
|
||||
class ColorPresetList {
|
||||
private:
|
||||
ob_color_preset_list *impl_ = nullptr;
|
||||
|
||||
public:
|
||||
explicit ColorPresetList(ob_color_preset_list *impl) : impl_(impl) {}
|
||||
~ColorPresetList() noexcept {
|
||||
ob_error *error = nullptr;
|
||||
ob_delete_color_preset_list(impl_, &error);
|
||||
Error::handle(&error, false);
|
||||
}
|
||||
|
||||
uint32_t getCount() const {
|
||||
ob_error *error = nullptr;
|
||||
auto count = ob_color_preset_list_get_count(impl_, &error);
|
||||
Error::handle(&error);
|
||||
return count;
|
||||
}
|
||||
|
||||
const char *getName(uint32_t index) const {
|
||||
ob_error *error = nullptr;
|
||||
const char *name = ob_color_preset_list_get_name(impl_, index, &error);
|
||||
Error::handle(&error);
|
||||
return name;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Class representing a list of camera parameters
|
||||
*/
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <typeinfo>
|
||||
#include <typeindex>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include <cstring>
|
||||
|
||||
namespace ob {
|
||||
@@ -481,6 +482,64 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief UnDistortionFilter removes lens distortion from a chosen stream (Color, IR, or Depth).
|
||||
*
|
||||
*/
|
||||
class UnDistortionFilter : public Filter {
|
||||
public:
|
||||
explicit UnDistortionFilter(OBStreamType streamType = OB_STREAM_COLOR) {
|
||||
ob_error *error = nullptr;
|
||||
auto impl = ob_create_filter("UnDistortionFilter", &error);
|
||||
Error::handle(&error);
|
||||
init(impl);
|
||||
setConfigValue("StreamType", static_cast<double>(streamType));
|
||||
}
|
||||
|
||||
virtual ~UnDistortionFilter() noexcept override = default;
|
||||
|
||||
/**
|
||||
* @brief Set which stream to undistort (default: OB_STREAM_COLOR).
|
||||
*/
|
||||
void setStreamType(OBStreamType streamType) {
|
||||
setConfigValue("StreamType", static_cast<double>(streamType));
|
||||
}
|
||||
|
||||
OBStreamType getStreamType() const {
|
||||
return static_cast<OBStreamType>(static_cast<int>(getConfigValue("StreamType")));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the new camera matrix used to project the undistorted image
|
||||
* (equivalent to OpenCV's `newCameraMatrix` argument in
|
||||
* `cv::undistort(src, dst, cameraMatrix, distCoeffs, newCameraMatrix)`).
|
||||
*
|
||||
* Pass the raw depth camera intrinsic. The filter scales fx/fy/cx/cy from
|
||||
* the depth resolution to the actual color frame resolution at process time,
|
||||
* so the caller does NOT need to compute the scale factor.
|
||||
*
|
||||
* The new-camera-matrix mode is enabled as long as depthIntrinsic.width > 0.
|
||||
* Call clearNewCameraMatrix() to return to pure undistortion.
|
||||
*
|
||||
* @param depthIntrinsic The depth camera intrinsic at its native resolution.
|
||||
*/
|
||||
void setNewCameraMatrix(OBCameraIntrinsic depthIntrinsic) {
|
||||
setConfigValue("NewCameraFx", static_cast<double>(depthIntrinsic.fx));
|
||||
setConfigValue("NewCameraFy", static_cast<double>(depthIntrinsic.fy));
|
||||
setConfigValue("NewCameraCx", static_cast<double>(depthIntrinsic.cx));
|
||||
setConfigValue("NewCameraCy", static_cast<double>(depthIntrinsic.cy));
|
||||
setConfigValue("NewCameraWidth", static_cast<double>(depthIntrinsic.width));
|
||||
setConfigValue("NewCameraHeight", static_cast<double>(depthIntrinsic.height));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Clear the new camera matrix and return to pure undistortion.
|
||||
*/
|
||||
void clearNewCameraMatrix() {
|
||||
setConfigValue("NewCameraWidth", 0.0);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief The FormatConvertFilter class is a subclass of Filter that performs format conversion.
|
||||
*/
|
||||
@@ -1141,7 +1200,7 @@ public:
|
||||
*/
|
||||
OBUint16PropertyRange getMarginXthRange() {
|
||||
OBUint16PropertyRange range{};
|
||||
const auto & schemaVec = getConfigSchemaVec();
|
||||
const auto &schemaVec = getConfigSchemaVec();
|
||||
for(const auto &item: schemaVec) {
|
||||
if(strcmp(item.name, "margin_x_th") == 0) {
|
||||
range = getPropertyRange<OBUint16PropertyRange>(item, getConfigValue("margin_x_th"));
|
||||
@@ -1157,7 +1216,7 @@ public:
|
||||
*/
|
||||
OBUint16PropertyRange getMarginYthRange() {
|
||||
OBUint16PropertyRange range{};
|
||||
const auto & schemaVec = getConfigSchemaVec();
|
||||
const auto &schemaVec = getConfigSchemaVec();
|
||||
for(const auto &item: schemaVec) {
|
||||
if(strcmp(item.name, "margin_y_th") == 0) {
|
||||
range = getPropertyRange<OBUint16PropertyRange>(item, getConfigValue("margin_y_th"));
|
||||
@@ -1173,7 +1232,7 @@ public:
|
||||
*/
|
||||
OBUint16PropertyRange getLimitXthRange() {
|
||||
OBUint16PropertyRange range{};
|
||||
const auto & schemaVec = getConfigSchemaVec();
|
||||
const auto &schemaVec = getConfigSchemaVec();
|
||||
for(const auto &item: schemaVec) {
|
||||
if(strcmp(item.name, "limit_x_th") == 0) {
|
||||
range = getPropertyRange<OBUint16PropertyRange>(item, getConfigValue("limit_x_th"));
|
||||
@@ -1189,7 +1248,7 @@ public:
|
||||
*/
|
||||
OBUint16PropertyRange getLimitYthRange() {
|
||||
OBUint16PropertyRange range{};
|
||||
const auto & schemaVec = getConfigSchemaVec();
|
||||
const auto &schemaVec = getConfigSchemaVec();
|
||||
for(const auto &item: schemaVec) {
|
||||
if(strcmp(item.name, "limit_y_th") == 0) {
|
||||
range = getPropertyRange<OBUint16PropertyRange>(item, getConfigValue("limit_y_th"));
|
||||
@@ -1205,7 +1264,7 @@ public:
|
||||
*/
|
||||
OBUint16PropertyRange getVerticalDirectionEnableRange() {
|
||||
OBUint16PropertyRange range{};
|
||||
const auto & schemaVec = getConfigSchemaVec();
|
||||
const auto &schemaVec = getConfigSchemaVec();
|
||||
for(const auto &item: schemaVec) {
|
||||
if(strcmp(item.name, "enable_vertical_direction") == 0) {
|
||||
range = getPropertyRange<OBUint16PropertyRange>(item, getConfigValue("enable_vertical_direction"));
|
||||
@@ -1221,7 +1280,7 @@ public:
|
||||
*/
|
||||
OBUint16PropertyRange getWidthRange() {
|
||||
OBUint16PropertyRange range{};
|
||||
const auto & schemaVec = getConfigSchemaVec();
|
||||
const auto &schemaVec = getConfigSchemaVec();
|
||||
for(const auto &item: schemaVec) {
|
||||
if(strcmp(item.name, "width") == 0) {
|
||||
range = getPropertyRange<OBUint16PropertyRange>(item, getConfigValue("width"));
|
||||
@@ -1237,7 +1296,7 @@ public:
|
||||
*/
|
||||
OBUint16PropertyRange getHeightRange() {
|
||||
OBUint16PropertyRange range{};
|
||||
const auto & schemaVec = getConfigSchemaVec();
|
||||
const auto &schemaVec = getConfigSchemaVec();
|
||||
for(const auto &item: schemaVec) {
|
||||
if(strcmp(item.name, "height") == 0) {
|
||||
range = getPropertyRange<OBUint16PropertyRange>(item, getConfigValue("height"));
|
||||
@@ -1278,7 +1337,6 @@ public:
|
||||
param.height = static_cast<uint16_t>(getConfigValue("height"));
|
||||
return param;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1380,6 +1438,23 @@ public:
|
||||
return range;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the FalsePositive filter fpebfMinBleedLength range.
|
||||
*
|
||||
* @return OBUint16PropertyRange the fpebfMinBleedLength value of property range.
|
||||
*/
|
||||
OBUint16PropertyRange getfpebfMinBleedLengthRange() {
|
||||
OBUint16PropertyRange range{};
|
||||
const auto &schemaVec = getConfigSchemaVec();
|
||||
for(const auto &item: schemaVec) {
|
||||
if(strcmp(item.name, "fpebfMinBleedLength") == 0) {
|
||||
range = getPropertyRange<OBUint16PropertyRange>(item, getConfigValue("fpebfMinBleedLength"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return range;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the FalsePositive filter fpTextureSparsityFilterEnable range.
|
||||
*
|
||||
@@ -1617,6 +1692,74 @@ public:
|
||||
}
|
||||
return range;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the FalsePositive filter fppafMaxWidthRatio range.
|
||||
*
|
||||
* @return OBFloatPropertyRange the fppafMaxWidthRatio value of property range.
|
||||
*/
|
||||
OBFloatPropertyRange getfppafMaxWidthRatioRange() {
|
||||
OBFloatPropertyRange range{};
|
||||
const auto &schemaVec = getConfigSchemaVec();
|
||||
for(const auto &item: schemaVec) {
|
||||
if(strcmp(item.name, "fppafMaxWidthRatio") == 0) {
|
||||
range = getPropertyRange<OBFloatPropertyRange>(item, getConfigValue("fppafMaxWidthRatio"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return range;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the FalsePositive filter fppafMaxHeightRatio range.
|
||||
*
|
||||
* @return OBFloatPropertyRange the fppafMaxHeightRatio value of property range.
|
||||
*/
|
||||
OBFloatPropertyRange getfppafMaxHeightRatioRange() {
|
||||
OBFloatPropertyRange range{};
|
||||
const auto &schemaVec = getConfigSchemaVec();
|
||||
for(const auto &item: schemaVec) {
|
||||
if(strcmp(item.name, "fppafMaxHeightRatio") == 0) {
|
||||
range = getPropertyRange<OBFloatPropertyRange>(item, getConfigValue("fppafMaxHeightRatio"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return range;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the FalsePositive filter fppafTolerance range.
|
||||
*
|
||||
* @return OBFloatPropertyRange the fppafTolerance value of property range.
|
||||
*/
|
||||
OBFloatPropertyRange getfppafToleranceRange() {
|
||||
OBFloatPropertyRange range{};
|
||||
const auto &schemaVec = getConfigSchemaVec();
|
||||
for(const auto &item: schemaVec) {
|
||||
if(strcmp(item.name, "fppafTolerance") == 0) {
|
||||
range = getPropertyRange<OBFloatPropertyRange>(item, getConfigValue("fppafTolerance"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return range;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the FalsePositive filter fppafScore range.
|
||||
*
|
||||
* @return OBUint16PropertyRange the fppafScore value of property range.
|
||||
*/
|
||||
OBUint16PropertyRange getfppafScoreRange() {
|
||||
OBUint16PropertyRange range{};
|
||||
const auto &schemaVec = getConfigSchemaVec();
|
||||
for(const auto &item: schemaVec) {
|
||||
if(strcmp(item.name, "fppafScore") == 0) {
|
||||
range = getPropertyRange<OBUint16PropertyRange>(item, getConfigValue("fppafScore"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return range;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1939,6 +2082,175 @@ public:
|
||||
~DisparityTransform() noexcept override = default;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Enhanced depth filter that requires a device for activation.
|
||||
*
|
||||
* @note The constructor is a template so that Filter.hpp does not need to include Device.hpp.
|
||||
* The template is instantiated at the call site where the device type is complete.
|
||||
*/
|
||||
class EnhancedDepthFilter : public Filter {
|
||||
public:
|
||||
/**
|
||||
* @brief Construct an EnhancedDepthFilter and activate it for the given device.
|
||||
*
|
||||
* @param[in] device The device the filter is bound to.
|
||||
* @param[in] modelPath Optional path to the inference model file used during activation. When empty, the
|
||||
* filter falls back to its default model file at extensions/filters/enhanced_depth_filter/model.sm4
|
||||
* (located next to the filter library).
|
||||
*/
|
||||
template <typename T> explicit EnhancedDepthFilter(std::shared_ptr<T> device, const std::string &modelPath = "") {
|
||||
if(!device) {
|
||||
throw std::invalid_argument("device is null");
|
||||
}
|
||||
ob_error *error = nullptr;
|
||||
auto impl = ob_create_private_filter("EnhancedDepthFilter", "", &error);
|
||||
Error::handle(&error);
|
||||
|
||||
// Only pass options when a model path is provided; otherwise hand down nullptr so the filter uses its default.
|
||||
ob_priv_filter_activate_options options{};
|
||||
ob_priv_filter_activate_options *optionsPtr = nullptr;
|
||||
if(!modelPath.empty()) {
|
||||
options.struct_size = sizeof(options);
|
||||
options.model_path = modelPath.c_str();
|
||||
optionsPtr = &options;
|
||||
}
|
||||
ob_filter_activate_private_ex(impl, device->getImpl(), optionsPtr, &error);
|
||||
Error::handle(&error);
|
||||
init(impl);
|
||||
}
|
||||
|
||||
~EnhancedDepthFilter() noexcept override = default;
|
||||
|
||||
/**
|
||||
* @brief Get the resolutions supported by the enhanced depth filter for the constrained (aligned-to) stream.
|
||||
*
|
||||
* @return The list of supported {width, height} pairs. This is the single source of truth used by
|
||||
* @ref isSupportedResolution.
|
||||
*/
|
||||
static const std::vector<std::pair<uint32_t, uint32_t>> &getSupportedResolutions() {
|
||||
static const std::vector<std::pair<uint32_t, uint32_t>> supportedResolutions = {
|
||||
{ 640, 480 },
|
||||
{ 1280, 720 },
|
||||
{ 1280, 800 },
|
||||
};
|
||||
return supportedResolutions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the frame formats supported by the enhanced depth filter for a given stream type.
|
||||
*
|
||||
* @param[in] streamType The stream type. Only color and depth streams are supported.
|
||||
*
|
||||
* @return The list of supported formats (color: OB_FORMAT_RGB; depth: OB_FORMAT_Y10, OB_FORMAT_Y11,
|
||||
* OB_FORMAT_Y12, OB_FORMAT_Y14, OB_FORMAT_Y16, OB_FORMAT_Z16). Empty for unsupported stream types. This is the single
|
||||
* source of truth used by @ref isSupportedFormat.
|
||||
*/
|
||||
static std::vector<OBFormat> getSupportedFormats(OBStreamType streamType) {
|
||||
if(streamType == OB_STREAM_COLOR) {
|
||||
return { OB_FORMAT_RGB };
|
||||
}
|
||||
if(streamType == OB_STREAM_DEPTH) {
|
||||
return { OB_FORMAT_Y10, OB_FORMAT_Y11, OB_FORMAT_Y12, OB_FORMAT_Y14, OB_FORMAT_Y16, OB_FORMAT_Z16 };
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check whether a resolution is supported by the enhanced depth filter for a given stream alignment pair.
|
||||
*
|
||||
* @param[in] sourceStreamType The source stream type that provides the input frames.
|
||||
* @param[in] alignToStreamType The target stream type that the source stream is aligned to.
|
||||
* @param[in] width The frame width to validate.
|
||||
* @param[in] height The frame height to validate.
|
||||
*
|
||||
* @return true if the resolution is supported for the specified alignment combination, otherwise false.
|
||||
*/
|
||||
static bool isSupportedResolution(OBStreamType sourceStreamType, OBStreamType alignToStreamType, uint32_t width, uint32_t height) {
|
||||
if(sourceStreamType != alignToStreamType) {
|
||||
// If the source and target stream types are different, any resolution is supported.
|
||||
return true;
|
||||
}
|
||||
|
||||
for(const auto &res: getSupportedResolutions()) {
|
||||
if(res.first == width && res.second == height) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check whether a frame format is supported by the enhanced depth filter for a given stream type.
|
||||
*
|
||||
* @param[in] streamType The stream type to validate. Only color and depth streams are supported.
|
||||
* @param[in] format The frame format to validate.
|
||||
*
|
||||
* @return true if the format is supported for the given stream type, otherwise false.
|
||||
*/
|
||||
static bool isSupportedFormat(OBStreamType streamType, OBFormat format) {
|
||||
for(const auto &supported: getSupportedFormats(streamType)) {
|
||||
if(supported == format) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the working resolution of the enhanced depth filter.
|
||||
*
|
||||
* @param[in] width The target frame width.
|
||||
* @param[in] height The target frame height.
|
||||
*/
|
||||
void setResolution(uint32_t width, uint32_t height) {
|
||||
setConfigValue("width", static_cast<double>(width));
|
||||
setConfigValue("height", static_cast<double>(height));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the current configured frame width.
|
||||
*
|
||||
* @return uint32_t The current width.
|
||||
*/
|
||||
uint32_t getCurrentWidth() const {
|
||||
return static_cast<uint32_t>(getConfigValue("width"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the current configured frame height.
|
||||
*
|
||||
* @return uint32_t The current height.
|
||||
*/
|
||||
uint32_t getCurrentHeight() const {
|
||||
return static_cast<uint32_t>(getConfigValue("height"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the confidence threshold for depth values.
|
||||
*
|
||||
* @param value The confidence threshold.
|
||||
*/
|
||||
void setConfidenceThreshold(uint32_t value) {
|
||||
setConfigValue("confidence_threshold", static_cast<double>(value));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the property range of the confidence threshold range.
|
||||
*/
|
||||
OBIntPropertyRange getConfidenceThresholdRange() {
|
||||
OBIntPropertyRange range{};
|
||||
const auto &schemaVec = getConfigSchemaVec();
|
||||
for(const auto &item: schemaVec) {
|
||||
const char *name = "confidence_threshold";
|
||||
if(std::strcmp(item.name, name) == 0) {
|
||||
range = getPropertyRange<OBIntPropertyRange>(item, getConfigValue(name));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return range;
|
||||
}
|
||||
};
|
||||
|
||||
class OBFilterList {
|
||||
private:
|
||||
ob_filter_list_t *impl_;
|
||||
@@ -1990,17 +2302,26 @@ public:
|
||||
*/
|
||||
inline const std::unordered_map<std::string, std::type_index> &getFilterTypeMap() {
|
||||
static const std::unordered_map<std::string, std::type_index> filterTypeMap = {
|
||||
{ "PointCloudFilter", typeid(PointCloudFilter) }, { "Align", typeid(Align) },
|
||||
{ "FormatConverter", typeid(FormatConvertFilter) }, { "HDRMerge", typeid(HdrMerge) },
|
||||
{ "SequenceIdFilter", typeid(SequenceIdFilter) }, { "DecimationFilter", typeid(DecimationFilter) },
|
||||
{ "ThresholdFilter", typeid(ThresholdFilter) }, { "SpatialAdvancedFilter", typeid(SpatialAdvancedFilter) },
|
||||
{ "HoleFillingFilter", typeid(HoleFillingFilter) }, { "NoiseRemovalFilter", typeid(NoiseRemovalFilter) },
|
||||
{ "TemporalFilter", typeid(TemporalFilter) }, { "DisparityTransform", typeid(DisparityTransform) },
|
||||
{ "SpatialFastFilter", typeid(SpatialFastFilter) }, { "SpatialModerateFilter", typeid(SpatialModerateFilter) },
|
||||
{ "PointCloudFilter", typeid(PointCloudFilter) },
|
||||
{ "Align", typeid(Align) },
|
||||
{ "FormatConverter", typeid(FormatConvertFilter) },
|
||||
{ "HDRMerge", typeid(HdrMerge) },
|
||||
{ "SequenceIdFilter", typeid(SequenceIdFilter) },
|
||||
{ "DecimationFilter", typeid(DecimationFilter) },
|
||||
{ "ThresholdFilter", typeid(ThresholdFilter) },
|
||||
{ "SpatialAdvancedFilter", typeid(SpatialAdvancedFilter) },
|
||||
{ "HoleFillingFilter", typeid(HoleFillingFilter) },
|
||||
{ "NoiseRemovalFilter", typeid(NoiseRemovalFilter) },
|
||||
{ "TemporalFilter", typeid(TemporalFilter) },
|
||||
{ "DisparityTransform", typeid(DisparityTransform) },
|
||||
{ "SpatialFastFilter", typeid(SpatialFastFilter) },
|
||||
{ "SpatialModerateFilter", typeid(SpatialModerateFilter) },
|
||||
{ "EdgeNoiseRemovalFilter", typeid(EdgeNoiseRemovalFilter) },
|
||||
{ "FalsePositiveFilter", typeid(FalsePositiveFilter) },
|
||||
{ "MgcNoiseRemovalFilter", typeid(MgcNoiseRemovalFilter) },
|
||||
{ "LutNoiseRemovalFilter", typeid(LutNoiseRemovalFilter) },
|
||||
{ "UnDistortionFilter", typeid(UnDistortionFilter) },
|
||||
{ "EnhancedDepthFilter", typeid(EnhancedDepthFilter) },
|
||||
};
|
||||
return filterTypeMap;
|
||||
}
|
||||
|
||||
@@ -123,6 +123,32 @@ public:
|
||||
return index;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the auth token carried by the frame.
|
||||
*
|
||||
* @return uint64_t The auth token value.
|
||||
*/
|
||||
uint64_t getToken() const {
|
||||
ob_error *error = nullptr;
|
||||
auto token = ob_frame_get_token(impl_, &error);
|
||||
Error::handle(&error);
|
||||
|
||||
return token;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the auth token carried by the frame.
|
||||
*
|
||||
* @param token The auth token value.
|
||||
*/
|
||||
void setToken(uint64_t token) {
|
||||
ob_error *error = nullptr;
|
||||
auto unConstImpl = const_cast<ob_frame *>(impl_);
|
||||
|
||||
ob_frame_set_token(unConstImpl, token, &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get frame data
|
||||
*
|
||||
|
||||
@@ -70,10 +70,19 @@ public:
|
||||
|
||||
class PlaybackDevice : public Device {
|
||||
public:
|
||||
explicit PlaybackDevice(const std::string &file) : Device(nullptr) {
|
||||
/**
|
||||
* @brief Constructs a PlaybackDevice for playing back recorded device data.
|
||||
* @param[in] file Path to the playback file.
|
||||
* @param[in] presetPath Path to a preset JSON file to load after device creation. If empty, no preset is loaded.
|
||||
*/
|
||||
explicit PlaybackDevice(const std::string &file, const std::string &presetPath = "") : Device(nullptr) {
|
||||
ob_error *error = nullptr;
|
||||
impl_ = ob_create_playback_device(file.c_str(), &error);
|
||||
Error::handle(&error);
|
||||
|
||||
if(!presetPath.empty()) {
|
||||
loadPresetFromJsonFile(presetPath.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
virtual ~PlaybackDevice() noexcept override = default;
|
||||
|
||||
@@ -68,6 +68,28 @@ public:
|
||||
return ob_imu_rate_type_to_string(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Convert OBIMUSampleRate to its numeric frequency value in Hz.
|
||||
*
|
||||
* @param[in] type OBIMUSampleRate type.
|
||||
*
|
||||
* @return IMU sample rate value in Hz.
|
||||
*/
|
||||
static float convertOBIMUSampleRateTypeToValue(const OBIMUSampleRate &type) {
|
||||
return ob_imu_rate_type_to_value(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Convert a numeric IMU sample rate value in Hz to OBIMUSampleRate.
|
||||
*
|
||||
* @param[in] value IMU sample rate value in Hz.
|
||||
*
|
||||
* @return Matching OBIMUSampleRate.
|
||||
*/
|
||||
static OBIMUSampleRate convertOBIMUSampleRateValueToType(float value) {
|
||||
return ob_imu_rate_value_to_type(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Convert OBGyroFullScaleRange to " string " type and then return.
|
||||
*
|
||||
@@ -122,6 +144,50 @@ public:
|
||||
return ob_sensor_type_to_stream_type(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Convert OBStreamType to OBSensorType and then return.
|
||||
*
|
||||
* @param[in] type OBStreamType type.
|
||||
*
|
||||
* @return OBSensorType type.
|
||||
*/
|
||||
static OBSensorType convertStreamTypeToSensorType(OBStreamType type) {
|
||||
return ob_stream_type_to_sensor_type(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Convert OBStreamType to OBFrameType and then return.
|
||||
*
|
||||
* @param[in] type OBStreamType type.
|
||||
*
|
||||
* @return OBFrameType type.
|
||||
*/
|
||||
static OBFrameType convertStreamTypeToFrameType(OBStreamType type) {
|
||||
return ob_stream_type_to_frame_type(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Convert OBFrameType to OBStreamType and then return.
|
||||
*
|
||||
* @param[in] type OBFrameType type.
|
||||
*
|
||||
* @return OBStreamType type.
|
||||
*/
|
||||
static OBStreamType convertFrameTypeToStreamType(OBFrameType type) {
|
||||
return ob_frame_type_to_stream_type(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Convert OBFrameType to OBSensorType and then return.
|
||||
*
|
||||
* @param[in] type OBFrameType type.
|
||||
*
|
||||
* @return OBSensorType type.
|
||||
*/
|
||||
static OBSensorType convertFrameTypeToSensorType(OBFrameType type) {
|
||||
return ob_frame_type_to_sensor_type(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check if the given sensor type is a video sensor.
|
||||
* @brief Video sensors are sensors that produce video frames.
|
||||
|
||||
@@ -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.8.6"
|
||||
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.9.3"
|
||||
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.8.6" )
|
||||
list(APPEND _cmake_import_check_files_for_ob::OrbbecSDK "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.9.3" )
|
||||
|
||||
# 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.8.6")
|
||||
set(PACKAGE_VERSION "2.9.3")
|
||||
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
|
||||
if("2.8.6" MATCHES "^([0-9]+)\\.")
|
||||
if("2.9.3" 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.8.6")
|
||||
set(CVF_VERSION_MAJOR "2.9.3")
|
||||
endif()
|
||||
|
||||
if(PACKAGE_FIND_VERSION_RANGE)
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
libOrbbecSDK.so.2.8.6
|
||||
libOrbbecSDK.so.2.9.3
|
||||
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.8.6"
|
||||
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.9.3"
|
||||
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.8.6" )
|
||||
list(APPEND _cmake_import_check_files_for_ob::OrbbecSDK "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.9.3" )
|
||||
|
||||
# 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.8.6")
|
||||
set(PACKAGE_VERSION "2.9.3")
|
||||
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
|
||||
if("2.8.6" MATCHES "^([0-9]+)\\.")
|
||||
if("2.9.3" 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.8.6")
|
||||
set(CVF_VERSION_MAJOR "2.9.3")
|
||||
endif()
|
||||
|
||||
if(PACKAGE_FIND_VERSION_RANGE)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
libOrbbecSDK.so.2.8.6
|
||||
libOrbbecSDK.so.2.9.3
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,19 @@
|
||||
# Third-party Libraries
|
||||
|
||||
This folder contains third-party libraries used by the OrbbecSDK.
|
||||
|
||||
The libraries included in this folder are:
|
||||
|
||||
| Library | Description | License | Link |
|
||||
| -------------- | ----------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
|
||||
| libusb | A cross-platform library for USB device access | LGPL-2.1 | <https://github.com/libusb/libusb> |
|
||||
| libuvc | A cross-platform library for USB video device access | BSD | <https://github.com/ktossell/libuvc> |
|
||||
| spdlog v1.14.1 | A fast C++ logging library | MIT | <https://github.com/gabime/spdlog> |
|
||||
| dylib v2.2.1 | A cross-platform shared library loader | MIT | <https://github.com/martin-olivier/dylib> |
|
||||
| libjpeg-turbo v2.0 | A JPEG image codec library | BSD-3-Clause | <https://github.com/libjpeg-turbo/libjpeg-turbo> |
|
||||
| libyuv | An open source project that includes YUV scaling and conversion functionality | BSD-3-Clause | <https://chromium.googlesource.com/libyuv/libyuv> |
|
||||
| live555 | A library for streaming media over the network | LGPL | <http://www.live555.com/> |
|
||||
| tinyxml2 | A simple, small, efficient, C++ XML parser | Zlib | <https://github.com/leethomason/tinyxml2> |
|
||||
| cmrc | A Resource Compiler in a Single CMake Script | MIT | <https://github.com/vector-of-bool/cmrc> |
|
||||
| josncpp | A C++ library for interacting with JSON. | MIT | <https://github.com/open-source-parsers/jsoncpp> |
|
||||
| mdns-1.4.3 | A cross-platform C library for mDNS and DNS-DS | FREE | https://github.com/mjansson/mdns |
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017 vector-of-bool <vectorofbool@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 Martin Olivier
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,55 @@
|
||||
The JsonCpp library's source code, including accompanying documentation,
|
||||
tests and demonstration applications, are licensed under the following
|
||||
conditions...
|
||||
|
||||
Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all
|
||||
jurisdictions which recognize such a disclaimer. In such jurisdictions,
|
||||
this software is released into the Public Domain.
|
||||
|
||||
In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
|
||||
2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur and
|
||||
The JsonCpp Authors, and is released under the terms of the MIT License (see below).
|
||||
|
||||
In jurisdictions which recognize Public Domain property, the user of this
|
||||
software may choose to accept it either as 1) Public Domain, 2) under the
|
||||
conditions of the MIT License (see below), or 3) under the terms of dual
|
||||
Public Domain/MIT License conditions described here, as they choose.
|
||||
|
||||
The MIT License is about as close to Public Domain as a license can get, and is
|
||||
described in clear, concise terms at:
|
||||
|
||||
http://en.wikipedia.org/wiki/MIT_License
|
||||
|
||||
The full text of the MIT License follows:
|
||||
|
||||
========================================================================
|
||||
Copyright (c) 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use, copy,
|
||||
modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
||||
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
========================================================================
|
||||
(END LICENSE TEXT)
|
||||
|
||||
The MIT license is compatible with both the GPL and commercial
|
||||
software, affording one all of the rights of Public Domain with the
|
||||
minor nuisance of being required to keep the above copyright notice
|
||||
and license text in the source code. Note also that by accepting the
|
||||
Public Domain "license" you can re-license your copy using whatever
|
||||
license you like.
|
||||
@@ -0,0 +1,132 @@
|
||||
libjpeg-turbo Licenses
|
||||
======================
|
||||
|
||||
libjpeg-turbo is covered by three compatible BSD-style open source licenses:
|
||||
|
||||
- The IJG (Independent JPEG Group) License, which is listed in
|
||||
[README.ijg](README.ijg)
|
||||
|
||||
This license applies to the libjpeg API library and associated programs
|
||||
(any code inherited from libjpeg, and any modifications to that code.)
|
||||
|
||||
- The Modified (3-clause) BSD License, which is listed below
|
||||
|
||||
This license covers the TurboJPEG API library and associated programs, as
|
||||
well as the build system.
|
||||
|
||||
- The [zlib License](https://opensource.org/licenses/Zlib)
|
||||
|
||||
This license is a subset of the other two, and it covers the libjpeg-turbo
|
||||
SIMD extensions.
|
||||
|
||||
|
||||
Complying with the libjpeg-turbo Licenses
|
||||
=========================================
|
||||
|
||||
This section provides a roll-up of the libjpeg-turbo licensing terms, to the
|
||||
best of our understanding.
|
||||
|
||||
1. If you are distributing a modified version of the libjpeg-turbo source,
|
||||
then:
|
||||
|
||||
1. You cannot alter or remove any existing copyright or license notices
|
||||
from the source.
|
||||
|
||||
**Origin**
|
||||
- Clause 1 of the IJG License
|
||||
- Clause 1 of the Modified BSD License
|
||||
- Clauses 1 and 3 of the zlib License
|
||||
|
||||
2. You must add your own copyright notice to the header of each source
|
||||
file you modified, so others can tell that you modified that file (if
|
||||
there is not an existing copyright header in that file, then you can
|
||||
simply add a notice stating that you modified the file.)
|
||||
|
||||
**Origin**
|
||||
- Clause 1 of the IJG License
|
||||
- Clause 2 of the zlib License
|
||||
|
||||
3. You must include the IJG README file, and you must not alter any of the
|
||||
copyright or license text in that file.
|
||||
|
||||
**Origin**
|
||||
- Clause 1 of the IJG License
|
||||
|
||||
2. If you are distributing only libjpeg-turbo binaries without the source, or
|
||||
if you are distributing an application that statically links with
|
||||
libjpeg-turbo, then:
|
||||
|
||||
1. Your product documentation must include a message stating:
|
||||
|
||||
This software is based in part on the work of the Independent JPEG
|
||||
Group.
|
||||
|
||||
**Origin**
|
||||
- Clause 2 of the IJG license
|
||||
|
||||
2. If your binary distribution includes or uses the TurboJPEG API, then
|
||||
your product documentation must include the text of the Modified BSD
|
||||
License (see below.)
|
||||
|
||||
**Origin**
|
||||
- Clause 2 of the Modified BSD License
|
||||
|
||||
3. You cannot use the name of the IJG or The libjpeg-turbo Project or the
|
||||
contributors thereof in advertising, publicity, etc.
|
||||
|
||||
**Origin**
|
||||
- IJG License
|
||||
- Clause 3 of the Modified BSD License
|
||||
|
||||
4. The IJG and The libjpeg-turbo Project do not warrant libjpeg-turbo to be
|
||||
free of defects, nor do we accept any liability for undesirable
|
||||
consequences resulting from your use of the software.
|
||||
|
||||
**Origin**
|
||||
- IJG License
|
||||
- Modified BSD License
|
||||
- zlib License
|
||||
|
||||
|
||||
The Modified (3-clause) BSD License
|
||||
===================================
|
||||
|
||||
Copyright (C)2009-2020 D. R. Commander. All Rights Reserved.
|
||||
Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
- Neither the name of the libjpeg-turbo Project nor the names of its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
Why Three Licenses?
|
||||
===================
|
||||
|
||||
The zlib License could have been used instead of the Modified (3-clause) BSD
|
||||
License, and since the IJG License effectively subsumes the distribution
|
||||
conditions of the zlib License, this would have effectively placed
|
||||
libjpeg-turbo binary distributions under the IJG License. However, the IJG
|
||||
License specifically refers to the Independent JPEG Group and does not extend
|
||||
attribution and endorsement protections to other entities. Thus, it was
|
||||
desirable to choose a license that granted us the same protections for new code
|
||||
that were granted to the IJG for code derived from their software.
|
||||
@@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
Software License Agreement (BSD License)
|
||||
|
||||
Copyright (C) 2010-2015 Ken Tossell
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
* Neither the name of the author nor other contributors may be
|
||||
used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,29 @@
|
||||
Copyright 2011 The LibYuv Project Authors. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
* Neither the name of Google nor the names of its contributors may
|
||||
be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
@@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
@@ -0,0 +1,24 @@
|
||||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
For more information, please refer to <http://unlicense.org>
|
||||
@@ -0,0 +1,24 @@
|
||||
LZ4 Library
|
||||
Copyright (c) 2011-2016, Yann Collet
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or
|
||||
other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,26 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Gabi Melman.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
-- NOTE: Third party dependency used by this software --
|
||||
This software depends on the fmt lib (MIT License),
|
||||
and users must comply to its license: https://raw.githubusercontent.com/fmtlib/fmt/master/LICENSE
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
Original code by Lee Thomason (www.grinninglizard.com)
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any
|
||||
damages arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any
|
||||
purpose, including commercial applications, and to alter it and
|
||||
redistribute it freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and
|
||||
must not be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source
|
||||
distribution.
|
||||
@@ -44,8 +44,8 @@
|
||||
<Pipeline>
|
||||
<Stream>
|
||||
<Depth>
|
||||
<!-- Use default stream profile, bool type, true: use default stream profile,
|
||||
false:use specified stream profile in the configuration file -->
|
||||
<!-- Use default stream profile, bool type, true: use default stream profile,
|
||||
false: use specified stream profile in the configuration file -->
|
||||
<UseDefaultStreamProfile>true</UseDefaultStreamProfile>
|
||||
</Depth>
|
||||
<Color>
|
||||
@@ -82,7 +82,13 @@
|
||||
|
||||
<!-- GVCP port scheme: Standard = default port, SchemeB = custom port -->
|
||||
<GVCPPortScheme>Standard</GVCPPortScheme>
|
||||
|
||||
|
||||
<!-- Host-side clock type for device timestamps.
|
||||
Options: Realtime, Monotonic.
|
||||
Realtime: Wall clock (system_clock), epoch-based.
|
||||
Monotonic: Monotonic clock, not tied to epoch. -->
|
||||
<ClockSource>Realtime</ClockSource>
|
||||
|
||||
<!-- Gemini305 config -->
|
||||
<Gemini305>
|
||||
<!-- Default backend for Linux UVC devices. If the LinuxUVCBackend is set to "Auto,"
|
||||
@@ -292,6 +298,125 @@
|
||||
</RightIR>
|
||||
</Gemini305g>
|
||||
|
||||
<!-- Gemini309g config -->
|
||||
<Gemini309g>
|
||||
<!-- The default Linux UVC backend. If the LinuxUVCBackend is set to "Auto," this item
|
||||
will determine the device's speciality. Optional values: V4L2, LibUVC -->
|
||||
<LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend>
|
||||
|
||||
<!-- Enable auto device reboot when a fatal XU channel IO error (LIBUSB_ERROR_IO) is
|
||||
detected on the LibUVC backend. Set to true to enable; default is false. -->
|
||||
<LinuxUVCAutoRebootOnFault>true</LinuxUVCAutoRebootOnFault>
|
||||
|
||||
<Misc>
|
||||
<GlobalTimestampFitterEnable>true</GlobalTimestampFitterEnable>
|
||||
<!-- Global timestamp fitter refresh interval, unit: milliseconds, default value:
|
||||
1000,
|
||||
minimum value: 100, it is recommended not to be greater than 1000 -->
|
||||
<GlobalTimestampFitterInterval>1000</GlobalTimestampFitterInterval>
|
||||
<!-- Global timestamp fitter queue size, default value: 100, minimum value: 20 -->
|
||||
<GlobalTimestampFitterQueueSize>100</GlobalTimestampFitterQueueSize>
|
||||
</Misc>
|
||||
|
||||
<DepthPostProcessing>
|
||||
<HardwareNoiseRemoveFilter>true</HardwareNoiseRemoveFilter>
|
||||
<SoftwareNoiseRemoveFilter>false</SoftwareNoiseRemoveFilter>
|
||||
</DepthPostProcessing>
|
||||
|
||||
<!-- Whether to enable heartbeat by default -->
|
||||
<DefaultHeartBeat>0</DefaultHeartBeat>
|
||||
<!-- Whether to enable firmware upgrade foolproof by default, only internal version
|
||||
supports -->
|
||||
<FirmwareUpgradeFoolproof>1</FirmwareUpgradeFoolproof>
|
||||
<Depth>
|
||||
<!-- Number of retries for open stream failures, 0 means no retries -->
|
||||
<StreamFailedRetry>1</StreamFailedRetry>
|
||||
<!-- Open flow waits for the timeout period of the first frame of data, after which
|
||||
the open flow will fail -->
|
||||
<MaxStartStreamDelayMs>3000</MaxStartStreamDelayMs>
|
||||
<!-- The maximum frame interval time, if this value is exceeded, it will be judged
|
||||
that the stream is interrupted -->
|
||||
<MaxFrameIntervalMs>6000</MaxFrameIntervalMs>
|
||||
<!-- The resolution width is enabled by default, int type -->
|
||||
<Width>848</Width>
|
||||
<!-- High resolution is enabled by default, int type -->
|
||||
<Height>530</Height>
|
||||
<!-- The frame rate of the resolution enabled by default, int type -->
|
||||
<FPS>30</FPS>
|
||||
<Format>Y16</Format>
|
||||
</Depth>
|
||||
<Color>
|
||||
<!-- Number of retries for open stream failures, 0 means no retries -->
|
||||
<StreamFailedRetry>1</StreamFailedRetry>
|
||||
<!-- Open flow waits for the timeout period of the first frame of data, after which
|
||||
the open flow will fail -->
|
||||
<MaxStartStreamDelayMs>3000</MaxStartStreamDelayMs>
|
||||
<!-- The maximum frame interval time, if this value is exceeded, it will be judged
|
||||
that the stream is interrupted -->
|
||||
<MaxFrameIntervalMs>6000</MaxFrameIntervalMs>
|
||||
<!-- The resolution width is enabled by default, int type -->
|
||||
<Width>848</Width>
|
||||
<!-- High resolution is enabled by default, int type -->
|
||||
<Height>530</Height>
|
||||
<!-- The frame rate of the resolution enabled by default, int type -->
|
||||
<FPS>30</FPS>
|
||||
<Format>YUYV</Format>
|
||||
</Color>
|
||||
<LeftColor>
|
||||
<!-- Number of retries for open stream failures, 0 means no retries -->
|
||||
<StreamFailedRetry>1</StreamFailedRetry>
|
||||
<!-- Open flow waits for the timeout period of the first frame of data, after which
|
||||
the open flow will fail -->
|
||||
<MaxStartStreamDelayMs>3000</MaxStartStreamDelayMs>
|
||||
<!-- The maximum frame interval time, if this value is exceeded, it will be judged
|
||||
that the stream is interrupted -->
|
||||
<MaxFrameIntervalMs>6000</MaxFrameIntervalMs>
|
||||
<!-- The resolution width is enabled by default, int type -->
|
||||
<Width>1280</Width>
|
||||
<!-- High resolution is enabled by default, int type -->
|
||||
<Height>800</Height>
|
||||
<!-- The frame rate of the resolution enabled by default, int type -->
|
||||
<FPS>30</FPS>
|
||||
<Format>YUYV</Format>
|
||||
</LeftColor>
|
||||
<RightColor>
|
||||
<!-- Number of retries for open stream failures, 0 means no retries -->
|
||||
<StreamFailedRetry>1</StreamFailedRetry>
|
||||
<!-- Open flow waits for the timeout period of the first frame of data, after which
|
||||
the open flow will fail -->
|
||||
<MaxStartStreamDelayMs>3000</MaxStartStreamDelayMs>
|
||||
<!-- The maximum frame interval time, if this value is exceeded, it will be judged
|
||||
that the stream is interrupted -->
|
||||
<MaxFrameIntervalMs>6000</MaxFrameIntervalMs>
|
||||
<!-- The resolution width is enabled by default, int type -->
|
||||
<Width>1280</Width>
|
||||
<!-- High resolution is enabled by default, int type -->
|
||||
<Height>800</Height>
|
||||
<!-- The frame rate of the resolution enabled by default, int type -->
|
||||
<FPS>30</FPS>
|
||||
<Format>YUYV</Format>
|
||||
</RightColor>
|
||||
<LeftIR>
|
||||
<!-- The resolution width is enabled by default, int type -->
|
||||
<Width>848</Width>
|
||||
<!-- High resolution is enabled by default, int type -->
|
||||
<Height>530</Height>
|
||||
<!-- The frame rate of the resolution enabled by default, int type -->
|
||||
<FPS>30</FPS>
|
||||
<Format>Y8</Format>
|
||||
</LeftIR>
|
||||
<RightIR>
|
||||
<!-- The resolution width is enabled by default, int type -->
|
||||
<Width>848</Width>
|
||||
<!-- High resolution is enabled by default, int type -->
|
||||
<Height>530</Height>
|
||||
<!-- The frame rate of the resolution enabled by default, int type -->
|
||||
<FPS>30</FPS>
|
||||
<Format>Y8</Format>
|
||||
</RightIR>
|
||||
</Gemini309g>
|
||||
|
||||
|
||||
<FemtoMega>
|
||||
<!-- For Femto-Mega devices, it must be set to V4L2, LibUVC is not supported -->
|
||||
<LinuxUVCDefaultBackend>V4L2</LinuxUVCDefaultBackend>
|
||||
@@ -1903,8 +2028,8 @@
|
||||
</Misc>
|
||||
|
||||
<DepthPostProcessing>
|
||||
<HardwareNoiseRemoveFilter>false</HardwareNoiseRemoveFilter>
|
||||
<SoftwareNoiseRemoveFilter>true</SoftwareNoiseRemoveFilter>
|
||||
<HardwareNoiseRemoveFilter>true</HardwareNoiseRemoveFilter>
|
||||
<SoftwareNoiseRemoveFilter>false</SoftwareNoiseRemoveFilter>
|
||||
</DepthPostProcessing>
|
||||
|
||||
<!-- Whether to enable heartbeat by default -->
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
# config/*.yaml files are used to configure the camera parameters
|
||||
---
|
||||
orbbec_ros:
|
||||
camera_parameters:
|
||||
general:
|
||||
# Camera model. upport product models by referencing config/*.yaml
|
||||
camera_model: "astra2"
|
||||
# Path to the configuration file. If empty, default parameters will be used
|
||||
config_file_path: "astra2.yaml"
|
||||
|
||||
deivce:
|
||||
camera_name: "camera"
|
||||
serial_number: ""
|
||||
usb_port: ""
|
||||
device_num: 1
|
||||
uvc_backend: "libuvc"
|
||||
vendor_id: "0x2bc5"
|
||||
product_id: ""
|
||||
connection_delay: 100
|
||||
time_domain: "global"
|
||||
enable_heartbeat: false
|
||||
enable_ldp: true
|
||||
|
||||
color:
|
||||
enable_color: true
|
||||
color_qos: "default"
|
||||
color_camera_info_qos: "default"
|
||||
color_width: 1280
|
||||
color_height: 720
|
||||
color_fps: 30
|
||||
color_format: "MJPG"
|
||||
enable_color_auto_white_balance: true
|
||||
color_white_balance: -1
|
||||
color_auto_ae:
|
||||
enable_color_auto_exposure: true
|
||||
color_ae_max_exposure: -1
|
||||
color_manual_ae:
|
||||
color_exposure: -1
|
||||
color_gain: -1
|
||||
color_brightness: -1
|
||||
|
||||
depth:
|
||||
enable_depth: true
|
||||
depth_qos: "default"
|
||||
depth_camera_info_qos: "default"
|
||||
depth_width: 800
|
||||
depth_height: 600
|
||||
depth_fps: 30
|
||||
depth_format: "RLE"
|
||||
depth_registration: false
|
||||
align_mode: "HW"
|
||||
ir:
|
||||
enable_ir: true
|
||||
ir_qos: "default"
|
||||
ir_camera_info_qos: "default"
|
||||
ir_width: 800
|
||||
ir_height: 600
|
||||
ir_fps: 30
|
||||
ir_format: "Y8"
|
||||
|
||||
ir_parameters:
|
||||
enable_ir_auto_exposure: true
|
||||
ir_ae_max_exposure: -1
|
||||
ir_exposure: -1
|
||||
ir_gain: -1
|
||||
ir_brightness: -1
|
||||
|
||||
imu:
|
||||
enable_accel: false
|
||||
accel_rate: "100hz"
|
||||
accel_range: "4g"
|
||||
enable_gyro: false
|
||||
gyro_rate: "100hz"
|
||||
gyro_range: "1000dps"
|
||||
enable_sync_output_accel_gyro: true
|
||||
linear_accel_cov: 0.01
|
||||
angular_vel_cov: 0.01
|
||||
|
||||
point_cloud:
|
||||
enable_point_cloud: true
|
||||
enable_colored_point_cloud: false
|
||||
|
||||
advanced:
|
||||
enable_frame_sync: true
|
||||
enable_d2c_viewer: false
|
||||
|
||||
@@ -16,9 +16,9 @@ time_domain: "global" # global, device, system
|
||||
enable_sync_host_time: true
|
||||
|
||||
trigger_out_enabled: true
|
||||
frames_per_trigger: 0
|
||||
frames_per_trigger: 1
|
||||
software_trigger_period: 0
|
||||
|
||||
enable_fps_boost: false
|
||||
|
||||
# color params
|
||||
enable_color: true
|
||||
|
||||
@@ -16,9 +16,9 @@ time_domain: "global" # global, device, system
|
||||
enable_sync_host_time: true
|
||||
|
||||
trigger_out_enabled: false
|
||||
frames_per_trigger: 0
|
||||
frames_per_trigger: 1
|
||||
software_trigger_period: 0
|
||||
|
||||
enable_fps_boost: false
|
||||
|
||||
# color params
|
||||
enable_color: true
|
||||
|
||||
@@ -1,433 +0,0 @@
|
||||
# config/*.yaml files are used to configure the camera parameters
|
||||
---
|
||||
orbbec_ros:
|
||||
camera_parameters:
|
||||
general:
|
||||
# Camera model. support product models by referencing config/*.yaml
|
||||
camera_model: "gemini330_series"
|
||||
# The configuration file for yaml params.
|
||||
config_file_path: "gemini330_series.yaml"
|
||||
# Log level. Supported levels are 'debug', 'info', 'warning' and 'error'. Default is 'none'.
|
||||
log_level: "none"
|
||||
|
||||
deivce:
|
||||
# camera name, usually overwritten by launch file
|
||||
camera_name: "camera"
|
||||
# camera serial number, usually overwritten by launch file
|
||||
serial_number: ""
|
||||
# The USB port of the camera. This parameter is required when using multiple cameras.
|
||||
usb_port: ""
|
||||
# Number of devices. If multiple cameras are required, this parameter must be filled in launch file
|
||||
device_num: 1
|
||||
# Optional values: v4l2, libuvc
|
||||
uvc_backend: "libuvc"
|
||||
# Usually no need to change,will be read from the device
|
||||
product_id: ""
|
||||
# The delay time for reopening the device, in milliseconds. Usually, there is no need to modify by default.
|
||||
connection_delay: 10
|
||||
# Select timestamp type: "device" , “global” and "system"
|
||||
time_domain: "device"
|
||||
# If the camera is connected to a USB 2.0 port and is not detected, the system will attempt to reset the camera up to three times. This setting is designed to prevent USB 3.0 devices from being mistakenly identified as USB 2.0.
|
||||
# It is recommended to set this parameter to false when using a USB 2.0 connection to avoid unnecessary resets
|
||||
retry_on_usb3_detection_failure: false
|
||||
# If true, the heartbeat will be enabled
|
||||
enable_heartbeat: false
|
||||
# If true, the camera will be reset
|
||||
enable_hardware_reset: false
|
||||
# If true, the LDP will be enabled
|
||||
enable_ldp: true
|
||||
# The preset of the device. #For details, Please refer to the comments in SDK/include/libobsensor/Advanced.h for a detailed explanation
|
||||
# Predefined presets doc reference: docs/source/2_installation/package_description.md
|
||||
# Deep working mode support is as follows:{"Default","Hand","High Accuracy","High Density","Medium Density","Custom"}
|
||||
device_preset: "Default"
|
||||
|
||||
network_device:
|
||||
# Whether to enable the function of enumerating network devices. True means enabled and false means disabled. This function is only supported by Femto Mega and Gemini 2 XL devices.
|
||||
# When accessing these devices through the network, the IP address of the device needs to be preconfigured. The enable switch needs to be set to true.
|
||||
enumerate_net_device: false
|
||||
# Port number of the network device. If 0, a random port will be used
|
||||
net_device_port: 0
|
||||
# IP address of the network device.
|
||||
net_device_ip: ""
|
||||
|
||||
color:
|
||||
# If true, the color image will be enabled
|
||||
enable_color: true
|
||||
# Quality of Service for the color image topic and the color camera info topic
|
||||
# [color|depth|ir]_qos, and [color|depth|ir]_camera_info_qos and [point_cloud_qos] are the Quality of Service (QoS) settings in ROS 2 messages.
|
||||
# The possible values include SYSTEM_DEFAULT, DEFAULT, PARAMETER_EVENTS, SERVICES_DEFAULT, PARAMETERS, and SENSOR_DATA, and these values are not case-sensitive.
|
||||
# They respectively correspond to rmw_qos_profile_system_default, rmw_qos_profile_default, rmw_qos_profile_parameter_events, rmw_qos_profile_services_default, rmw_qos_profile_parameters, and SENSOR_DATA.
|
||||
color_qos: "default"
|
||||
color_camera_info_qos: "default"
|
||||
# Width of the color image. If 0, the default width will be used
|
||||
color_width: 0
|
||||
# Height of the color image. If 0, the default height will be used
|
||||
color_height: 0
|
||||
# Fps of the color image. If 0, the default FPS will be used
|
||||
color_fps: 0
|
||||
# default Format of the color image.
|
||||
color_format: "ANY"
|
||||
# If true, the color image will be flipped horizontally
|
||||
color_flip: false
|
||||
|
||||
# If true, the color image will be undistorted
|
||||
enable_color_undistortion: false
|
||||
# enable auto white balance for the color image
|
||||
enable_color_auto_white_balance: true
|
||||
# Manual set white balance value for the color image. If -1, note:enable_color_auto_white_balance: false
|
||||
color_white_balance: -1
|
||||
|
||||
# Auto exposure enable & configuration
|
||||
color_auto_ae:
|
||||
# enable auto exposure for the color image
|
||||
enable_color_auto_exposure: true
|
||||
# maximum exposure value for the color image. If -1, the default value will be used
|
||||
color_ae_max_exposure: -1
|
||||
# left edge of the auto exposure region of interest. If -1, the default value will be used
|
||||
color_ae_roi_left: -1
|
||||
# top edge of the auto exposure region of interest. If -1, the default value will be used
|
||||
color_ae_roi_top: -1
|
||||
# right edge of the auto exposure region of interest. If -1, the default value will be used
|
||||
color_ae_roi_right: -1
|
||||
# bottom edge of the auto exposure region of interest. If -1, the default value will be used
|
||||
color_ae_roi_bottom: -1
|
||||
|
||||
# Manual exposure must set enable_color_auto_exposure: false
|
||||
color_manual_ae:
|
||||
# exposure value for the color image. If -1, the default exposure will be used
|
||||
color_exposure: -1
|
||||
# gain value for the color image. If -1, the default gain will be used
|
||||
color_gain: -1
|
||||
# brightness value for the color image. If -1, the default brightness will be used
|
||||
color_brightness: -1
|
||||
|
||||
depth:
|
||||
# If true, the depth image will be enabled
|
||||
enable_depth: true
|
||||
# Quality of Service for the depth image topic and the depth camera info topic
|
||||
# [color|depth|ir]_qos, and [color|depth|ir]_camera_info_qos and [point_cloud_qos] are the Quality of Service (QoS) settings in ROS 2 messages.
|
||||
# The possible values include SYSTEM_DEFAULT, DEFAULT, PARAMETER_EVENTS, SERVICES_DEFAULT, PARAMETERS, and SENSOR_DATA, and these values are not case-sensitive.
|
||||
# They respectively correspond to rmw_qos_profile_system_default, rmw_qos_profile_default, rmw_qos_profile_parameter_events, rmw_qos_profile_services_default, rmw_qos_profile_parameters, and SENSOR_DATA.
|
||||
depth_qos: "default"
|
||||
depth_camera_info_qos: "default"
|
||||
# Width of the depth image. If 0, the default width will be used
|
||||
depth_width: 0
|
||||
# Height of the depth image. If 0, the default height will be used
|
||||
depth_height: 0
|
||||
# Fps of the depth image. If 0, the default FPS will be used
|
||||
depth_fps: 0
|
||||
# default Format of the depth image.
|
||||
depth_format: "ANY"
|
||||
# If true, the depth image will be flipped horizontally
|
||||
depth_flip: false
|
||||
# If false, the depth scale will not be enabled
|
||||
enable_depth_scale: true
|
||||
# Depth accuracy, the format should be 1mm. The default value is 1mm.
|
||||
depth_precision: ""
|
||||
|
||||
# D2C Depth registration mode.
|
||||
# Enables hardware that aligns depth frames to color frames. This field is required when setting enable_colored_point_cloud to true
|
||||
depth_registration: true
|
||||
# The alignment mode to be used. Options are "HW" for hardware alignment and "SW" for software alignment
|
||||
align_mode: "SW"
|
||||
|
||||
# Gemini 2, Gemini 2 L, and Gemini 2 XL cameras support deep working mode switching
|
||||
# Specific camera deep working mode support types can be found in the deep mode comments.
|
||||
# Deep working mode support is as follows:{"Unbinned Dense Default","Unbinned Sparse Default","Binned Sparse Default","Obstacle Avoidance"}
|
||||
# Depth work mode. #For details, Please refer to the comments in SDK/include/libobsensor/Advanced.h for a detailed explanation.
|
||||
depth_work_mode: ""
|
||||
|
||||
# Configure the loading path of the deep filtering configuration file. By default, the deep filtering configuration file is located in the /config/depthfilter directory and is only supported by Gemini2.
|
||||
depth_filter_config: ""
|
||||
|
||||
# Auto exposure region of interest left. If -1, the default value will be used
|
||||
depth_ae_roi:
|
||||
depth_ae_roi_left: -1
|
||||
# Auto exposure region of interest top. If -1, the default value will be used
|
||||
depth_ae_roi_top: -1
|
||||
# Auto exposure region of interest right. If -1, the default value will be used
|
||||
depth_ae_roi_right: -1
|
||||
# Auto exposure region of interest bottom. If -1, the default value will be used
|
||||
depth_ae_roi_bottom: -1
|
||||
|
||||
laser:
|
||||
# Whether to enable the laser. Default value is true
|
||||
enable_laser: true
|
||||
# Laser energy level. If -1, the default energy level will be used
|
||||
laser_energy_level: -1
|
||||
|
||||
filter:
|
||||
# This filtering effectively reduces the complexity of the depth scene. The filtering operates with kernel sizes ranging from [2x2] to [8x8] pixels.
|
||||
# The image size is proportionally reduced in both dimensions to maintain the aspect ratio.
|
||||
decimation_filter:
|
||||
# If true, the decimation filter will be enabled
|
||||
enable_decimation_filter: false
|
||||
# Decimation filter scale. If -1, the default scale will be used
|
||||
decimation_filter_scale: -1
|
||||
|
||||
# This filtering removes speckle noise in the form of clusters and produces a depth map with less filling.
|
||||
noise_removal_filter:
|
||||
# If true, the noise removal filter will be enabled
|
||||
enable_noise_removal_filter: true
|
||||
# Noise removal filter min diff.
|
||||
noise_removal_filter_min_diff: 256
|
||||
# Noise removal filter max size
|
||||
noise_removal_filter_max_size: 80
|
||||
|
||||
# This filter retains depth values of interest and ignores depth values that are out of range.
|
||||
threshold_filter:
|
||||
# If true, the threshold filter will be enabled
|
||||
enable_threshold_filter: false
|
||||
# Threshold filter max. If -1, the default max will be used
|
||||
threshold_filter_max: -1
|
||||
# Threshold filter min. If -1, the default min will be used
|
||||
threshold_filter_min: -1
|
||||
|
||||
# This filtering process, specified by multiple iterations according to the amplitude parameter, is used to enhance the smoothness of depth data.
|
||||
# It can also fill small holes in the depth map.
|
||||
spatial_filter:
|
||||
# -enable_spatial_filter
|
||||
enable_spatial_filter: false
|
||||
# Spatial filter alpha. If -1, the default alpha will be used
|
||||
spatial_filter_alpha: -1.0
|
||||
# Spatial filter diff threshold. If -1, the default threshold will be used
|
||||
spatial_filter_diff_threshold: -1
|
||||
# Spatial filter magnitude. If -1, the default magnitude will be used
|
||||
spatial_filter_magnitude: -1
|
||||
# Spatial filter radius. If -1, the default radius will be used
|
||||
spatial_filter_radius: -1
|
||||
|
||||
# This filtering aims to improve the persistence of depth data by manipulating per-pixel values based on previous frames. The filtering performs a single processing on the data,
|
||||
# adjusting depth values while updating tracking history.
|
||||
temporal_filter:
|
||||
# -enable_temporal_filter
|
||||
enable_temporal_filter: false
|
||||
# Temporal filter diff threshold. If -1, the default threshold will be used
|
||||
temporal_filter_diff_threshold: -1.0
|
||||
# Temporal filter weight. If -1, the default weight will be used
|
||||
temporal_filter_weight: -1.0
|
||||
|
||||
# This filter fills all holes in the depth map using the specified mode.
|
||||
hole_filling_filter:
|
||||
# -enable_hole_filling_filter
|
||||
enable_hole_filling_filter: false
|
||||
# Hole filling filter mode. If empty, the default mode will be used
|
||||
hole_filling_filter_mode: ""
|
||||
|
||||
soft_filter:
|
||||
# If false, the soft filter will not be enabled
|
||||
enable_soft_filter: true
|
||||
# The maximum difference between the current and previous depth frame to be considered valid
|
||||
soft_filter_max_diff: -1
|
||||
# The size of the speckle to be filtered out
|
||||
soft_filter_speckle_size: -1
|
||||
|
||||
# This filtering is used in conjunction with the deep HDR function and only outputs sequences with the specified sequence ID.
|
||||
sequence_filter:
|
||||
# If true, the sequence ID filter will be enabled
|
||||
enable_sequence_id_filter: false
|
||||
# Sequence ID filter ID. If -1, the default ID will be used
|
||||
sequence_id_filter_id: -1
|
||||
|
||||
# This filtering is used in conjunction with the deep HDR function. By merging consecutive depth images with alternating exposure values,
|
||||
# we can simultaneously overcome the challenges of obtaining depth values for low-light and over-illuminated objects.
|
||||
hdr_filter:
|
||||
# If true, the HDR merge filter will be enabled
|
||||
enable_hdr_merge: false
|
||||
# HDR merge exposure1, If -1, the default value will be used
|
||||
hdr_merge_exposure_1: -1
|
||||
# HDR merge gain1, If -1, the default value will be used
|
||||
hdr_merge_gain_1: -1
|
||||
# HDR merge exposure2, If -1, the default value will be used
|
||||
hdr_merge_exposure_2: -1
|
||||
# HDR merge gain2, If -1, the default value will be used
|
||||
hdr_merge_gain_2: -1
|
||||
|
||||
leftir:
|
||||
# If false, the left IR image will not be enabled
|
||||
enable_left_ir: false
|
||||
# Quality of Service for the left IR image topic and the left IR camera info topic
|
||||
# [color|depth|ir]_qos, and [color|depth|ir]_camera_info_qos and [point_cloud_qos] are the Quality of Service (QoS) settings in ROS 2 messages.
|
||||
# The possible values include SYSTEM_DEFAULT, DEFAULT, PARAMETER_EVENTS, SERVICES_DEFAULT, PARAMETERS, and SENSOR_DATA, and these values are not case-sensitive.
|
||||
# They respectively correspond to rmw_qos_profile_system_default, rmw_qos_profile_default, rmw_qos_profile_parameter_events, rmw_qos_profile_services_default, rmw_qos_profile_parameters, and SENSOR_DATA.
|
||||
left_ir_qos: "default"
|
||||
left_ir_camera_info_qos: "default"
|
||||
# Width of the left IR image. If 0, the default width will be used
|
||||
left_ir_width: 0
|
||||
# Height of the left IR image. If 0, the default height will be used
|
||||
left_ir_height: 0
|
||||
# Fps of the left IR image. If 0, the default FPS will be used
|
||||
left_ir_fps: 0
|
||||
# Format of the left IR image. Supported formats are 'Y8'
|
||||
left_ir_format: "ANY"
|
||||
|
||||
rightir:
|
||||
# If false, the right IR image will not be enabled
|
||||
enable_right_ir: false
|
||||
# Quality of Service for the right IR image topic and the right IR camera info topic
|
||||
# [color|depth|ir]_qos, and [color|depth|ir]_camera_info_qos and [point_cloud_qos] are the Quality of Service (QoS) settings in ROS 2 messages.
|
||||
# The possible values include SYSTEM_DEFAULT, DEFAULT, PARAMETER_EVENTS, SERVICES_DEFAULT, PARAMETERS, and SENSOR_DATA, and these values are not case-sensitive.
|
||||
# They respectively correspond to rmw_qos_profile_system_default, rmw_qos_profile_default, rmw_qos_profile_parameter_events, rmw_qos_profile_services_default, rmw_qos_profile_parameters, and SENSOR_DATA.
|
||||
right_ir_qos: "default"
|
||||
right_ir_camera_info_qos: "default"
|
||||
# Width of the right IR image. If 0, the default width will be used
|
||||
right_ir_width: 0
|
||||
# Height of the right IR image. If 0, the default height will be used
|
||||
right_ir_height: 0
|
||||
# Fps of the right IR image. If 0, the default FPS will be used
|
||||
right_ir_fps: 0
|
||||
# Format of the right IR image. Supported formats are 'Y8'
|
||||
right_ir_format: "ANY"
|
||||
|
||||
ir:
|
||||
# If false, the left IR image will not be enabled
|
||||
enable_ir: false
|
||||
# Quality of Service for the IR image topic and the IR camera info topic
|
||||
# [color|depth|ir]_qos, and [color|depth|ir]_camera_info_qos and [point_cloud_qos] are the Quality of Service (QoS) settings in ROS 2 messages.
|
||||
# The possible values include SYSTEM_DEFAULT, DEFAULT, PARAMETER_EVENTS, SERVICES_DEFAULT, PARAMETERS, and SENSOR_DATA, and these values are not case-sensitive.
|
||||
# They respectively correspond to rmw_qos_profile_system_default, rmw_qos_profile_default, rmw_qos_profile_parameter_events, rmw_qos_profile_services_default, rmw_qos_profile_parameters, and SENSOR_DATA.
|
||||
ir_qos: "default"
|
||||
ir_camera_info_qos: "default"
|
||||
# Width of the IR image. If 0, the default width will be used
|
||||
ir_width: 0
|
||||
# Height of the IR image. If 0, the default height will be used
|
||||
ir_height: 0
|
||||
# Fps of the IR image. If 0, the default FPS will be used
|
||||
ir_fps: 0
|
||||
# Format of the IR image. Supported formats are 'Y8'
|
||||
ir_format: "Y8"
|
||||
|
||||
ir_parameters:
|
||||
# If false, the IR image auto exposure will not be enabled
|
||||
enable_ir_auto_exposure: true
|
||||
# Maximum exposure time of the IR image
|
||||
ir_ae_max_exposure: -1
|
||||
# Exposure time of the IR image. If -1, auto exposure will be used
|
||||
ir_exposure: -1
|
||||
# Gain of the IR image. If -1, auto gain will be used
|
||||
ir_gain: -1
|
||||
# ir_brightness, if -1, auto brightness will be used
|
||||
ir_brightness: -1
|
||||
# If true, the left IR image will be flipped horizontally
|
||||
ir_flip: false
|
||||
|
||||
imu:
|
||||
# If true, the IMU accelerometer data will be enabled
|
||||
enable_accel: false
|
||||
# The frequency of the accelerometer can be selected as 1.5625Hz, 3.125Hz, 6.25Hz, 12.5Hz, 25Hz, 50Hz, 100Hz, 200Hz, 500Hz, 1kHz, 2kHz, 4kHz, 8kHz, 16kHz, 32kHz.
|
||||
# The specific value depends on the current camera.
|
||||
accel_rate: "200hz"
|
||||
# The range of the accelerometer, the optional values are 2g, 4g, 8g, 16g. The specific value depends on the current camera.
|
||||
accel_range: "4g"
|
||||
# If true, the IMU gyroscope data will be enabled
|
||||
enable_gyro: false
|
||||
# The frequency of the gyroscope can be selected as 1.5625hz, 3.125hz, 6.25hz, 12.5hz, 25hz, 50hz, 100hz, 200hz, 500hz, 1kHz, 2kHz, 4kHz, 8kHz, 16kHz, 32kHz.
|
||||
# The specific value depends on the current camera.
|
||||
gyro_rate: "200hz"
|
||||
# The range of the gyroscope, the optional values are 16dps, 31dps, 62dps, 125dps, 250dps, 500dps, 1000dps, 2000dps. The specific value depends on the current camera.
|
||||
gyro_range: "1000dps"
|
||||
# enable_sync_output_accel_gyro
|
||||
enable_sync_output_accel_gyro: false
|
||||
# Covariance of the linear acceleration
|
||||
linear_accel_cov: 0.01
|
||||
# Covariance of the angular velocity
|
||||
angular_vel_cov: 0.01
|
||||
|
||||
point_cloud:
|
||||
# enable point cloud. {fase:disable, true:enable}
|
||||
enable_point_cloud: true
|
||||
# enable RGBD point cloud. {fase:disable, true:enable}
|
||||
enable_colored_point_cloud: false
|
||||
# Quality of Service for the point cloud topic
|
||||
point_cloud_qos: "default"
|
||||
# Support modifying the frame_id name within the ros message, with the depth name used by default.
|
||||
cloud_frame_id: ""
|
||||
# If true, enable filtering of invalid point clouds, i.e., filtering point cloud data with Z=0
|
||||
ordered_pc: false
|
||||
|
||||
tf:
|
||||
# If true, the TF will be enabled
|
||||
publish_tf: true
|
||||
# Rate of the TF publication
|
||||
tf_publish_rate: 0.0
|
||||
|
||||
advanced:
|
||||
# If true, the extrinsics publish will be enabled
|
||||
enable_publish_extrinsic: false
|
||||
# If true, the frame synchronization will be enabled
|
||||
enable_frame_sync: true
|
||||
# Publish D2C superimposed image (only for testing).
|
||||
enable_d2c_viewer: false
|
||||
# false: switch to software disparity convert to depth, true: switch to hardware disparity convert to depth
|
||||
disparity_to_depth_mode: 'HW'
|
||||
# If false, the host time will not be synchronized with the device time
|
||||
enable_sync_host_time: true
|
||||
# URL of the IR image info
|
||||
ir_info_url: ""
|
||||
# URL of the color image info
|
||||
color_info_url: ""
|
||||
# Diagnostic period in seconds
|
||||
diagnostic_period: 1.0
|
||||
|
||||
device_sync:
|
||||
# Device synchronization mode. supports: {1.free_run 2.standalone 3.primary 4.secondary 5.secondary_synced 6.software_triggering 7.hardware_triggering}.
|
||||
# For details, Please refer to the OBMultiDeviceSyncMode-related comments in SDK/include/libobsensor/ObTypes.h for a detailed explanation of each mode.
|
||||
sync_mode: "standalone"
|
||||
# The delay time of the depth image capture after receiving the capture command or trigger signal in microseconds.
|
||||
# For details, Please refer to the OBMultiDeviceSyncConfig-related comments in SDK/include/libobsensor/ObTypes.h
|
||||
depth_delay_us: 0
|
||||
# The delay time of the color image capture after receiving the capture command or trigger signal in microseconds.
|
||||
color_delay_us: 0
|
||||
# The delay time of the image capture after receiving the capture command or trigger signal in microseconds.
|
||||
trigger2image_delay_us: 0
|
||||
# Trigger signal output enable flag.
|
||||
trigger_out_enabled: true
|
||||
# The delay time of the trigger signal output after receiving the capture command or trigger signal in microseconds.
|
||||
trigger_out_delay_us: 0
|
||||
# The frame number of each stream after each trigger in triggering mode.
|
||||
frames_per_trigger: 2
|
||||
# software trigger period in ms
|
||||
software_trigger_period: 33
|
||||
|
||||
gmsldevice_trigger:
|
||||
enable_gmsl_trigger: false
|
||||
gmsl_trigger_fps: 3000
|
||||
|
||||
# config for interleave mode。
|
||||
# interleave_ae_mode is currently supported by the gemini330 series,
|
||||
# and specific products can be checked for support of interleave_ae_mode by referring to the product manual.
|
||||
interleave_ae_mode:
|
||||
# 'hdr' or 'laser'
|
||||
interleave_ae_mode: "laser"
|
||||
#enable interleave frame
|
||||
interleave_frame_enable: false
|
||||
|
||||
interleave_skip:
|
||||
#enable interleave skip
|
||||
interleave_skip_enable: false
|
||||
# 0:skip pattern ir 1: skip flood ir
|
||||
interleave_skip_index: 1
|
||||
|
||||
interleave_hdr_param:
|
||||
hdr_index1_laser_control: 1
|
||||
hdr_index1_depth_exposure: 1
|
||||
hdr_index1_depth_gain: 16
|
||||
hdr_index1_ir_brightness: 30
|
||||
hdr_index1_ir_ae_max_exposure: 30458
|
||||
hdr_index0_laser_control: 1
|
||||
hdr_index0_depth_exposure: 7500
|
||||
hdr_index0_depth_gain: 16
|
||||
hdr_index0_ir_brightness: 90
|
||||
hdr_index0_ir_ae_max_exposure: 30458
|
||||
|
||||
interleave_laser_param:
|
||||
laser_index1_laser_control: 0
|
||||
laser_index1_depth_exposure: 3000
|
||||
laser_index1_depth_gain: 16
|
||||
laser_index1_ir_brightness: 60
|
||||
laser_index1_ir_ae_max_exposure: 17000
|
||||
laser_index0_laser_control: 1
|
||||
laser_index0_depth_exposure: 3000
|
||||
laser_index0_depth_gain: 16
|
||||
laser_index0_ir_brightness: 60
|
||||
laser_index0_ir_ae_max_exposure: 30000
|
||||
@@ -1,85 +0,0 @@
|
||||
# config/*.yaml files are used to configure the camera parameters
|
||||
---
|
||||
orbbec_ros:
|
||||
camera_parameters:
|
||||
general:
|
||||
# Camera model. upport product models by referencing config/*.yaml
|
||||
camera_model: "femto"
|
||||
# Path to the configuration file. If empty, default parameters will be used
|
||||
config_file_path: "femto.yaml"
|
||||
|
||||
deivce:
|
||||
camera_name: "camera"
|
||||
serial_number: ""
|
||||
usb_port: ""
|
||||
device_num: 1
|
||||
uvc_backend: "libuvc"
|
||||
product_id: ""
|
||||
connection_delay: 100
|
||||
time_domain: "global"
|
||||
enable_heartbeat: false
|
||||
enable_ldp: true
|
||||
|
||||
color:
|
||||
enable_color: true
|
||||
color_qos: "default"
|
||||
color_camera_info_qos: "default"
|
||||
color_width: 640
|
||||
color_height: 480
|
||||
color_fps: 30
|
||||
color_format: "MJPG"
|
||||
enable_color_auto_white_balance: true
|
||||
color_white_balance: -1
|
||||
color_auto_ae:
|
||||
enable_color_auto_exposure: true
|
||||
color_ae_max_exposure: -1
|
||||
color_manual_ae:
|
||||
color_exposure: -1
|
||||
color_gain: -1
|
||||
color_brightness: -1
|
||||
|
||||
depth:
|
||||
enable_depth: true
|
||||
depth_qos: "default"
|
||||
depth_camera_info_qos: "default"
|
||||
depth_width: 640
|
||||
depth_height: 576
|
||||
depth_fps: 30
|
||||
depth_format: "Y16"
|
||||
depth_registration: false
|
||||
align_mode: "HW"
|
||||
ir:
|
||||
enable_ir: true
|
||||
ir_qos: "default"
|
||||
ir_camera_info_qos: "default"
|
||||
ir_width: 640
|
||||
ir_height: 576
|
||||
ir_fps: 30
|
||||
ir_format: "Y16"
|
||||
|
||||
ir_parameters:
|
||||
enable_ir_auto_exposure: true
|
||||
ir_ae_max_exposure: -1
|
||||
ir_exposure: -1
|
||||
ir_gain: -1
|
||||
ir_brightness: -1
|
||||
|
||||
imu:
|
||||
enable_accel: false
|
||||
accel_rate: "100hz"
|
||||
accel_range: "4g"
|
||||
enable_gyro: false
|
||||
gyro_rate: "100hz"
|
||||
gyro_range: "1000dps"
|
||||
enable_sync_output_accel_gyro: true
|
||||
linear_accel_cov: 0.01
|
||||
angular_vel_cov: 0.01
|
||||
|
||||
point_cloud:
|
||||
enable_point_cloud: true
|
||||
enable_colored_point_cloud: false
|
||||
|
||||
advanced:
|
||||
enable_frame_sync: true
|
||||
enable_d2c_viewer: false
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
# config/*.yaml files are used to configure the camera parameters
|
||||
---
|
||||
orbbec_ros:
|
||||
camera_parameters:
|
||||
general:
|
||||
# Camera model. upport product models by referencing config/*.yaml
|
||||
camera_model: "femto_bolt"
|
||||
# Path to the configuration file. If empty, default parameters will be used
|
||||
config_file_path: "femto_bolt.yaml"
|
||||
|
||||
deivce:
|
||||
camera_name: "camera"
|
||||
serial_number: ""
|
||||
usb_port: ""
|
||||
device_num: 1
|
||||
uvc_backend: "libuvc"
|
||||
product_id: ""
|
||||
connection_delay: 100
|
||||
time_domain: "global"
|
||||
enable_heartbeat: false
|
||||
enable_ldp: true
|
||||
|
||||
color:
|
||||
enable_color: true
|
||||
color_qos: "default"
|
||||
color_camera_info_qos: "default"
|
||||
color_width: 1280
|
||||
color_height: 720
|
||||
color_fps: 30
|
||||
color_format: "MJPG"
|
||||
enable_color_auto_white_balance: true
|
||||
color_white_balance: -1
|
||||
color_auto_ae:
|
||||
enable_color_auto_exposure: true
|
||||
color_ae_max_exposure: -1
|
||||
color_manual_ae:
|
||||
color_exposure: -1
|
||||
color_gain: -1
|
||||
color_brightness: -1
|
||||
|
||||
depth:
|
||||
enable_depth: true
|
||||
depth_qos: "default"
|
||||
depth_camera_info_qos: "default"
|
||||
depth_width: 640
|
||||
depth_height: 576
|
||||
depth_fps: 30
|
||||
depth_format: "Y16"
|
||||
depth_registration: false
|
||||
align_mode: "SW"
|
||||
ir:
|
||||
enable_ir: true
|
||||
ir_qos: "default"
|
||||
ir_camera_info_qos: "default"
|
||||
ir_width: 640
|
||||
ir_height: 576
|
||||
ir_fps: 30
|
||||
ir_format: "Y16"
|
||||
|
||||
ir_parameters:
|
||||
enable_ir_auto_exposure: true
|
||||
ir_ae_max_exposure: -1
|
||||
ir_exposure: -1
|
||||
ir_gain: -1
|
||||
ir_brightness: -1
|
||||
|
||||
imu:
|
||||
enable_accel: false
|
||||
accel_rate: "200hz"
|
||||
accel_range: "4g"
|
||||
enable_gyro: false
|
||||
gyro_rate: "200hz"
|
||||
gyro_range: "1000dps"
|
||||
enable_sync_output_accel_gyro: true
|
||||
linear_accel_cov: 0.01
|
||||
angular_vel_cov: 0.01
|
||||
|
||||
point_cloud:
|
||||
enable_point_cloud: false
|
||||
enable_colored_point_cloud: false
|
||||
|
||||
advanced:
|
||||
enable_frame_sync: true
|
||||
enable_d2c_viewer: false
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
# config/*.yaml files are used to configure the camera parameters
|
||||
---
|
||||
orbbec_ros:
|
||||
camera_parameters:
|
||||
general:
|
||||
# Camera model. upport product models by referencing config/*.yaml
|
||||
camera_model: "femto_mega"
|
||||
# Path to the configuration file. If empty, default parameters will be used
|
||||
config_file_path: "femto_mega.yaml"
|
||||
|
||||
deivce:
|
||||
camera_name: "camera"
|
||||
serial_number: ""
|
||||
usb_port: ""
|
||||
device_num: 1
|
||||
uvc_backend: "libuvc"
|
||||
product_id: ""
|
||||
connection_delay: 100
|
||||
time_domain: "global"
|
||||
enable_heartbeat: false
|
||||
enable_ldp: true
|
||||
|
||||
color:
|
||||
enable_color: true
|
||||
color_qos: "default"
|
||||
color_camera_info_qos: "default"
|
||||
color_width: 1280
|
||||
color_height: 720
|
||||
color_fps: 30
|
||||
color_format: "MJPG"
|
||||
enable_color_auto_white_balance: true
|
||||
color_white_balance: -1
|
||||
color_auto_ae:
|
||||
enable_color_auto_exposure: true
|
||||
color_ae_max_exposure: -1
|
||||
color_manual_ae:
|
||||
color_exposure: -1
|
||||
color_gain: -1
|
||||
color_brightness: -1
|
||||
|
||||
depth:
|
||||
enable_depth: true
|
||||
depth_qos: "default"
|
||||
depth_camera_info_qos: "default"
|
||||
depth_width: 640
|
||||
depth_height: 576
|
||||
depth_fps: 30
|
||||
depth_format: "Y16"
|
||||
depth_registration: false
|
||||
align_mode: "HW"
|
||||
ir:
|
||||
enable_ir: true
|
||||
ir_qos: "default"
|
||||
ir_camera_info_qos: "default"
|
||||
ir_width: 640
|
||||
ir_height: 576
|
||||
ir_fps: 30
|
||||
ir_format: "Y16"
|
||||
|
||||
ir_parameters:
|
||||
enable_ir_auto_exposure: true
|
||||
ir_ae_max_exposure: -1
|
||||
ir_exposure: -1
|
||||
ir_gain: -1
|
||||
ir_brightness: -1
|
||||
|
||||
imu:
|
||||
enable_accel: false
|
||||
accel_rate: "100hz"
|
||||
accel_range: "4g"
|
||||
enable_gyro: false
|
||||
gyro_rate: "100hz"
|
||||
gyro_range: "1000dps"
|
||||
enable_sync_output_accel_gyro: true
|
||||
linear_accel_cov: 0.01
|
||||
angular_vel_cov: 0.01
|
||||
|
||||
point_cloud:
|
||||
enable_point_cloud: true
|
||||
enable_colored_point_cloud: false
|
||||
|
||||
advanced:
|
||||
enable_frame_sync: true
|
||||
enable_d2c_viewer: false
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
# config/*.yaml files are used to configure the camera parameters
|
||||
---
|
||||
orbbec_ros:
|
||||
camera_parameters:
|
||||
general:
|
||||
# Camera model. upport product models by referencing config/*.yaml
|
||||
camera_model: "gemini2"
|
||||
# Path to the configuration file. If empty, default parameters will be used
|
||||
config_file_path: "gemini2.yaml"
|
||||
|
||||
deivce:
|
||||
camera_name: "camera"
|
||||
serial_number: ""
|
||||
usb_port: ""
|
||||
device_num: 1
|
||||
uvc_backend: "libuvc"
|
||||
product_id: ""
|
||||
connection_delay: 100
|
||||
time_domain: "global"
|
||||
retry_on_usb3_detection_failure: false
|
||||
enable_heartbeat: false
|
||||
enable_ldp: true
|
||||
|
||||
color:
|
||||
enable_color: true
|
||||
color_qos: "default"
|
||||
color_camera_info_qos: "default"
|
||||
color_width: 640
|
||||
color_height: 360
|
||||
color_fps: 15
|
||||
color_format: "MJPG"
|
||||
enable_color_auto_white_balance: true
|
||||
color_white_balance: -1
|
||||
color_auto_ae:
|
||||
enable_color_auto_exposure: true
|
||||
color_ae_max_exposure: -1
|
||||
color_manual_ae:
|
||||
color_exposure: -1
|
||||
color_gain: -1
|
||||
color_brightness: -1
|
||||
|
||||
depth:
|
||||
enable_depth: true
|
||||
depth_qos: "default"
|
||||
depth_camera_info_qos: "default"
|
||||
depth_width: 640
|
||||
depth_height: 400
|
||||
depth_fps: 15
|
||||
depth_format: "Y14"
|
||||
depth_registration: true
|
||||
align_mode: "HW"
|
||||
ir:
|
||||
enable_ir: true
|
||||
ir_qos: "default"
|
||||
ir_camera_info_qos: "default"
|
||||
ir_width: 640
|
||||
ir_height: 400
|
||||
ir_fps: 15
|
||||
ir_format: "Y8"
|
||||
|
||||
ir_parameters:
|
||||
enable_ir_auto_exposure: true
|
||||
ir_ae_max_exposure: -1
|
||||
ir_exposure: -1
|
||||
ir_gain: -1
|
||||
ir_brightness: -1
|
||||
|
||||
imu:
|
||||
enable_accel: false
|
||||
accel_rate: "100hz"
|
||||
accel_range: "4g"
|
||||
enable_gyro: false
|
||||
gyro_rate: "100hz"
|
||||
gyro_range: "1000dps"
|
||||
enable_sync_output_accel_gyro: true
|
||||
linear_accel_cov: 0.01
|
||||
angular_vel_cov: 0.01
|
||||
|
||||
point_cloud:
|
||||
enable_point_cloud: true
|
||||
enable_colored_point_cloud: false
|
||||
|
||||
advanced:
|
||||
enable_frame_sync: true
|
||||
enable_d2c_viewer: false
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
# config/*.yaml files are used to configure the camera parameters
|
||||
---
|
||||
orbbec_ros:
|
||||
camera_parameters:
|
||||
general:
|
||||
# Camera model. upport product models by referencing config/*.yaml
|
||||
camera_model: "gemini2L"
|
||||
# Path to the configuration file. If empty, default parameters will be used
|
||||
config_file_path: "gemini2L.yaml"
|
||||
|
||||
deivce:
|
||||
camera_name: "camera"
|
||||
serial_number: ""
|
||||
usb_port: ""
|
||||
device_num: 1
|
||||
uvc_backend: "libuvc"
|
||||
product_id: ""
|
||||
connection_delay: 100
|
||||
time_domain: "global"
|
||||
retry_on_usb3_detection_failure: false
|
||||
enable_heartbeat: false
|
||||
enable_ldp: true
|
||||
|
||||
color:
|
||||
enable_color: true
|
||||
color_qos: "default"
|
||||
color_camera_info_qos: "default"
|
||||
color_width: 1280
|
||||
color_height: 800
|
||||
color_fps: 30
|
||||
color_format: "MJPG"
|
||||
enable_color_auto_white_balance: true
|
||||
color_white_balance: -1
|
||||
color_auto_ae:
|
||||
enable_color_auto_exposure: true
|
||||
color_ae_max_exposure: -1
|
||||
color_manual_ae:
|
||||
color_exposure: -1
|
||||
color_gain: -1
|
||||
color_brightness: -1
|
||||
|
||||
depth:
|
||||
enable_depth: true
|
||||
depth_qos: "default"
|
||||
depth_camera_info_qos: "default"
|
||||
depth_width: 1280
|
||||
depth_height: 800
|
||||
depth_fps: 30
|
||||
depth_format: "Y16"
|
||||
depth_registration: false
|
||||
align_mode: "HW"
|
||||
ir:
|
||||
enable_ir: true
|
||||
ir_qos: "default"
|
||||
ir_camera_info_qos: "default"
|
||||
ir_width: 640
|
||||
ir_height: 400
|
||||
ir_fps: 15
|
||||
ir_format: "Y8"
|
||||
|
||||
ir_parameters:
|
||||
enable_ir_auto_exposure: true
|
||||
ir_ae_max_exposure: -1
|
||||
ir_exposure: -1
|
||||
ir_gain: -1
|
||||
ir_brightness: -1
|
||||
|
||||
imu:
|
||||
enable_accel: false
|
||||
accel_rate: "100hz"
|
||||
accel_range: "4g"
|
||||
enable_gyro: false
|
||||
gyro_rate: "100hz"
|
||||
gyro_range: "1000dps"
|
||||
enable_sync_output_accel_gyro: false
|
||||
linear_accel_cov: 0.01
|
||||
angular_vel_cov: 0.01
|
||||
|
||||
point_cloud:
|
||||
enable_point_cloud: true
|
||||
enable_colored_point_cloud: false
|
||||
|
||||
advanced:
|
||||
enable_frame_sync: true
|
||||
enable_d2c_viewer: false
|
||||
|
||||
@@ -1,67 +1,7 @@
|
||||
# device
|
||||
device_type: camera
|
||||
camera_name: camera
|
||||
serial_number: ""
|
||||
usb_port: ""
|
||||
device_num: 1
|
||||
upgrade_firmware: ""
|
||||
preset_firmware_path: ""
|
||||
load_config_json_file_path: ""
|
||||
export_config_json_file_path: ""
|
||||
uvc_backend: libuvc
|
||||
connection_delay: 10
|
||||
publish_tf: true
|
||||
tf_publish_rate: 0.0
|
||||
ir_info_url: ""
|
||||
color_info_url: ""
|
||||
|
||||
# device_misc
|
||||
device_access_mode: Default
|
||||
exposure_range_mode: default
|
||||
log_level: none
|
||||
log_file_name: ""
|
||||
enable_publish_extrinsic: false
|
||||
enable_d2c_viewer: false
|
||||
disparity_to_depth_mode: ""
|
||||
align_mode: SW
|
||||
align_target_stream: COLOR
|
||||
diagnostic_period: 1.0
|
||||
# Gemini 305 dual-color preset. Other parameters inherit gemini_301_series.launch.py.
|
||||
device_preset: Dual Color Streams
|
||||
retry_on_usb3_detection_failure: false
|
||||
enable_sync_host_time: true
|
||||
time_sync_period: 6.0
|
||||
time_domain: global
|
||||
config_file_path: ""
|
||||
enable_heartbeat: false
|
||||
gmsl_trigger_fps: 3000
|
||||
enable_gmsl_trigger: false
|
||||
disparity_range_mode: -1
|
||||
disparity_search_offset: -1
|
||||
disparity_offset_config: false
|
||||
offset_index0: -1
|
||||
offset_index1: -1
|
||||
frame_aggregate_mode: ANY
|
||||
interleave_ae_mode: hdr
|
||||
interleave_frame_enable: false
|
||||
interleave_skip_enable: false
|
||||
interleave_skip_index: 1
|
||||
show_fps_enable: false
|
||||
|
||||
# color
|
||||
enable_color: false
|
||||
color_width: 0
|
||||
color_height: 0
|
||||
color_fps: 0
|
||||
color_format: ANY
|
||||
color_qos: default
|
||||
color_camera_info_qos: default
|
||||
color_rotation: -1
|
||||
color_flip: false
|
||||
color_mirror: false
|
||||
enable_color_decimation_filter: false
|
||||
color_decimation_filter_scale: -1
|
||||
|
||||
# left_color
|
||||
# left color
|
||||
enable_left_color: true
|
||||
left_color_width: 0
|
||||
left_color_height: 0
|
||||
@@ -74,8 +14,10 @@ left_color_flip: false
|
||||
left_color_mirror: false
|
||||
enable_left_color_decimation_filter: false
|
||||
left_color_decimation_filter_scale: -1
|
||||
enable_left_color_undistortion: false
|
||||
left_color.image_raw.enable_pub_plugins: ["image_transport/compressed", "image_transport/raw", "image_transport/theora"]
|
||||
|
||||
# right_color
|
||||
# right color
|
||||
enable_right_color: true
|
||||
right_color_width: 0
|
||||
right_color_height: 0
|
||||
@@ -88,184 +30,5 @@ right_color_flip: false
|
||||
right_color_mirror: false
|
||||
enable_right_color_decimation_filter: false
|
||||
right_color_decimation_filter_scale: -1
|
||||
|
||||
# color_common
|
||||
enable_color_auto_exposure_priority: false
|
||||
enable_color_auto_white_balance: true
|
||||
enable_color_auto_exposure: true
|
||||
color_ae_roi_left: -1
|
||||
color_ae_roi_right: -1
|
||||
color_ae_roi_top: -1
|
||||
color_ae_roi_bottom: -1
|
||||
color_exposure: -1
|
||||
color_gain: -1
|
||||
color_white_balance: -1
|
||||
color_ae_max_exposure: -1
|
||||
color_brightness: -1
|
||||
color_sharpness: -1
|
||||
color_gamma: -1
|
||||
color_saturation: -1
|
||||
color_contrast: -1
|
||||
color_hue: -1
|
||||
color_backlight_compensation: -1
|
||||
color_powerline_freq: ""
|
||||
color_denoising_level: -1
|
||||
enable_color_undistortion: false
|
||||
|
||||
# hdr_params
|
||||
hdr_index1_depth_exposure: 1
|
||||
hdr_index1_depth_gain: 16
|
||||
hdr_index1_ir_brightness: 30
|
||||
hdr_index1_ir_ae_max_exposure: 30458
|
||||
hdr_index0_depth_exposure: 7500
|
||||
hdr_index0_depth_gain: 16
|
||||
hdr_index0_ir_brightness: 90
|
||||
hdr_index0_ir_ae_max_exposure: 30458
|
||||
|
||||
# publishers and transports
|
||||
left_color.image_raw.enable_pub_plugins: ["image_transport/compressed", "image_transport/raw", "image_transport/theora"]
|
||||
enable_right_color_undistortion: false
|
||||
right_color.image_raw.enable_pub_plugins: ["image_transport/compressed", "image_transport/raw", "image_transport/theora"]
|
||||
|
||||
# In dual color mode, it is not recommended to change the following parameters
|
||||
# depth
|
||||
enable_depth: false
|
||||
depth_width: 0
|
||||
depth_height: 0
|
||||
depth_fps: 0
|
||||
depth_format: ANY
|
||||
depth_qos: default
|
||||
depth_camera_info_qos: default
|
||||
enable_depth_auto_exposure_priority: false
|
||||
depth_precision: ""
|
||||
depth_rotation: -1
|
||||
depth_flip: false
|
||||
depth_mirror: false
|
||||
depth_ae_roi_left: -1
|
||||
depth_ae_roi_right: -1
|
||||
depth_ae_roi_top: -1
|
||||
depth_ae_roi_bottom: -1
|
||||
mean_intensity_set_point: -1
|
||||
enable_depth_scale: false
|
||||
enable_decimation_filter: false
|
||||
decimation_filter_scale: -1
|
||||
enable_hdr_merge: false
|
||||
hdr_merge_exposure_1: -1
|
||||
hdr_merge_gain_1: -1
|
||||
hdr_merge_exposure_2: -1
|
||||
hdr_merge_gain_2: -1
|
||||
enable_sequence_id_filter: false
|
||||
sequence_id_filter_id: -1
|
||||
enable_threshold_filter: false
|
||||
threshold_filter_max: -1
|
||||
threshold_filter_min: -1
|
||||
enable_hardware_noise_removal_filter: false
|
||||
hardware_noise_removal_filter_threshold: -1.0
|
||||
enable_noise_removal_filter: false
|
||||
noise_removal_filter_min_diff: 256
|
||||
noise_removal_filter_max_size: 80
|
||||
enable_spatial_filter: false
|
||||
spatial_filter_alpha: -1.0
|
||||
spatial_filter_diff_threshold: -1
|
||||
spatial_filter_magnitude: -1
|
||||
spatial_filter_radius: -1
|
||||
enable_temporal_filter: false
|
||||
temporal_filter_diff_threshold: -1.0
|
||||
temporal_filter_weight: -1.0
|
||||
enable_disparity_to_depth: false
|
||||
hole_filling_filter_mode: ""
|
||||
enable_hole_filling_filter: false
|
||||
enable_spatial_fast_filter: false
|
||||
spatial_fast_filter_radius: -1
|
||||
enable_spatial_moderate_filter: false
|
||||
spatial_moderate_filter_diff_threshold: -1
|
||||
spatial_moderate_filter_magnitude: -1
|
||||
spatial_moderate_filter_radius: -1
|
||||
|
||||
# point_cloud
|
||||
depth_registration: false
|
||||
point_cloud_qos: default
|
||||
enable_point_cloud: false
|
||||
point_cloud_decimation_filter_factor: 1
|
||||
enable_colored_point_cloud: false
|
||||
cloud_frame_id: ""
|
||||
ordered_pc: false
|
||||
|
||||
# ldp
|
||||
enable_ldp: true
|
||||
ldp_power_level: -1
|
||||
|
||||
# left_ir
|
||||
enable_left_ir: false
|
||||
left_ir_width: 0
|
||||
left_ir_height: 0
|
||||
left_ir_fps: 0
|
||||
left_ir_format: ANY
|
||||
left_ir_qos: default
|
||||
left_ir_camera_info_qos: default
|
||||
left_ir_rotation: -1
|
||||
left_ir_flip: false
|
||||
left_ir_mirror: false
|
||||
enable_left_ir_sequence_id_filter: false
|
||||
left_ir_sequence_id_filter_id: -1
|
||||
|
||||
# right_ir
|
||||
enable_right_ir: false
|
||||
right_ir_width: 0
|
||||
right_ir_height: 0
|
||||
right_ir_fps: 0
|
||||
right_ir_format: ANY
|
||||
right_ir_qos: default
|
||||
right_ir_camera_info_qos: default
|
||||
right_ir_rotation: -1
|
||||
right_ir_flip: false
|
||||
right_ir_mirror: false
|
||||
enable_right_ir_sequence_id_filter: false
|
||||
right_ir_sequence_id_filter_id: -1
|
||||
|
||||
# ir_common
|
||||
enable_ir_auto_exposure: false
|
||||
ir_exposure: -1
|
||||
ir_gain: -1
|
||||
ir_ae_max_exposure: -1
|
||||
ir_brightness: -1
|
||||
|
||||
# imu
|
||||
enable_sync_output_accel_gyro: false
|
||||
enable_accel: false
|
||||
enable_accel_data_correction: false
|
||||
accel_rate: 200hz
|
||||
accel_range: 4g
|
||||
enable_gyro: false
|
||||
enable_gyro_data_correction: false
|
||||
gyro_rate: 200hz
|
||||
gyro_range: 1000dps
|
||||
linear_accel_cov: 0.01
|
||||
angular_vel_cov: 0.01
|
||||
|
||||
depth_delay_us: 0
|
||||
color_delay_us: 0
|
||||
trigger2image_delay_us: 0
|
||||
trigger_out_delay_us: 0
|
||||
trigger_out_enabled: true
|
||||
software_trigger_enabled: true
|
||||
frames_per_trigger: 2
|
||||
software_trigger_period: 33
|
||||
|
||||
enable_ptp_config: false
|
||||
enable_frame_sync: true
|
||||
|
||||
noise_removal_filter_min_diff: 256
|
||||
noise_removal_filter_max_size: 80
|
||||
|
||||
# laser_params
|
||||
laser_index1_laser_control: 0
|
||||
laser_index1_depth_exposure: 3000
|
||||
laser_index1_depth_gain: 16
|
||||
laser_index1_ir_brightness: 60
|
||||
laser_index1_ir_ae_max_exposure: 17000
|
||||
laser_index0_laser_control: 1
|
||||
laser_index0_depth_exposure: 3000
|
||||
laser_index0_depth_gain: 16
|
||||
laser_index0_ir_brightness: 60
|
||||
laser_index0_ir_ae_max_exposure: 30000
|
||||
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
# config/*.yaml files are used to configure the camera parameters
|
||||
---
|
||||
orbbec_ros:
|
||||
camera_parameters:
|
||||
general:
|
||||
# Camera model. upport product models by referencing config/*.yaml
|
||||
camera_model: "gemini330_series"
|
||||
# Path to the configuration file. If empty, default parameters will be used
|
||||
config_file_path: "gemini330_series.yaml"
|
||||
|
||||
deivce:
|
||||
camera_name: "camera"
|
||||
serial_number: ""
|
||||
usb_port: ""
|
||||
device_num: 1
|
||||
uvc_backend: "libuvc"
|
||||
product_id: ""
|
||||
connection_delay: 10
|
||||
time_domain: "global"
|
||||
retry_on_usb3_detection_failure: false
|
||||
enable_heartbeat: false
|
||||
enable_ldp: true
|
||||
device_preset: "Default"
|
||||
|
||||
color:
|
||||
enable_color: true
|
||||
color_qos: "default"
|
||||
color_camera_info_qos: "default"
|
||||
color_width: 0
|
||||
color_height: 0
|
||||
color_fps: 0
|
||||
color_format: "ANY"
|
||||
enable_color_auto_white_balance: true
|
||||
color_white_balance: -1
|
||||
color_auto_ae:
|
||||
enable_color_auto_exposure: true
|
||||
color_ae_max_exposure: -1
|
||||
color_manual_ae:
|
||||
color_exposure: -1
|
||||
color_gain: -1
|
||||
color_brightness: -1
|
||||
|
||||
depth:
|
||||
enable_depth: true
|
||||
depth_qos: "default"
|
||||
depth_camera_info_qos: "default"
|
||||
depth_width: 0
|
||||
depth_height: 0
|
||||
depth_fps: 0
|
||||
depth_format: "ANY"
|
||||
depth_registration: true
|
||||
align_mode: "SW"
|
||||
laser:
|
||||
enable_laser: true
|
||||
|
||||
leftir:
|
||||
enable_left_ir: false
|
||||
left_ir_qos: "default"
|
||||
left_ir_camera_info_qos: "default"
|
||||
left_ir_width: 0
|
||||
left_ir_height: 0
|
||||
left_ir_fps: 0
|
||||
left_ir_format: "ANY"
|
||||
|
||||
rightir:
|
||||
enable_right_ir: false
|
||||
right_ir_camera_info_qos: "default"
|
||||
right_ir_width: 0
|
||||
right_ir_height: 0
|
||||
right_ir_fps: 0
|
||||
right_ir_format: "ANY"
|
||||
|
||||
ir_parameters:
|
||||
enable_ir_auto_exposure: true
|
||||
ir_ae_max_exposure: -1
|
||||
ir_exposure: -1
|
||||
ir_gain: -1
|
||||
ir_brightness: -1
|
||||
|
||||
imu:
|
||||
enable_accel: false
|
||||
accel_rate: "200hz"
|
||||
accel_range: "4g"
|
||||
enable_gyro: false
|
||||
gyro_rate: "200hz"
|
||||
gyro_range: "1000dps"
|
||||
enable_sync_output_accel_gyro: false
|
||||
linear_accel_cov: 0.01
|
||||
angular_vel_cov: 0.01
|
||||
|
||||
point_cloud:
|
||||
enable_point_cloud: true
|
||||
enable_colored_point_cloud: false
|
||||
|
||||
advanced:
|
||||
enable_frame_sync: true
|
||||
enable_d2c_viewer: false
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
# config/*.yaml files are used to configure the camera parameters
|
||||
---
|
||||
orbbec_ros:
|
||||
camera_parameters:
|
||||
general:
|
||||
# Camera model. upport product models by referencing config/*.yaml
|
||||
camera_model: "gemini330_series"
|
||||
# Path to the configuration file. If empty, default parameters will be used
|
||||
config_file_path: "gemini330_series.yaml"
|
||||
|
||||
deivce:
|
||||
camera_name: "camera"
|
||||
serial_number: ""
|
||||
usb_port: ""
|
||||
device_num: 1
|
||||
uvc_backend: "libuvc"
|
||||
product_id: ""
|
||||
connection_delay: 10
|
||||
time_domain: "global"
|
||||
retry_on_usb3_detection_failure: false
|
||||
enable_heartbeat: false
|
||||
enable_ldp: true
|
||||
device_preset: "Default"
|
||||
|
||||
color:
|
||||
enable_color: true
|
||||
color_qos: "default"
|
||||
color_camera_info_qos: "default"
|
||||
color_width: 0
|
||||
color_height: 0
|
||||
color_fps: 0
|
||||
color_format: "ANY"
|
||||
enable_color_auto_white_balance: true
|
||||
color_white_balance: -1
|
||||
color_auto_ae:
|
||||
enable_color_auto_exposure: true
|
||||
color_ae_max_exposure: -1
|
||||
color_manual_ae:
|
||||
color_exposure: -1
|
||||
color_gain: -1
|
||||
color_brightness: -1
|
||||
|
||||
depth:
|
||||
enable_depth: true
|
||||
depth_qos: "default"
|
||||
depth_camera_info_qos: "default"
|
||||
depth_width: 0
|
||||
depth_height: 0
|
||||
depth_fps: 0
|
||||
depth_format: "ANY"
|
||||
depth_registration: true
|
||||
align_mode: "SW"
|
||||
laser:
|
||||
enable_laser: true
|
||||
|
||||
leftir:
|
||||
enable_left_ir: false
|
||||
left_ir_qos: "default"
|
||||
left_ir_camera_info_qos: "default"
|
||||
left_ir_width: 0
|
||||
left_ir_height: 0
|
||||
left_ir_fps: 0
|
||||
left_ir_format: "ANY"
|
||||
|
||||
rightir:
|
||||
enable_right_ir: false
|
||||
right_ir_camera_info_qos: "default"
|
||||
right_ir_width: 0
|
||||
right_ir_height: 0
|
||||
right_ir_fps: 0
|
||||
right_ir_format: "ANY"
|
||||
|
||||
ir_parameters:
|
||||
enable_ir_auto_exposure: true
|
||||
ir_ae_max_exposure: -1
|
||||
ir_exposure: -1
|
||||
ir_gain: -1
|
||||
ir_brightness: -1
|
||||
|
||||
imu:
|
||||
enable_accel: false
|
||||
accel_rate: "200hz"
|
||||
accel_range: "4g"
|
||||
enable_gyro: false
|
||||
gyro_rate: "200hz"
|
||||
gyro_range: "1000dps"
|
||||
enable_sync_output_accel_gyro: false
|
||||
linear_accel_cov: 0.01
|
||||
angular_vel_cov: 0.01
|
||||
|
||||
point_cloud:
|
||||
enable_point_cloud: true
|
||||
enable_colored_point_cloud: false
|
||||
|
||||
advanced:
|
||||
enable_frame_sync: true
|
||||
enable_d2c_viewer: false
|
||||
|
||||
@@ -17,8 +17,8 @@ class CameraExampleNode : public rclcpp::Node {
|
||||
get_params_client_ = this->create_client<orbbec_camera_msgs::srv::GetUserCalibParams>(
|
||||
"/camera/get_user_calib_params");
|
||||
set_streams_client_ = this->create_client<std_srvs::srv::SetBool>("/camera/set_streams_enable");
|
||||
set_color_ae_roi_client_ = this->create_client<orbbec_camera_msgs::srv::SetArrays>(
|
||||
"/camera/set_color_ae_roi");
|
||||
set_color_ae_roi_client_ =
|
||||
this->create_client<orbbec_camera_msgs::srv::SetArrays>("/camera/set_color_ae_roi");
|
||||
get_device_info_client_ =
|
||||
this->create_client<orbbec_camera_msgs::srv::GetDeviceInfo>("/camera/get_device_info");
|
||||
}
|
||||
|
||||
@@ -6,11 +6,9 @@ These simple examples demonstrate how to easily use the camera with OrbbecSDK_RO
|
||||
|
||||
| Name | Description | Experience Level | Document |
|
||||
| :---------------------------------------------------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | ----------------------------------------------------------------------------- |
|
||||
| [Lower_cpu_usage](./lower_cpu_usage) | How to reduce CPU usage for one or more cameras in a ROS 2 environment. | ⭐️ | [Lower_cpu_usage](https://orbbec.github.io/OrbbecSDK_ROS2/source/5_advanced_guide/performance/lower_cpu_usage.html) |
|
||||
| [Net_camera](./net_camera) | How to use Net camera in OrbbecSDK_ROS2(Only Femto Mega nad Gemini 335Le) | ⭐️ | [Net_camera](https://orbbec.github.io/OrbbecSDK_ROS2/source/5_advanced_guide/configuration/net_camera.html) |
|
||||
| [Gmsl_camera](./gmsl_camera) | How to use GMSL camera.(Only Gemini 335Lg) | ⭐️ | [Gmsl_camera](https://orbbec.github.io/OrbbecSDK_ROS2/source/5_advanced_guide/multi_camera/gmsl_camera.html) |
|
||||
| [Benchmark](./benchmark) | The goal of this tool is to benchmark the performance of various OrbbecSDK_ROS2 camera configurations. | ⭐️⭐️ | [Benchmark](https://orbbec.github.io/OrbbecSDK_ROS2/source/5_advanced_guide/performance/benchmark.html) |
|
||||
| [Multi_camera_synced_verification_tool](./multi_camera_synced_verification_tool) | How to verify the synchronization accuracy of multi-camera synchronization. | ⭐️⭐️⭐️ | [Multi_camera_synced_verification_tool](https://orbbec.github.io/OrbbecSDK_ROS2/source/5_advanced_guide/multi_camera/multi_camera_synced_verification_tool.html) |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -85,6 +85,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('color_ae_roi_bottom', default_value='-1'),
|
||||
DeclareLaunchArgument('color_exposure', default_value='-1'),
|
||||
DeclareLaunchArgument('color_gain', default_value='-1'),
|
||||
DeclareLaunchArgument('color_mjpeg_quality', default_value='-1'),
|
||||
DeclareLaunchArgument('enable_color_auto_white_balance', default_value='true'),
|
||||
DeclareLaunchArgument('color_white_balance', default_value='-1'),
|
||||
DeclareLaunchArgument('enable_color_auto_exposure', default_value='true'),
|
||||
@@ -167,7 +168,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('net_device_ip', default_value=''),
|
||||
DeclareLaunchArgument('net_device_port', default_value='0'),
|
||||
DeclareLaunchArgument('exposure_range_mode', default_value='default'),#default, ultimate or regular
|
||||
DeclareLaunchArgument('log_level', default_value='none'),
|
||||
DeclareLaunchArgument('log_level', default_value='info'),
|
||||
DeclareLaunchArgument('log_file_name', default_value=''),
|
||||
DeclareLaunchArgument('enable_publish_extrinsic', default_value='false'),
|
||||
DeclareLaunchArgument('enable_d2c_viewer', default_value='false'),
|
||||
@@ -180,7 +181,8 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('trigger2image_delay_us', default_value='0'),
|
||||
DeclareLaunchArgument('trigger_out_delay_us', default_value='0'),
|
||||
DeclareLaunchArgument('trigger_out_enabled', default_value='true'),
|
||||
DeclareLaunchArgument('frames_per_trigger', default_value='2'),
|
||||
DeclareLaunchArgument('enable_fps_boost', default_value='false'),
|
||||
DeclareLaunchArgument('frames_per_trigger', default_value='1'),
|
||||
DeclareLaunchArgument('software_trigger_period', default_value='33'), # ms
|
||||
DeclareLaunchArgument('enable_ptp_config', default_value='false'),#Only for Gemini 335Le
|
||||
DeclareLaunchArgument('enable_frame_sync', default_value='true'),
|
||||
@@ -196,6 +198,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('enable_temporal_filter', default_value='false'),
|
||||
DeclareLaunchArgument('enable_disparity_to_depth', default_value='true'),
|
||||
DeclareLaunchArgument('enable_hole_filling_filter', default_value='false'),
|
||||
DeclareLaunchArgument('enable_false_positive_filter', default_value='false'),
|
||||
DeclareLaunchArgument('decimation_filter_scale', default_value='-1'),
|
||||
DeclareLaunchArgument('sequence_id_filter_id', default_value='-1'),
|
||||
DeclareLaunchArgument('threshold_filter_max', default_value='-1'),
|
||||
@@ -226,6 +229,9 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('time_sync_period', default_value='6.0'), # seconds
|
||||
DeclareLaunchArgument('time_domain', default_value='global'),# global, device, system
|
||||
DeclareLaunchArgument('enable_color_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_depth_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_left_ir_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_right_ir_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('config_file_path', default_value=''),
|
||||
DeclareLaunchArgument('enable_heartbeat', default_value='false'),
|
||||
DeclareLaunchArgument('enable_firmware_log', default_value='false'),
|
||||
|
||||
@@ -102,6 +102,10 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('right_ir_fps', default_value='30'),
|
||||
DeclareLaunchArgument('right_ir_format', default_value='ANY'),
|
||||
DeclareLaunchArgument('enable_right_ir', default_value='true'),
|
||||
DeclareLaunchArgument('enable_color_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_depth_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_left_ir_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_right_ir_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_point_cloud', default_value='false'),
|
||||
DeclareLaunchArgument('enable_colored_point_cloud', default_value='false'),
|
||||
DeclareLaunchArgument('enable_decimation_filter', default_value='false'),
|
||||
|
||||
@@ -102,6 +102,10 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('right_ir_fps', default_value='30'),
|
||||
DeclareLaunchArgument('right_ir_format', default_value='ANY'),
|
||||
DeclareLaunchArgument('enable_right_ir', default_value='true'),
|
||||
DeclareLaunchArgument('enable_color_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_depth_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_left_ir_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_right_ir_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_point_cloud', default_value='false'),
|
||||
DeclareLaunchArgument('enable_colored_point_cloud', default_value='false'),
|
||||
DeclareLaunchArgument('enable_decimation_filter', default_value='false'),
|
||||
|
||||
@@ -85,6 +85,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('color_ae_roi_bottom', default_value='-1'),
|
||||
DeclareLaunchArgument('color_exposure', default_value='-1'),
|
||||
DeclareLaunchArgument('color_gain', default_value='-1'),
|
||||
DeclareLaunchArgument('color_mjpeg_quality', default_value='-1'),
|
||||
DeclareLaunchArgument('enable_color_auto_white_balance', default_value='true'),
|
||||
DeclareLaunchArgument('color_white_balance', default_value='-1'),
|
||||
DeclareLaunchArgument('enable_color_auto_exposure', default_value='true'),
|
||||
@@ -167,7 +168,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('net_device_ip', default_value=''),
|
||||
DeclareLaunchArgument('net_device_port', default_value='0'),
|
||||
DeclareLaunchArgument('exposure_range_mode', default_value='default'),#default, ultimate or regular
|
||||
DeclareLaunchArgument('log_level', default_value='none'),
|
||||
DeclareLaunchArgument('log_level', default_value='info'),
|
||||
DeclareLaunchArgument('log_file_name', default_value=''),
|
||||
DeclareLaunchArgument('enable_publish_extrinsic', default_value='false'),
|
||||
DeclareLaunchArgument('enable_d2c_viewer', default_value='false'),
|
||||
@@ -180,7 +181,8 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('trigger2image_delay_us', default_value='0'),
|
||||
DeclareLaunchArgument('trigger_out_delay_us', default_value='0'),
|
||||
DeclareLaunchArgument('trigger_out_enabled', default_value='true'),
|
||||
DeclareLaunchArgument('frames_per_trigger', default_value='2'),
|
||||
DeclareLaunchArgument('enable_fps_boost', default_value='false'),
|
||||
DeclareLaunchArgument('frames_per_trigger', default_value='1'),
|
||||
DeclareLaunchArgument('software_trigger_period', default_value='33'), # ms
|
||||
DeclareLaunchArgument('enable_ptp_config', default_value='false'),#Only for Gemini 335Le
|
||||
DeclareLaunchArgument('enable_frame_sync', default_value='true'),
|
||||
@@ -196,6 +198,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('enable_temporal_filter', default_value='false'),
|
||||
DeclareLaunchArgument('enable_disparity_to_depth', default_value='true'),
|
||||
DeclareLaunchArgument('enable_hole_filling_filter', default_value='false'),
|
||||
DeclareLaunchArgument('enable_false_positive_filter', default_value='false'),
|
||||
DeclareLaunchArgument('decimation_filter_scale', default_value='-1'),
|
||||
DeclareLaunchArgument('sequence_id_filter_id', default_value='-1'),
|
||||
DeclareLaunchArgument('threshold_filter_max', default_value='-1'),
|
||||
@@ -226,6 +229,9 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('time_sync_period', default_value='6.0'), # seconds
|
||||
DeclareLaunchArgument('time_domain', default_value='global'),# global, device, system
|
||||
DeclareLaunchArgument('enable_color_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_depth_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_left_ir_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_right_ir_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('config_file_path', default_value=''),
|
||||
DeclareLaunchArgument('enable_heartbeat', default_value='false'),
|
||||
DeclareLaunchArgument('enable_firmware_log', default_value='false'),
|
||||
|
||||
@@ -1,265 +0,0 @@
|
||||
import os
|
||||
import yaml
|
||||
from launch import LaunchDescription
|
||||
from launch.actions import DeclareLaunchArgument, OpaqueFunction, GroupAction
|
||||
from launch.substitutions import LaunchConfiguration
|
||||
from launch_ros.actions import PushRosNamespace, ComposableNodeContainer, Node
|
||||
from launch_ros.descriptions import ComposableNode
|
||||
from launch.conditions import UnlessCondition
|
||||
from launch_ros.actions import LoadComposableNodes
|
||||
|
||||
def load_yaml(file_path):
|
||||
with open(file_path, 'r') as f:
|
||||
return yaml.safe_load(f)
|
||||
|
||||
|
||||
def merge_params(default_params, yaml_params):
|
||||
for key, value in yaml_params.items():
|
||||
if key in default_params:
|
||||
default_params[key] = value
|
||||
return default_params
|
||||
|
||||
|
||||
def convert_value(value):
|
||||
if isinstance(value, str):
|
||||
try:
|
||||
return int(value)
|
||||
except ValueError:
|
||||
pass
|
||||
try:
|
||||
return float(value)
|
||||
except ValueError:
|
||||
pass
|
||||
if value.lower() == 'true':
|
||||
return True
|
||||
elif value.lower() == 'false':
|
||||
return False
|
||||
return value
|
||||
|
||||
|
||||
def load_parameters(context, args):
|
||||
default_params = {arg.name: LaunchConfiguration(arg.name).perform(context) for arg in args}
|
||||
config_file_path = LaunchConfiguration('config_file_path').perform(context)
|
||||
if config_file_path:
|
||||
yaml_params = load_yaml(config_file_path)
|
||||
default_params = merge_params(default_params, yaml_params)
|
||||
skip_convert = {'config_file_path', 'usb_port', 'serial_number'}
|
||||
return {
|
||||
key: (value if key in skip_convert else convert_value(value))
|
||||
for key, value in default_params.items()
|
||||
}
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
args = [
|
||||
DeclareLaunchArgument('camera_name', default_value='camera'),
|
||||
DeclareLaunchArgument('depth_registration', default_value='false'),
|
||||
DeclareLaunchArgument('serial_number', default_value=''),
|
||||
DeclareLaunchArgument('usb_port', default_value=''),
|
||||
DeclareLaunchArgument('device_num', default_value='1'),
|
||||
DeclareLaunchArgument('uvc_backend', default_value='v4l2'),#libuvc or v4l2
|
||||
DeclareLaunchArgument('point_cloud_qos', default_value='default'),
|
||||
DeclareLaunchArgument('enable_point_cloud', default_value='false'),
|
||||
DeclareLaunchArgument('enable_colored_point_cloud', default_value='false'),
|
||||
DeclareLaunchArgument('cloud_frame_id', default_value=''),
|
||||
DeclareLaunchArgument('connection_delay', default_value='10'),
|
||||
DeclareLaunchArgument('color_width', default_value='0'),
|
||||
DeclareLaunchArgument('color_height', default_value='0'),
|
||||
DeclareLaunchArgument('color_fps', default_value='0'),
|
||||
DeclareLaunchArgument('color_format', default_value='RGB'),
|
||||
DeclareLaunchArgument('enable_color', default_value='true'),
|
||||
DeclareLaunchArgument('color_qos', default_value='default'),
|
||||
DeclareLaunchArgument('color_camera_info_qos', default_value='default'),
|
||||
DeclareLaunchArgument('enable_color_auto_exposure', default_value='true'),
|
||||
DeclareLaunchArgument('color_exposure', default_value='-1'),
|
||||
DeclareLaunchArgument('color_gain', default_value='-1'),
|
||||
DeclareLaunchArgument('enable_color_auto_white_balance', default_value='true'),
|
||||
DeclareLaunchArgument('color_white_balance', default_value='-1'),
|
||||
DeclareLaunchArgument('color_ae_max_exposure', default_value='-1'),
|
||||
DeclareLaunchArgument('color_brightness', default_value='-1'),
|
||||
DeclareLaunchArgument('depth_width', default_value='0'),
|
||||
DeclareLaunchArgument('depth_height', default_value='0'),
|
||||
DeclareLaunchArgument('depth_fps', default_value='0'),
|
||||
DeclareLaunchArgument('depth_format', default_value='ANY'),
|
||||
DeclareLaunchArgument('enable_depth', default_value='true'),
|
||||
DeclareLaunchArgument('depth_qos', default_value='default'),
|
||||
DeclareLaunchArgument('depth_camera_info_qos', default_value='default'),
|
||||
DeclareLaunchArgument('left_ir_width', default_value='0'),
|
||||
DeclareLaunchArgument('left_ir_height', default_value='0'),
|
||||
DeclareLaunchArgument('left_ir_fps', default_value='0'),
|
||||
DeclareLaunchArgument('left_ir_format', default_value='ANY'),
|
||||
DeclareLaunchArgument('enable_left_ir', default_value='false'),
|
||||
DeclareLaunchArgument('left_ir_qos', default_value='default'),
|
||||
DeclareLaunchArgument('left_ir_camera_info_qos', default_value='default'),
|
||||
DeclareLaunchArgument('right_ir_width', default_value='0'),
|
||||
DeclareLaunchArgument('right_ir_height', default_value='0'),
|
||||
DeclareLaunchArgument('right_ir_fps', default_value='0'),
|
||||
DeclareLaunchArgument('right_ir_format', default_value='ANY'),
|
||||
DeclareLaunchArgument('enable_right_ir', default_value='false'),
|
||||
DeclareLaunchArgument('right_ir_qos', default_value='default'),
|
||||
DeclareLaunchArgument('right_ir_camera_info_qos', default_value='default'),
|
||||
DeclareLaunchArgument('enable_ir_auto_exposure', default_value='true'),
|
||||
DeclareLaunchArgument('ir_exposure', default_value='-1'),
|
||||
DeclareLaunchArgument('ir_gain', default_value='-1'),
|
||||
DeclareLaunchArgument('ir_ae_max_exposure', default_value='-1'),
|
||||
DeclareLaunchArgument('ir_brightness', default_value='-1'),
|
||||
DeclareLaunchArgument('enable_sync_output_accel_gyro', default_value='false'),
|
||||
DeclareLaunchArgument('enable_accel', default_value='false'),
|
||||
DeclareLaunchArgument('accel_rate', default_value='200hz'),
|
||||
DeclareLaunchArgument('accel_range', default_value='4g'),
|
||||
DeclareLaunchArgument('enable_gyro', default_value='false'),
|
||||
DeclareLaunchArgument('gyro_rate', default_value='200hz'),
|
||||
DeclareLaunchArgument('gyro_range', default_value='1000dps'),
|
||||
DeclareLaunchArgument('linear_accel_cov', default_value='0.01'),
|
||||
DeclareLaunchArgument('angular_vel_cov', default_value='0.01'),
|
||||
DeclareLaunchArgument('publish_tf', default_value='true'),
|
||||
DeclareLaunchArgument('tf_publish_rate', default_value='0.0'),
|
||||
DeclareLaunchArgument('ir_info_url', default_value=''),
|
||||
DeclareLaunchArgument('color_info_url', default_value=''),
|
||||
DeclareLaunchArgument('log_level', default_value='none'),
|
||||
DeclareLaunchArgument('log_file_name', default_value=''),
|
||||
DeclareLaunchArgument('enable_publish_extrinsic', default_value='false'),
|
||||
DeclareLaunchArgument('enable_d2c_viewer', default_value='false'),
|
||||
DeclareLaunchArgument('disparity_to_depth_mode', default_value='HW'),
|
||||
DeclareLaunchArgument('enable_ldp', default_value='true'),
|
||||
DeclareLaunchArgument('sync_mode', default_value='standalone'),
|
||||
DeclareLaunchArgument('depth_delay_us', default_value='0'),
|
||||
DeclareLaunchArgument('color_delay_us', default_value='0'),
|
||||
DeclareLaunchArgument('trigger2image_delay_us', default_value='0'),
|
||||
DeclareLaunchArgument('trigger_out_delay_us', default_value='0'),
|
||||
DeclareLaunchArgument('trigger_out_enabled', default_value='true'),
|
||||
DeclareLaunchArgument('frames_per_trigger', default_value='2'),
|
||||
DeclareLaunchArgument('software_trigger_period', default_value='33'), # ms
|
||||
DeclareLaunchArgument('enable_frame_sync', default_value='true'),
|
||||
DeclareLaunchArgument('ordered_pc', default_value='false'),
|
||||
DeclareLaunchArgument('enable_depth_scale', default_value='true'),
|
||||
DeclareLaunchArgument('enable_decimation_filter', default_value='false'),
|
||||
DeclareLaunchArgument('enable_hdr_merge', default_value='false'),
|
||||
DeclareLaunchArgument('enable_sequence_id_filter', default_value='false'),
|
||||
DeclareLaunchArgument('enable_threshold_filter', default_value='false'),
|
||||
DeclareLaunchArgument('enable_hardware_noise_removal_filter', default_value='true'),
|
||||
DeclareLaunchArgument('enable_noise_removal_filter', default_value='false'),
|
||||
DeclareLaunchArgument('enable_spatial_filter', default_value='false'),
|
||||
DeclareLaunchArgument('enable_temporal_filter', default_value='false'),
|
||||
DeclareLaunchArgument('enable_hole_filling_filter', default_value='false'),
|
||||
DeclareLaunchArgument('decimation_filter_scale', default_value='-1'),
|
||||
DeclareLaunchArgument('sequence_id_filter_id', default_value='-1'),
|
||||
DeclareLaunchArgument('threshold_filter_max', default_value='-1'),
|
||||
DeclareLaunchArgument('threshold_filter_min', default_value='-1'),
|
||||
DeclareLaunchArgument('noise_removal_filter_min_diff', default_value='256'),
|
||||
DeclareLaunchArgument('noise_removal_filter_max_size', default_value='80'),
|
||||
DeclareLaunchArgument('spatial_filter_alpha', default_value='-1.0'),
|
||||
DeclareLaunchArgument('spatial_filter_diff_threshold', default_value='-1'),
|
||||
DeclareLaunchArgument('spatial_filter_magnitude', default_value='-1'),
|
||||
DeclareLaunchArgument('spatial_filter_radius', default_value='-1'),
|
||||
DeclareLaunchArgument('temporal_filter_diff_threshold', default_value='-1.0'),
|
||||
DeclareLaunchArgument('temporal_filter_weight', default_value='-1.0'),
|
||||
DeclareLaunchArgument('hole_filling_filter_mode', default_value=''),
|
||||
DeclareLaunchArgument('hdr_merge_exposure_1', default_value='-1'),
|
||||
DeclareLaunchArgument('hdr_merge_gain_1', default_value='-1'),
|
||||
DeclareLaunchArgument('hdr_merge_exposure_2', default_value='-1'),
|
||||
DeclareLaunchArgument('hdr_merge_gain_2', default_value='-1'),
|
||||
DeclareLaunchArgument('align_mode', default_value='SW'),
|
||||
DeclareLaunchArgument('diagnostic_period', default_value='1.0'),
|
||||
DeclareLaunchArgument('enable_laser', default_value='true'),
|
||||
DeclareLaunchArgument('depth_precision', default_value=''),
|
||||
DeclareLaunchArgument('device_preset', default_value='Default'),
|
||||
DeclareLaunchArgument('retry_on_usb3_detection_failure', default_value='false'),
|
||||
DeclareLaunchArgument('laser_energy_level', default_value='-1'),
|
||||
DeclareLaunchArgument('enable_sync_host_time', default_value='false'),
|
||||
DeclareLaunchArgument('time_sync_period', default_value='6.0'), # seconds
|
||||
DeclareLaunchArgument('time_domain', default_value='global'),# global, device, system
|
||||
DeclareLaunchArgument('enable_color_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('config_file_path', default_value=''),
|
||||
DeclareLaunchArgument('enable_heartbeat', default_value='false'),
|
||||
DeclareLaunchArgument('enable_firmware_log', default_value='false'),
|
||||
DeclareLaunchArgument('gmsl_trigger_fps', default_value='3000'),
|
||||
DeclareLaunchArgument('enable_gmsl_trigger', default_value='false'),
|
||||
DeclareLaunchArgument('disparity_range_mode', default_value='-1'),
|
||||
DeclareLaunchArgument('disparity_search_offset', default_value='-1'),
|
||||
DeclareLaunchArgument('disparity_offset_config', default_value='false'),
|
||||
DeclareLaunchArgument('offset_index0', default_value='-1'),
|
||||
DeclareLaunchArgument('offset_index1', default_value='-1'),
|
||||
DeclareLaunchArgument('frame_aggregate_mode', default_value='ANY'), # full_frame, color_frame, ANY or disable
|
||||
DeclareLaunchArgument('interleave_ae_mode', default_value='laser'), # 'hdr' or 'laser'
|
||||
DeclareLaunchArgument('interleave_frame_enable', default_value='false'),
|
||||
DeclareLaunchArgument('interleave_skip_enable', default_value='false'),
|
||||
DeclareLaunchArgument('interleave_skip_index', default_value='1'), # 0:skip pattern ir 1: skip flood ir
|
||||
|
||||
DeclareLaunchArgument('hdr_index1_laser_control', default_value='1'),#interleave_hdr_param
|
||||
DeclareLaunchArgument('hdr_index1_depth_exposure', default_value='1'),
|
||||
DeclareLaunchArgument('hdr_index1_depth_gain', default_value='16'),
|
||||
DeclareLaunchArgument('hdr_index1_ir_brightness', default_value='30'),
|
||||
DeclareLaunchArgument('hdr_index1_ir_ae_max_exposure', default_value='30458'),
|
||||
DeclareLaunchArgument('hdr_index0_laser_control', default_value='1'),
|
||||
DeclareLaunchArgument('hdr_index0_depth_exposure', default_value='7500'),
|
||||
DeclareLaunchArgument('hdr_index0_depth_gain', default_value='16'),
|
||||
DeclareLaunchArgument('hdr_index0_ir_brightness', default_value='90'),
|
||||
DeclareLaunchArgument('hdr_index0_ir_ae_max_exposure', default_value='30458'),
|
||||
|
||||
DeclareLaunchArgument('laser_index1_laser_control', default_value='0'),#interleave_laser_param
|
||||
DeclareLaunchArgument('laser_index1_depth_exposure', default_value='3000'),
|
||||
DeclareLaunchArgument('laser_index1_depth_gain', default_value='16'),
|
||||
DeclareLaunchArgument('laser_index1_ir_brightness', default_value='60'),
|
||||
DeclareLaunchArgument('laser_index1_ir_ae_max_exposure', default_value='17000'),
|
||||
DeclareLaunchArgument('laser_index0_laser_control', default_value='1'),
|
||||
DeclareLaunchArgument('laser_index0_depth_exposure', default_value='3000'),
|
||||
DeclareLaunchArgument('laser_index0_depth_gain', default_value='16'),
|
||||
DeclareLaunchArgument('laser_index0_ir_brightness', default_value='60'),
|
||||
DeclareLaunchArgument('laser_index0_ir_ae_max_exposure', default_value='30000'),
|
||||
DeclareLaunchArgument('use_intra_process_comms', default_value='false'),
|
||||
DeclareLaunchArgument('attach_component_container_enable', default_value='false'),
|
||||
DeclareLaunchArgument('attach_component_container_name', default_value='orbbec_container'),
|
||||
|
||||
]
|
||||
|
||||
def get_params(context, args):
|
||||
return [load_parameters(context, args)]
|
||||
|
||||
def create_node_action(context, args):
|
||||
params = get_params(context, args)
|
||||
ros_distro = os.environ.get("ROS_DISTRO", "humble")
|
||||
if ros_distro == "foxy":
|
||||
return [
|
||||
Node(
|
||||
package="orbbec_camera",
|
||||
executable="orbbec_camera_node",
|
||||
name="ob_camera_node",
|
||||
namespace=LaunchConfiguration("camera_name"),
|
||||
parameters=params,
|
||||
output="log",
|
||||
)
|
||||
]
|
||||
else:
|
||||
attach_to_shared_component_container_arg = LaunchConfiguration('attach_to_shared_component_container', default=False)
|
||||
component_container_name_arg = LaunchConfiguration('component_container_name', default='orbbec_container')
|
||||
|
||||
orbbec_container = Node(
|
||||
name=component_container_name_arg,
|
||||
package='rclcpp_components',
|
||||
executable='component_container_mt',
|
||||
output='screen',
|
||||
condition=UnlessCondition(attach_to_shared_component_container_arg)
|
||||
)
|
||||
return [
|
||||
orbbec_container,
|
||||
LoadComposableNodes(
|
||||
target_container=component_container_name_arg,
|
||||
composable_node_descriptions=[
|
||||
ComposableNode(
|
||||
namespace=LaunchConfiguration("camera_name"),
|
||||
name=LaunchConfiguration("camera_name"),
|
||||
package='orbbec_camera',
|
||||
plugin='orbbec_camera::OBCameraNodeDriver',
|
||||
parameters=params,
|
||||
extra_arguments=[{'use_intra_process_comms': LaunchConfiguration("use_intra_process_comms")}],
|
||||
)
|
||||
]
|
||||
)
|
||||
]
|
||||
|
||||
return LaunchDescription(
|
||||
args + [
|
||||
OpaqueFunction(function=lambda context: create_node_action(context, args))
|
||||
]
|
||||
)
|
||||
@@ -1,150 +0,0 @@
|
||||
import os
|
||||
from ament_index_python.packages import get_package_share_directory
|
||||
from launch import LaunchDescription
|
||||
from launch_ros.actions import Node,LoadComposableNodes
|
||||
from launch.actions import IncludeLaunchDescription, GroupAction, TimerAction
|
||||
from launch.launch_description_sources import PythonLaunchDescriptionSource
|
||||
from launch.actions import DeclareLaunchArgument
|
||||
from launch.conditions import UnlessCondition, IfCondition
|
||||
from launch.substitutions import LaunchConfiguration
|
||||
from launch.substitutions import TextSubstitution
|
||||
from launch_ros.descriptions import ComposableNode
|
||||
|
||||
def load_yaml(file_path):
|
||||
with open(file_path, 'r') as f:
|
||||
return yaml.safe_load(f)
|
||||
|
||||
|
||||
def merge_params(default_params, yaml_params):
|
||||
for key, value in yaml_params.items():
|
||||
if key in default_params:
|
||||
default_params[key] = value
|
||||
return default_params
|
||||
|
||||
|
||||
def convert_value(value):
|
||||
if isinstance(value, str):
|
||||
try:
|
||||
return int(value)
|
||||
except ValueError:
|
||||
pass
|
||||
try:
|
||||
return float(value)
|
||||
except ValueError:
|
||||
pass
|
||||
if value.lower() == 'true':
|
||||
return True
|
||||
elif value.lower() == 'false':
|
||||
return False
|
||||
return value
|
||||
|
||||
|
||||
def load_parameters(context, args):
|
||||
default_params = {arg.name: LaunchConfiguration(arg.name).perform(context) for arg in args}
|
||||
config_file_path = LaunchConfiguration('config_file_path').perform(context)
|
||||
if config_file_path:
|
||||
yaml_params = load_yaml(config_file_path)
|
||||
default_params = merge_params(default_params, yaml_params)
|
||||
skip_convert = {'config_file_path', 'usb_port', 'serial_number'}
|
||||
return {
|
||||
key: (value if key in skip_convert else convert_value(value))
|
||||
for key, value in default_params.items()
|
||||
}
|
||||
def generate_launch_description():
|
||||
# Include launch files
|
||||
package_dir = get_package_share_directory("orbbec_camera")
|
||||
launch_file_dir = os.path.join(package_dir, "examples/lower_cpu_usage")
|
||||
|
||||
attach_to_shared_component_container_arg = LaunchConfiguration('attach_to_shared_component_container', default=False)
|
||||
component_container_name_arg = LaunchConfiguration('component_container_name', default='shared_orbbec_container')
|
||||
|
||||
shared_orbbec_container = Node(
|
||||
name=component_container_name_arg,
|
||||
package="rclcpp_components",
|
||||
executable="component_container_mt",
|
||||
output="log",
|
||||
condition=UnlessCondition(attach_to_shared_component_container_arg),
|
||||
)
|
||||
|
||||
attach_to_shared_component_container_arg = TextSubstitution(text="true")
|
||||
|
||||
launch1_include = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(launch_file_dir, "gemini_330_series_lower_cpu_usage.launch.py")
|
||||
),
|
||||
launch_arguments={
|
||||
"camera_name": "camera_01",
|
||||
"usb_port": "2-7",
|
||||
"device_num": "4",
|
||||
"sync_mode": "standalone",
|
||||
"attach_to_shared_component_container": attach_to_shared_component_container_arg,
|
||||
"component_container_name": component_container_name_arg,
|
||||
}.items(),
|
||||
)
|
||||
launch2_include = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(launch_file_dir, "gemini_330_series_lower_cpu_usage.launch.py")
|
||||
),
|
||||
launch_arguments={
|
||||
"camera_name": "camera_02",
|
||||
"usb_port": "2-2",
|
||||
"device_num": "4",
|
||||
"sync_mode": "standalone",
|
||||
"attach_to_shared_component_container": attach_to_shared_component_container_arg,
|
||||
"component_container_name": component_container_name_arg,
|
||||
}.items(),
|
||||
)
|
||||
launch3_include = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(launch_file_dir, "gemini_330_series_lower_cpu_usage.launch.py")
|
||||
),
|
||||
launch_arguments={
|
||||
"camera_name": "camera_03",
|
||||
"usb_port": "2-6",
|
||||
"device_num": "4",
|
||||
"sync_mode": "standalone",
|
||||
"attach_to_shared_component_container": attach_to_shared_component_container_arg,
|
||||
"component_container_name": component_container_name_arg,
|
||||
}.items(),
|
||||
)
|
||||
launch4_include = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(launch_file_dir, "gemini_330_series_lower_cpu_usage.launch.py")
|
||||
),
|
||||
launch_arguments={
|
||||
"camera_name": "camera_04",
|
||||
"usb_port": "2-3",
|
||||
"device_num": "4",
|
||||
"sync_mode": "standalone",
|
||||
"attach_to_shared_component_container": attach_to_shared_component_container_arg,
|
||||
"component_container_name": component_container_name_arg,
|
||||
}.items(),
|
||||
)
|
||||
|
||||
delayed_left_camera = TimerAction(
|
||||
period=2.0,
|
||||
actions=[launch1_include],
|
||||
)
|
||||
delayed_right_camera = TimerAction(
|
||||
period=4.0,
|
||||
actions=[launch2_include],
|
||||
)
|
||||
delayed_rear_camera = TimerAction(
|
||||
period=6.0,
|
||||
actions=[launch3_include],
|
||||
)
|
||||
delayed_front_camera = TimerAction(
|
||||
period=8.0,
|
||||
actions=[launch4_include],
|
||||
)
|
||||
ld = LaunchDescription(
|
||||
[
|
||||
shared_orbbec_container,
|
||||
TimerAction(period=0.0, actions=[GroupAction([delayed_left_camera])]),
|
||||
TimerAction(period=2.0, actions=[GroupAction([delayed_right_camera])]),
|
||||
TimerAction(period=4.0, actions=[GroupAction([delayed_rear_camera])]),
|
||||
TimerAction(period=6.0, actions=[GroupAction([delayed_front_camera])]),
|
||||
]
|
||||
)
|
||||
|
||||
return ld
|
||||
+8
-2
@@ -85,6 +85,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('color_ae_roi_bottom', default_value='-1'),
|
||||
DeclareLaunchArgument('color_exposure', default_value='-1'),
|
||||
DeclareLaunchArgument('color_gain', default_value='-1'),
|
||||
DeclareLaunchArgument('color_mjpeg_quality', default_value='-1'),
|
||||
DeclareLaunchArgument('enable_color_auto_white_balance', default_value='true'),
|
||||
DeclareLaunchArgument('color_white_balance', default_value='-1'),
|
||||
DeclareLaunchArgument('enable_color_auto_exposure', default_value='true'),
|
||||
@@ -167,7 +168,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('net_device_ip', default_value=''),
|
||||
DeclareLaunchArgument('net_device_port', default_value='0'),
|
||||
DeclareLaunchArgument('exposure_range_mode', default_value='default'),#default, ultimate or regular
|
||||
DeclareLaunchArgument('log_level', default_value='none'),
|
||||
DeclareLaunchArgument('log_level', default_value='info'),
|
||||
DeclareLaunchArgument('log_file_name', default_value=''),
|
||||
DeclareLaunchArgument('enable_publish_extrinsic', default_value='false'),
|
||||
DeclareLaunchArgument('enable_d2c_viewer', default_value='false'),
|
||||
@@ -180,7 +181,8 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('trigger2image_delay_us', default_value='0'),
|
||||
DeclareLaunchArgument('trigger_out_delay_us', default_value='0'),
|
||||
DeclareLaunchArgument('trigger_out_enabled', default_value='true'),
|
||||
DeclareLaunchArgument('frames_per_trigger', default_value='2'),
|
||||
DeclareLaunchArgument('enable_fps_boost', default_value='false'),
|
||||
DeclareLaunchArgument('frames_per_trigger', default_value='1'),
|
||||
DeclareLaunchArgument('software_trigger_period', default_value='33'), # ms
|
||||
DeclareLaunchArgument('enable_ptp_config', default_value='false'),#Only for Gemini 335Le
|
||||
DeclareLaunchArgument('enable_frame_sync', default_value='true'),
|
||||
@@ -196,6 +198,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('enable_temporal_filter', default_value='false'),
|
||||
DeclareLaunchArgument('enable_disparity_to_depth', default_value='true'),
|
||||
DeclareLaunchArgument('enable_hole_filling_filter', default_value='false'),
|
||||
DeclareLaunchArgument('enable_false_positive_filter', default_value='false'),
|
||||
DeclareLaunchArgument('decimation_filter_scale', default_value='-1'),
|
||||
DeclareLaunchArgument('sequence_id_filter_id', default_value='-1'),
|
||||
DeclareLaunchArgument('threshold_filter_max', default_value='-1'),
|
||||
@@ -226,6 +229,9 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('time_sync_period', default_value='6.0'), # seconds
|
||||
DeclareLaunchArgument('time_domain', default_value='global'),# global, device, system
|
||||
DeclareLaunchArgument('enable_color_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_depth_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_left_ir_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_right_ir_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('config_file_path', default_value=''),
|
||||
DeclareLaunchArgument('enable_heartbeat', default_value='false'),
|
||||
DeclareLaunchArgument('enable_firmware_log', default_value='false'),
|
||||
|
||||
+4
-1
@@ -109,6 +109,9 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('ir_exposure', default_value='-1'),
|
||||
DeclareLaunchArgument('ir_gain', default_value='-1'),
|
||||
DeclareLaunchArgument('ir_brightness', default_value='-1'),
|
||||
DeclareLaunchArgument('enable_color_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_depth_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_ir_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('config_file_path', default_value=''),
|
||||
DeclareLaunchArgument('enable_sync_output_accel_gyro', default_value='true'),
|
||||
DeclareLaunchArgument('enable_accel', default_value='false'),
|
||||
@@ -123,7 +126,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('tf_publish_rate', default_value='0.0'),
|
||||
DeclareLaunchArgument('ir_info_url', default_value=''),
|
||||
DeclareLaunchArgument('color_info_url', default_value=''),
|
||||
DeclareLaunchArgument('log_level', default_value='none'),
|
||||
DeclareLaunchArgument('log_level', default_value='info'),
|
||||
DeclareLaunchArgument('log_file_name', default_value=''),
|
||||
DeclareLaunchArgument('enable_publish_extrinsic', default_value='false'),
|
||||
DeclareLaunchArgument('enable_d2c_viewer', default_value='false'),
|
||||
|
||||
@@ -1,20 +1,33 @@
|
||||
#include <message_filters/subscriber.h>
|
||||
#include <message_filters/sync_policies/approximate_time.h>
|
||||
#include <message_filters/synchronizer.h>
|
||||
#include <rclcpp/rclcpp.hpp>
|
||||
#include <sensor_msgs/msg/image.hpp>
|
||||
#include <message_filters/subscriber.h>
|
||||
#include <message_filters/synchronizer.h>
|
||||
#include <message_filters/sync_policies/approximate_time.h>
|
||||
|
||||
#if __has_include(<cv_bridge/cv_bridge.hpp>)
|
||||
#include <cv_bridge/cv_bridge.hpp>
|
||||
#elif __has_include(<cv_bridge/cv_bridge.h>)
|
||||
#include <cv_bridge/cv_bridge.h>
|
||||
#endif
|
||||
#include <opencv2/opencv.hpp>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <limits>
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <chrono>
|
||||
#include <cmath>
|
||||
#include <condition_variable>
|
||||
#include <deque>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <opencv2/opencv.hpp>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
using Image = sensor_msgs::msg::Image;
|
||||
using ImageConstPtr = sensor_msgs::msg::Image::ConstSharedPtr;
|
||||
|
||||
using std::placeholders::_1;
|
||||
using std::placeholders::_2;
|
||||
@@ -27,7 +40,7 @@ using std::placeholders::_8;
|
||||
|
||||
class ImageSyncNode : public rclcpp::Node {
|
||||
public:
|
||||
ImageSyncNode(const double hz)
|
||||
explicit ImageSyncNode(const double hz)
|
||||
: Node("image_sync_node"),
|
||||
diff_sum_(0.0),
|
||||
count_(0),
|
||||
@@ -36,52 +49,51 @@ class ImageSyncNode : public rclcpp::Node {
|
||||
last_time_(0.0),
|
||||
frame_interval_(1.0 / hz),
|
||||
stop_display_thread_(false) {
|
||||
auto topics = this->get_topic_names_and_types();
|
||||
std::vector<std::string> color_topics;
|
||||
std::vector<std::string> depth_topics;
|
||||
sync_topics_ = this->declare_parameter<std::vector<std::string>>("sync_topics",
|
||||
std::vector<std::string>{});
|
||||
queue_size_ = this->declare_parameter<int>("queue_size", 10);
|
||||
sync_tolerance_ms_ =
|
||||
this->declare_parameter<double>("sync_tolerance_ms", frame_interval_ * 500.0);
|
||||
auto_discovery_timeout_ms_ = this->declare_parameter<int>("auto_discovery_timeout_ms", 1000);
|
||||
auto_discovery_poll_ms_ = this->declare_parameter<int>("auto_discovery_poll_ms", 100);
|
||||
|
||||
auto has_suffix = [](const std::string &str, const std::string &suffix) {
|
||||
return str.size() >= suffix.size() &&
|
||||
str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;
|
||||
};
|
||||
|
||||
for (const auto &entry : topics) {
|
||||
const std::string &topic = entry.first;
|
||||
if (has_suffix(topic, "/color/image_raw")) {
|
||||
color_topics.push_back(topic);
|
||||
} else if (has_suffix(topic, "/depth/image_raw")) {
|
||||
depth_topics.push_back(topic);
|
||||
}
|
||||
if (sync_topics_.empty()) {
|
||||
sync_topics_ = discover_image_topics();
|
||||
RCLCPP_INFO(this->get_logger(),
|
||||
"Parameter sync_topics is empty. Auto-discovered %zu color/depth image topics.",
|
||||
sync_topics_.size());
|
||||
} else {
|
||||
RCLCPP_INFO(this->get_logger(), "Using %zu image topics from parameter sync_topics.",
|
||||
sync_topics_.size());
|
||||
}
|
||||
rclcpp::QoS qos(rclcpp::KeepLast(10));
|
||||
|
||||
validate_topics();
|
||||
topic_infos_ = make_topic_infos(sync_topics_);
|
||||
|
||||
RCLCPP_INFO(this->get_logger(),
|
||||
"image sync node started with %zu topic(s):", sync_topics_.size());
|
||||
for (const auto &topic : sync_topics_) {
|
||||
RCLCPP_INFO(this->get_logger(), " %s", topic.c_str());
|
||||
}
|
||||
|
||||
rclcpp::QoS qos{rclcpp::KeepLast(queue_size_)};
|
||||
qos.reliable();
|
||||
|
||||
camera_01_color_sub_.subscribe(this, "/camera_01/color/image_raw", qos.get_rmw_qos_profile());
|
||||
camera_01_depth_sub_.subscribe(this, "/camera_01/depth/image_raw", qos.get_rmw_qos_profile());
|
||||
camera_02_color_sub_.subscribe(this, "/camera_02/color/image_raw", qos.get_rmw_qos_profile());
|
||||
camera_02_depth_sub_.subscribe(this, "/camera_02/depth/image_raw", qos.get_rmw_qos_profile());
|
||||
camera_03_color_sub_.subscribe(this, "/camera_03/color/image_raw", qos.get_rmw_qos_profile());
|
||||
camera_03_depth_sub_.subscribe(this, "/camera_03/depth/image_raw", qos.get_rmw_qos_profile());
|
||||
camera_04_color_sub_.subscribe(this, "/camera_04/color/image_raw", qos.get_rmw_qos_profile());
|
||||
camera_04_depth_sub_.subscribe(this, "/camera_04/depth/image_raw", qos.get_rmw_qos_profile());
|
||||
if (sync_topics_.size() == 1) {
|
||||
single_sub_ = this->create_subscription<Image>(
|
||||
sync_topics_.front(), qos,
|
||||
[this](const ImageConstPtr msg) { this->handle_synced_images({msg}); });
|
||||
} else {
|
||||
for (size_t i = 0; i < sync_topics_.size(); ++i) {
|
||||
subscribers_[i].subscribe(this, sync_topics_[i], qos.get_rmw_qos_profile());
|
||||
}
|
||||
create_synchronizer();
|
||||
}
|
||||
|
||||
sync_ =
|
||||
std::make_shared<Sync>(SyncPolicy(10), camera_01_color_sub_, camera_01_depth_sub_,
|
||||
camera_02_color_sub_, camera_02_depth_sub_, camera_03_color_sub_,
|
||||
camera_03_depth_sub_, camera_04_color_sub_, camera_04_depth_sub_);
|
||||
|
||||
// sync_->setAgePenalty(0.5);
|
||||
sync_->setMaxIntervalDuration(rclcpp::Duration::from_seconds(frame_interval_ / 2));
|
||||
sync_->registerCallback(
|
||||
std::bind(&ImageSyncNode::sync_callback, this, _1, _2, _3, _4, _5, _6, _7, _8));
|
||||
|
||||
RCLCPP_INFO(this->get_logger(), "image sync node started.");
|
||||
|
||||
// start display thread
|
||||
display_thread_ = std::thread(&ImageSyncNode::display_thread_func, this);
|
||||
}
|
||||
|
||||
~ImageSyncNode() {
|
||||
~ImageSyncNode() override {
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(queue_mutex_);
|
||||
stop_display_thread_ = true;
|
||||
@@ -93,109 +105,308 @@ class ImageSyncNode : public rclcpp::Node {
|
||||
}
|
||||
|
||||
private:
|
||||
struct TopicInfo {
|
||||
std::string topic;
|
||||
std::string camera_name;
|
||||
std::string image_type;
|
||||
};
|
||||
|
||||
struct FrameBundle {
|
||||
std::vector<cv::Mat> images;
|
||||
std::vector<double> timestamps;
|
||||
std::vector<TopicInfo> topic_infos;
|
||||
};
|
||||
|
||||
double diff_sum_;
|
||||
size_t count_;
|
||||
double max_diff_;
|
||||
double min_diff_;
|
||||
double last_time_; // FPS
|
||||
double last_time_;
|
||||
uint64_t frame_count_ = 0;
|
||||
uint64_t drop_count_ = 0;
|
||||
double frame_interval_;
|
||||
double fps_cur_ = 0.0;
|
||||
double fps_sum_ = 0.0;
|
||||
double fps_max_ = 0.0;
|
||||
double fps_min_ = std::numeric_limits<double>::max();
|
||||
|
||||
std::vector<std::string> sync_topics_;
|
||||
std::vector<TopicInfo> topic_infos_;
|
||||
int queue_size_;
|
||||
double sync_tolerance_ms_;
|
||||
int auto_discovery_timeout_ms_;
|
||||
int auto_discovery_poll_ms_;
|
||||
|
||||
rclcpp::Subscription<Image>::SharedPtr single_sub_;
|
||||
std::array<message_filters::Subscriber<Image>, 8> subscribers_;
|
||||
std::shared_ptr<void> sync_;
|
||||
|
||||
std::thread display_thread_;
|
||||
struct FrameBundle {
|
||||
std::vector<cv::Mat> images;
|
||||
std::vector<double> timestamps;
|
||||
std::vector<std::string> camera_names;
|
||||
std::vector<std::string> image_types;
|
||||
};
|
||||
std::deque<FrameBundle> frame_queue_;
|
||||
std::mutex queue_mutex_;
|
||||
std::condition_variable queue_cv_;
|
||||
bool stop_display_thread_;
|
||||
|
||||
using SyncPolicy = message_filters::sync_policies::ApproximateTime<
|
||||
sensor_msgs::msg::Image, sensor_msgs::msg::Image, sensor_msgs::msg::Image,
|
||||
sensor_msgs::msg::Image, sensor_msgs::msg::Image, sensor_msgs::msg::Image,
|
||||
sensor_msgs::msg::Image, sensor_msgs::msg::Image>;
|
||||
using Sync = message_filters::Synchronizer<SyncPolicy>;
|
||||
static bool has_suffix(const std::string &str, const std::string &suffix) {
|
||||
return str.size() >= suffix.size() &&
|
||||
str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;
|
||||
}
|
||||
|
||||
message_filters::Subscriber<sensor_msgs::msg::Image> camera_01_color_sub_;
|
||||
message_filters::Subscriber<sensor_msgs::msg::Image> camera_01_depth_sub_;
|
||||
message_filters::Subscriber<sensor_msgs::msg::Image> camera_02_color_sub_;
|
||||
message_filters::Subscriber<sensor_msgs::msg::Image> camera_02_depth_sub_;
|
||||
message_filters::Subscriber<sensor_msgs::msg::Image> camera_03_color_sub_;
|
||||
message_filters::Subscriber<sensor_msgs::msg::Image> camera_03_depth_sub_;
|
||||
message_filters::Subscriber<sensor_msgs::msg::Image> camera_04_color_sub_;
|
||||
message_filters::Subscriber<sensor_msgs::msg::Image> camera_04_depth_sub_;
|
||||
static double stamp_to_seconds(const builtin_interfaces::msg::Time &stamp) {
|
||||
return static_cast<double>(stamp.sec) + static_cast<double>(stamp.nanosec) * 1e-9;
|
||||
}
|
||||
|
||||
std::shared_ptr<Sync> sync_;
|
||||
std::vector<std::string> discover_image_topics() {
|
||||
std::vector<std::string> topics;
|
||||
const auto timeout = std::chrono::milliseconds(std::max(0, auto_discovery_timeout_ms_));
|
||||
const auto poll_interval = std::chrono::milliseconds(std::max(1, auto_discovery_poll_ms_));
|
||||
const auto start = std::chrono::steady_clock::now();
|
||||
|
||||
void sync_callback(const sensor_msgs::msg::Image::ConstSharedPtr &img01_c,
|
||||
const sensor_msgs::msg::Image::ConstSharedPtr &img01_d,
|
||||
const sensor_msgs::msg::Image::ConstSharedPtr &img02_c,
|
||||
const sensor_msgs::msg::Image::ConstSharedPtr &img02_d,
|
||||
const sensor_msgs::msg::Image::ConstSharedPtr &img03_c,
|
||||
const sensor_msgs::msg::Image::ConstSharedPtr &img03_d,
|
||||
const sensor_msgs::msg::Image::ConstSharedPtr &img04_c,
|
||||
const sensor_msgs::msg::Image::ConstSharedPtr &img04_d) {
|
||||
while (true) {
|
||||
const auto names_and_types = this->get_topic_names_and_types();
|
||||
for (const auto &entry : names_and_types) {
|
||||
const auto &topic = entry.first;
|
||||
if (!has_suffix(topic, "/color/image_raw") && !has_suffix(topic, "/depth/image_raw")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const auto &types = entry.second;
|
||||
const bool is_image =
|
||||
std::find(types.begin(), types.end(), "sensor_msgs/msg/Image") != types.end();
|
||||
const bool already_found = std::find(topics.begin(), topics.end(), topic) != topics.end();
|
||||
if (is_image && !already_found) {
|
||||
topics.push_back(topic);
|
||||
}
|
||||
}
|
||||
|
||||
if (std::chrono::steady_clock::now() - start >= timeout) {
|
||||
break;
|
||||
}
|
||||
rclcpp::sleep_for(poll_interval);
|
||||
}
|
||||
|
||||
std::sort(topics.begin(), topics.end());
|
||||
topics.erase(std::unique(topics.begin(), topics.end()), topics.end());
|
||||
return topics;
|
||||
}
|
||||
|
||||
void validate_topics() {
|
||||
if (sync_topics_.empty()) {
|
||||
throw std::runtime_error(
|
||||
"No image topics to synchronize. Set parameter sync_topics or start color/depth cameras "
|
||||
"before this node.");
|
||||
}
|
||||
|
||||
std::vector<std::string> deduplicated_topics;
|
||||
deduplicated_topics.reserve(sync_topics_.size());
|
||||
for (const auto &topic : sync_topics_) {
|
||||
if (topic.empty()) {
|
||||
continue;
|
||||
}
|
||||
if (std::find(deduplicated_topics.begin(), deduplicated_topics.end(), topic) ==
|
||||
deduplicated_topics.end()) {
|
||||
deduplicated_topics.push_back(topic);
|
||||
}
|
||||
}
|
||||
sync_topics_ = std::move(deduplicated_topics);
|
||||
|
||||
if (sync_topics_.empty()) {
|
||||
throw std::runtime_error("Parameter sync_topics only contains empty entries.");
|
||||
}
|
||||
|
||||
if (sync_topics_.size() > 8) {
|
||||
throw std::runtime_error(
|
||||
"Official ROS message_filters::Synchronizer supports at most 9 inputs, and this example "
|
||||
"supports 1-8 image topics. Found " +
|
||||
std::to_string(sync_topics_.size()) +
|
||||
" color/depth image topics. Please pass <= 8 topics with sync_topics or split the sync "
|
||||
"into multiple stages.");
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<TopicInfo> make_topic_infos(const std::vector<std::string> &topics) {
|
||||
std::vector<TopicInfo> infos;
|
||||
infos.reserve(topics.size());
|
||||
for (const auto &topic : topics) {
|
||||
TopicInfo info;
|
||||
info.topic = topic;
|
||||
info.image_type = "image";
|
||||
info.camera_name = topic;
|
||||
|
||||
const auto color_pos = topic.rfind("/color/image_raw");
|
||||
const auto depth_pos = topic.rfind("/depth/image_raw");
|
||||
if (color_pos != std::string::npos) {
|
||||
info.image_type = "color";
|
||||
info.camera_name = topic.substr(0, color_pos);
|
||||
} else if (depth_pos != std::string::npos) {
|
||||
info.image_type = "depth";
|
||||
info.camera_name = topic.substr(0, depth_pos);
|
||||
}
|
||||
|
||||
const auto slash_pos = info.camera_name.find_last_of('/');
|
||||
if (slash_pos != std::string::npos && slash_pos + 1 < info.camera_name.size()) {
|
||||
info.camera_name = info.camera_name.substr(slash_pos + 1);
|
||||
}
|
||||
infos.push_back(info);
|
||||
}
|
||||
return infos;
|
||||
}
|
||||
|
||||
template <typename... MsgPtrs>
|
||||
void sync_callback(const MsgPtrs &...msgs) {
|
||||
handle_synced_images({msgs...});
|
||||
}
|
||||
|
||||
void handle_synced_images(const std::vector<ImageConstPtr> &msgs) {
|
||||
std::vector<cv::Mat> images;
|
||||
std::vector<double> timestamps;
|
||||
std::vector<std::string> camera_names = {"camera_01", "camera_01", "camera_02", "camera_02",
|
||||
"camera_03", "camera_03", "camera_04", "camera_04"};
|
||||
images.reserve(msgs.size());
|
||||
timestamps.reserve(msgs.size());
|
||||
|
||||
std::vector<std::string> image_types = {"color", "depth", "color", "depth",
|
||||
"color", "depth", "color", "depth"};
|
||||
try {
|
||||
images.push_back(cv_bridge::toCvShare(img01_c, "bgr8")->image.clone());
|
||||
images.push_back(cv_bridge::toCvShare(img01_d, "16UC1")->image.clone());
|
||||
images.push_back(cv_bridge::toCvShare(img02_c, "bgr8")->image.clone());
|
||||
images.push_back(cv_bridge::toCvShare(img02_d, "16UC1")->image.clone());
|
||||
images.push_back(cv_bridge::toCvShare(img03_c, "bgr8")->image.clone());
|
||||
images.push_back(cv_bridge::toCvShare(img03_d, "16UC1")->image.clone());
|
||||
images.push_back(cv_bridge::toCvShare(img04_c, "bgr8")->image.clone());
|
||||
images.push_back(cv_bridge::toCvShare(img04_d, "16UC1")->image.clone());
|
||||
|
||||
timestamps = {img01_c->header.stamp.sec + img01_c->header.stamp.nanosec * 1e-9,
|
||||
img01_d->header.stamp.sec + img01_d->header.stamp.nanosec * 1e-9,
|
||||
img02_c->header.stamp.sec + img02_c->header.stamp.nanosec * 1e-9,
|
||||
img02_d->header.stamp.sec + img02_d->header.stamp.nanosec * 1e-9,
|
||||
img03_c->header.stamp.sec + img03_c->header.stamp.nanosec * 1e-9,
|
||||
img03_d->header.stamp.sec + img03_d->header.stamp.nanosec * 1e-9,
|
||||
img04_c->header.stamp.sec + img04_c->header.stamp.nanosec * 1e-9,
|
||||
img04_d->header.stamp.sec + img04_d->header.stamp.nanosec * 1e-9};
|
||||
for (const auto &msg : msgs) {
|
||||
auto cv_image = cv_bridge::toCvShare(msg);
|
||||
images.push_back(cv_image->image.clone());
|
||||
timestamps.push_back(stamp_to_seconds(msg->header.stamp));
|
||||
}
|
||||
} catch (cv_bridge::Exception &e) {
|
||||
RCLCPP_ERROR(this->get_logger(), "cv_bridge exception: %s", e.what());
|
||||
return;
|
||||
}
|
||||
|
||||
// push to display queue (avoid blocking sync callback)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(queue_mutex_);
|
||||
// keep queue bounded to avoid memory blowup, drop oldest if full
|
||||
const size_t max_queue = 3;
|
||||
if (frame_queue_.size() >= max_queue) {
|
||||
frame_queue_.pop_front();
|
||||
}
|
||||
frame_queue_.push_back(
|
||||
FrameBundle{std::move(images), std::move(timestamps), camera_names, image_types});
|
||||
frame_queue_.push_back(FrameBundle{std::move(images), timestamps, topic_infos_});
|
||||
}
|
||||
queue_cv_.notify_one();
|
||||
|
||||
// retrieve copy of timestamps from back of queue
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(queue_mutex_);
|
||||
if (!frame_queue_.empty()) {
|
||||
std::vector<double> ts_copy = frame_queue_.back().timestamps;
|
||||
print_stats(ts_copy);
|
||||
}
|
||||
print_stats(timestamps);
|
||||
}
|
||||
|
||||
void create_synchronizer() {
|
||||
switch (sync_topics_.size()) {
|
||||
case 2:
|
||||
create_synchronizer_2();
|
||||
break;
|
||||
case 3:
|
||||
create_synchronizer_3();
|
||||
break;
|
||||
case 4:
|
||||
create_synchronizer_4();
|
||||
break;
|
||||
case 5:
|
||||
create_synchronizer_5();
|
||||
break;
|
||||
case 6:
|
||||
create_synchronizer_6();
|
||||
break;
|
||||
case 7:
|
||||
create_synchronizer_7();
|
||||
break;
|
||||
case 8:
|
||||
create_synchronizer_8();
|
||||
break;
|
||||
default:
|
||||
throw std::runtime_error("Unsupported sync topic count: " +
|
||||
std::to_string(sync_topics_.size()));
|
||||
}
|
||||
}
|
||||
|
||||
template <typename SyncT>
|
||||
void configure_synchronizer(const std::shared_ptr<SyncT> &sync) {
|
||||
sync->setMaxIntervalDuration(rclcpp::Duration::from_seconds(sync_tolerance_ms_ / 1000.0));
|
||||
sync_ = sync;
|
||||
}
|
||||
|
||||
void create_synchronizer_2() {
|
||||
using Policy = message_filters::sync_policies::ApproximateTime<Image, Image>;
|
||||
using Sync = message_filters::Synchronizer<Policy>;
|
||||
auto sync = std::make_shared<Sync>(Policy(queue_size_), subscribers_[0], subscribers_[1]);
|
||||
sync->registerCallback(
|
||||
std::bind(&ImageSyncNode::sync_callback<ImageConstPtr, ImageConstPtr>, this, _1, _2));
|
||||
configure_synchronizer(sync);
|
||||
}
|
||||
|
||||
void create_synchronizer_3() {
|
||||
using Policy = message_filters::sync_policies::ApproximateTime<Image, Image, Image>;
|
||||
using Sync = message_filters::Synchronizer<Policy>;
|
||||
auto sync = std::make_shared<Sync>(Policy(queue_size_), subscribers_[0], subscribers_[1],
|
||||
subscribers_[2]);
|
||||
sync->registerCallback(
|
||||
std::bind(&ImageSyncNode::sync_callback<ImageConstPtr, ImageConstPtr, ImageConstPtr>, this,
|
||||
_1, _2, _3));
|
||||
configure_synchronizer(sync);
|
||||
}
|
||||
|
||||
void create_synchronizer_4() {
|
||||
using Policy = message_filters::sync_policies::ApproximateTime<Image, Image, Image, Image>;
|
||||
using Sync = message_filters::Synchronizer<Policy>;
|
||||
auto sync = std::make_shared<Sync>(Policy(queue_size_), subscribers_[0], subscribers_[1],
|
||||
subscribers_[2], subscribers_[3]);
|
||||
sync->registerCallback(std::bind(
|
||||
&ImageSyncNode::sync_callback<ImageConstPtr, ImageConstPtr, ImageConstPtr, ImageConstPtr>,
|
||||
this, _1, _2, _3, _4));
|
||||
configure_synchronizer(sync);
|
||||
}
|
||||
|
||||
void create_synchronizer_5() {
|
||||
using Policy =
|
||||
message_filters::sync_policies::ApproximateTime<Image, Image, Image, Image, Image>;
|
||||
using Sync = message_filters::Synchronizer<Policy>;
|
||||
auto sync = std::make_shared<Sync>(Policy(queue_size_), subscribers_[0], subscribers_[1],
|
||||
subscribers_[2], subscribers_[3], subscribers_[4]);
|
||||
sync->registerCallback(
|
||||
std::bind(&ImageSyncNode::sync_callback<ImageConstPtr, ImageConstPtr, ImageConstPtr,
|
||||
ImageConstPtr, ImageConstPtr>,
|
||||
this, _1, _2, _3, _4, _5));
|
||||
configure_synchronizer(sync);
|
||||
}
|
||||
|
||||
void create_synchronizer_6() {
|
||||
using Policy =
|
||||
message_filters::sync_policies::ApproximateTime<Image, Image, Image, Image, Image, Image>;
|
||||
using Sync = message_filters::Synchronizer<Policy>;
|
||||
auto sync =
|
||||
std::make_shared<Sync>(Policy(queue_size_), subscribers_[0], subscribers_[1],
|
||||
subscribers_[2], subscribers_[3], subscribers_[4], subscribers_[5]);
|
||||
sync->registerCallback(
|
||||
std::bind(&ImageSyncNode::sync_callback<ImageConstPtr, ImageConstPtr, ImageConstPtr,
|
||||
ImageConstPtr, ImageConstPtr, ImageConstPtr>,
|
||||
this, _1, _2, _3, _4, _5, _6));
|
||||
configure_synchronizer(sync);
|
||||
}
|
||||
|
||||
void create_synchronizer_7() {
|
||||
using Policy = message_filters::sync_policies::ApproximateTime<Image, Image, Image, Image,
|
||||
Image, Image, Image>;
|
||||
using Sync = message_filters::Synchronizer<Policy>;
|
||||
auto sync = std::make_shared<Sync>(Policy(queue_size_), subscribers_[0], subscribers_[1],
|
||||
subscribers_[2], subscribers_[3], subscribers_[4],
|
||||
subscribers_[5], subscribers_[6]);
|
||||
sync->registerCallback(std::bind(
|
||||
&ImageSyncNode::sync_callback<ImageConstPtr, ImageConstPtr, ImageConstPtr, ImageConstPtr,
|
||||
ImageConstPtr, ImageConstPtr, ImageConstPtr>,
|
||||
this, _1, _2, _3, _4, _5, _6, _7));
|
||||
configure_synchronizer(sync);
|
||||
}
|
||||
|
||||
void create_synchronizer_8() {
|
||||
using Policy = message_filters::sync_policies::ApproximateTime<Image, Image, Image, Image,
|
||||
Image, Image, Image, Image>;
|
||||
using Sync = message_filters::Synchronizer<Policy>;
|
||||
auto sync = std::make_shared<Sync>(Policy(queue_size_), subscribers_[0], subscribers_[1],
|
||||
subscribers_[2], subscribers_[3], subscribers_[4],
|
||||
subscribers_[5], subscribers_[6], subscribers_[7]);
|
||||
sync->registerCallback(std::bind(
|
||||
&ImageSyncNode::sync_callback<ImageConstPtr, ImageConstPtr, ImageConstPtr, ImageConstPtr,
|
||||
ImageConstPtr, ImageConstPtr, ImageConstPtr, ImageConstPtr>,
|
||||
this, _1, _2, _3, _4, _5, _6, _7, _8));
|
||||
configure_synchronizer(sync);
|
||||
}
|
||||
|
||||
void display_thread_func() {
|
||||
while (true) {
|
||||
FrameBundle bundle;
|
||||
@@ -205,64 +416,86 @@ class ImageSyncNode : public rclcpp::Node {
|
||||
if (stop_display_thread_ && frame_queue_.empty()) {
|
||||
return;
|
||||
}
|
||||
// take the latest frame (drop older if several)
|
||||
bundle = std::move(frame_queue_.back());
|
||||
frame_queue_.clear();
|
||||
}
|
||||
// call image_show in this thread
|
||||
image_show(bundle.images, bundle.timestamps, bundle.camera_names, bundle.image_types);
|
||||
image_show(bundle.images, bundle.timestamps, bundle.topic_infos);
|
||||
}
|
||||
}
|
||||
|
||||
void image_show(std::vector<cv::Mat> &images, std::vector<double> ×tamps,
|
||||
std::vector<std::string> &camera_names, std::vector<std::string> &image_types) {
|
||||
void image_show(std::vector<cv::Mat> &images, const std::vector<double> ×tamps,
|
||||
const std::vector<TopicInfo> &topic_infos) {
|
||||
if (images.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
constexpr int margin = 10;
|
||||
constexpr int max_columns = 4;
|
||||
const int columns = std::min<int>(max_columns, static_cast<int>(images.size()));
|
||||
const int rows = static_cast<int>((images.size() + columns - 1) / columns);
|
||||
|
||||
std::vector<cv::Mat> display_images;
|
||||
display_images.reserve(images.size());
|
||||
for (size_t i = 0; i < images.size(); i++) {
|
||||
cv::Mat image;
|
||||
if (images[i].channels() == 1) {
|
||||
cv::Mat tmp;
|
||||
images[i].convertTo(tmp, CV_8U, 255.0 / 10000.0);
|
||||
cv::applyColorMap(tmp, images[i], cv::COLORMAP_JET);
|
||||
cv::applyColorMap(tmp, image, cv::COLORMAP_JET);
|
||||
} else if (images[i].channels() == 3) {
|
||||
image = images[i].clone();
|
||||
} else {
|
||||
cv::cvtColor(images[i], image, cv::COLOR_GRAY2BGR);
|
||||
}
|
||||
// std::string ts_text = "ts: " + std::to_string(timestamps[i]);
|
||||
std::string ts_text =
|
||||
camera_names[i] + " " + image_types[i] + " stamp: " + std::to_string(timestamps[i]);
|
||||
cv::putText(images[i], ts_text, cv::Point(10, 30), cv::FONT_HERSHEY_SIMPLEX, 1.0,
|
||||
|
||||
const std::string text = topic_infos[i].camera_name + " " + topic_infos[i].image_type +
|
||||
" stamp: " + std::to_string(timestamps[i]);
|
||||
cv::putText(image, text, cv::Point(10, 30), cv::FONT_HERSHEY_SIMPLEX, 0.8,
|
||||
cv::Scalar(0, 0, 255), 2);
|
||||
display_images.push_back(std::move(image));
|
||||
}
|
||||
|
||||
int margin = 10;
|
||||
int row1_height = std::max({images[0].rows, images[1].rows, images[2].rows, images[3].rows});
|
||||
int row2_height = std::max({images[4].rows, images[5].rows, images[6].rows, images[7].rows});
|
||||
std::vector<int> column_widths(columns, 0);
|
||||
std::vector<int> row_heights(rows, 0);
|
||||
for (size_t i = 0; i < display_images.size(); ++i) {
|
||||
const int row = static_cast<int>(i) / columns;
|
||||
const int col = static_cast<int>(i) % columns;
|
||||
column_widths[col] = std::max(column_widths[col], display_images[i].cols);
|
||||
row_heights[row] = std::max(row_heights[row], display_images[i].rows);
|
||||
}
|
||||
|
||||
int row1_width = images[0].cols + margin + images[1].cols + margin + images[2].cols + margin +
|
||||
images[3].cols;
|
||||
int row2_width = images[4].cols + margin + images[5].cols + margin + images[6].cols + margin +
|
||||
images[7].cols;
|
||||
int canvas_width = margin * (columns - 1);
|
||||
for (const auto width : column_widths) {
|
||||
canvas_width += width;
|
||||
}
|
||||
|
||||
int canvas_width = std::max(row1_width, row2_width);
|
||||
int canvas_height = row1_height + margin + row2_height;
|
||||
int canvas_height = margin * (rows - 1);
|
||||
for (const auto height : row_heights) {
|
||||
canvas_height += height;
|
||||
}
|
||||
|
||||
cv::Mat canvas(canvas_height, canvas_width, CV_8UC3, cv::Scalar(30, 30, 30));
|
||||
|
||||
int x_offset = 0;
|
||||
int y_offset = 0;
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
images[i].copyTo(canvas(cv::Rect(x_offset, y_offset, images[i].cols, images[i].rows)));
|
||||
x_offset += images[i].cols + margin;
|
||||
for (int row = 0; row < rows; ++row) {
|
||||
int x_offset = 0;
|
||||
for (int col = 0; col < columns; ++col) {
|
||||
const size_t i = static_cast<size_t>(row * columns + col);
|
||||
if (i >= display_images.size()) {
|
||||
break;
|
||||
}
|
||||
display_images[i].copyTo(
|
||||
canvas(cv::Rect(x_offset, y_offset, display_images[i].cols, display_images[i].rows)));
|
||||
x_offset += column_widths[col] + margin;
|
||||
}
|
||||
y_offset += row_heights[row] + margin;
|
||||
}
|
||||
|
||||
x_offset = 0;
|
||||
y_offset = row1_height + margin;
|
||||
for (int i = 4; i < 8; ++i) {
|
||||
images[i].copyTo(canvas(cv::Rect(x_offset, y_offset, images[i].cols, images[i].rows)));
|
||||
x_offset += images[i].cols + margin;
|
||||
}
|
||||
|
||||
int screen_width = 1800;
|
||||
int screen_height = 800;
|
||||
|
||||
double scale_w = static_cast<double>(screen_width) / canvas.cols;
|
||||
double scale_h = static_cast<double>(screen_height) / canvas.rows;
|
||||
double scale = std::min(1.0, std::min(scale_w, scale_h));
|
||||
constexpr int screen_width = 1800;
|
||||
constexpr int screen_height = 800;
|
||||
const double scale_w = static_cast<double>(screen_width) / canvas.cols;
|
||||
const double scale_h = static_cast<double>(screen_height) / canvas.rows;
|
||||
const double scale = std::min(1.0, std::min(scale_w, scale_h));
|
||||
|
||||
cv::Mat display;
|
||||
if (scale < 1.0) {
|
||||
@@ -274,55 +507,50 @@ class ImageSyncNode : public rclcpp::Node {
|
||||
cv::waitKey(1);
|
||||
}
|
||||
|
||||
void print_stats(std::vector<double> ×tamps) {
|
||||
void print_stats(const std::vector<double> ×tamps) {
|
||||
if (timestamps.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::cout << std::fixed;
|
||||
std::cout << "===========================================================" << std::endl;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
std::cout << "Camera0" << i + 1 << " stamp: color= " << std::setprecision(6)
|
||||
<< timestamps[i * 2] << " depth= " << std::setprecision(6) << timestamps[i * 2 + 1]
|
||||
<< " Delay relative to camera01(color): color= " << std::setprecision(3)
|
||||
<< (timestamps[i * 2] - timestamps[0]) * 1000.0 << " ms"
|
||||
<< " depth= " << std::setprecision(3)
|
||||
<< (timestamps[i * 2 + 1] - timestamps[0]) * 1000.0 << " ms" << std::endl;
|
||||
|
||||
const double base_t = timestamps[0];
|
||||
for (size_t i = 0; i < timestamps.size(); ++i) {
|
||||
std::cout << topic_infos_[i].camera_name << " " << topic_infos_[i].image_type
|
||||
<< " stamp: " << std::setprecision(6) << timestamps[i] << " Delay relative to "
|
||||
<< topic_infos_[0].camera_name << " " << topic_infos_[0].image_type << ": "
|
||||
<< std::setprecision(3) << (timestamps[i] - base_t) * 1000.0 << " ms" << std::endl;
|
||||
}
|
||||
|
||||
double cur = 0.0;
|
||||
double base_t = timestamps[0]; // Camera01 color
|
||||
for (size_t i = 0; i < timestamps.size(); ++i) {
|
||||
double diff = std::fabs(timestamps[i] - base_t) * 1000.0;
|
||||
for (const auto timestamp : timestamps) {
|
||||
const double diff = std::fabs(timestamp - base_t) * 1000.0;
|
||||
cur = std::max(cur, diff);
|
||||
}
|
||||
diff_sum_ += cur;
|
||||
count_++;
|
||||
max_diff_ = std::max(max_diff_, cur);
|
||||
min_diff_ = std::min(min_diff_, cur);
|
||||
double avg_diff = diff_sum_ / count_;
|
||||
const double avg_diff = diff_sum_ / count_;
|
||||
|
||||
std::cout << "\nImage Timestamp Difference Statistics" << std::endl;
|
||||
std::cout << "cur: " << cur << " ms"
|
||||
<< " avg: " << avg_diff << " ms"
|
||||
<< " max: " << max_diff_ << " ms"
|
||||
<< " min: " << min_diff_ << " ms" << std::endl;
|
||||
|
||||
// Calculate and display FPS
|
||||
if (last_time_ == 0.0) {
|
||||
last_time_ = base_t;
|
||||
} else {
|
||||
double dt = base_t - last_time_;
|
||||
// if (dt > frame_interval_ * 1.5) {
|
||||
// std::cout << "base_t: " << base_t << " last_time_: " << last_time_ << std::endl;
|
||||
// std::cout << "Frame drop detected! dt: " << dt << " s" << std::endl;
|
||||
// drop_count_ +=
|
||||
// static_cast<uint64_t>(dt / 0.0333) - 1; // Assuming 30 FPS, so frame interval
|
||||
// ~33.3ms
|
||||
// std::cout << "Total dropped frames: " << drop_count_ << std::endl;
|
||||
// }
|
||||
const double dt = base_t - last_time_;
|
||||
fps_cur_ = dt > 0.0 ? 1.0 / dt : fps_cur_;
|
||||
last_time_ = base_t;
|
||||
frame_count_++;
|
||||
fps_sum_ += fps_cur_;
|
||||
fps_max_ = std::max(fps_max_, fps_cur_);
|
||||
fps_min_ = std::min(fps_min_, fps_cur_);
|
||||
double fps_avg = fps_sum_ / frame_count_;
|
||||
const double fps_avg = fps_sum_ / frame_count_;
|
||||
std::cout << "\nFPS Statistics" << std::endl;
|
||||
std::cout << "cur: " << std::setprecision(2) << fps_cur_ << " avg: " << std::setprecision(2)
|
||||
<< fps_avg << " max: " << std::setprecision(2) << fps_max_
|
||||
@@ -333,11 +561,10 @@ class ImageSyncNode : public rclcpp::Node {
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
rclcpp::init(argc, argv);
|
||||
// rclcpp::spin(std::make_shared<ImageSyncNode>(30.0));
|
||||
rclcpp::executors::MultiThreadedExecutor executor;
|
||||
auto node = std::make_shared<ImageSyncNode>(30.0); // Modify according to your actual frame rate
|
||||
auto node = std::make_shared<ImageSyncNode>(30.0);
|
||||
executor.add_node(node);
|
||||
executor.spin();
|
||||
rclcpp::shutdown();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
#define THREAD_NUM 4
|
||||
|
||||
#define OB_ROS_MAJOR_VERSION 2
|
||||
#define OB_ROS_MINOR_VERSION 8
|
||||
#define OB_ROS_PATCH_VERSION 7
|
||||
#define OB_ROS_MINOR_VERSION 9
|
||||
#define OB_ROS_PATCH_VERSION 3
|
||||
|
||||
#ifndef STRINGIFY
|
||||
#define STRINGIFY(arg) #arg
|
||||
@@ -134,18 +134,24 @@ const int32_t GEMINI_336LE_PID = 0x0810; // Gemini 335Le
|
||||
const int32_t CUSTOM_ADVANTECH_GEMINI_336_PID = 0x0816; // Custom Advantech Gemini 336
|
||||
const int32_t CUSTOM_ADVANTECH_GEMINI_336L_PID = 0x0817; // Custom Advantech Gemini 336L
|
||||
const int32_t DABAI_MAX_PID = 0x069a; // dabai max
|
||||
const int32_t DABAI_A_PID = 0x0A12; // DaBai A
|
||||
const int32_t DABAI_AL_PID = 0x0A13; // DaBai AL
|
||||
const int32_t GEMINI_345_PID = 0x0812; // Gemini 345
|
||||
const int32_t GEMINI_345LG_PID = 0x0813; // Gemini 345Lg
|
||||
const int32_t GEMINI_338_PID = 0x0818; // Gemini 338
|
||||
const int32_t GEMINI_435Le_PID = 0x815; // Gemini 435Le
|
||||
const int32_t GEMINI_305_PID = 0x0840; // Gemini 305
|
||||
const int32_t GEMINI_305_PID2 = 0x0841; // Gemini 305
|
||||
const int32_t GEMINI_305G_PID = 0x0842; // Gemini 305g
|
||||
const int32_t GEMINI_309G_PID = 0x0845; // Gemini 309g
|
||||
const int32_t GEMINI_338LG_PID = 0x081A; // Gemini 338Lg
|
||||
const int32_t GEMINI_338LE_PID = 0x081B; // Gemini 338Le
|
||||
const int32_t GEMINI_338L_PID = 0x081C; // Gemini 338L
|
||||
const int32_t GEMINI_331L_PID = 0x081D; // Gemini 331L
|
||||
|
||||
inline bool isGemini305SeriesPID(uint32_t pid) {
|
||||
return pid == GEMINI_305_PID || pid == GEMINI_305_PID2 || pid == GEMINI_305G_PID;
|
||||
return pid == GEMINI_305_PID || pid == GEMINI_305_PID2 || pid == GEMINI_305G_PID ||
|
||||
pid == GEMINI_309G_PID;
|
||||
}
|
||||
|
||||
} // namespace orbbec_camera
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2023 Orbbec 3D Technology, Inc
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
* Copyright (c) 2023 Orbbec 3D Technology, Inc
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
#pragma once
|
||||
#include <message_filters/subscriber.h>
|
||||
#include <message_filters/sync_policies/approximate_time.h>
|
||||
@@ -30,7 +30,7 @@ class D2CViewer {
|
||||
rmw_qos_profile_t depth_qos, bool use_intra_process = false);
|
||||
~D2CViewer();
|
||||
|
||||
void messageCallback(const sensor_msgs::msg::Image::ConstSharedPtr & rgb_msg,
|
||||
void messageCallback(const sensor_msgs::msg::Image::ConstSharedPtr& rgb_msg,
|
||||
const sensor_msgs::msg::Image::ConstSharedPtr& depth_msg);
|
||||
|
||||
private:
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2023 Orbbec 3D Technology, Inc
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
* Copyright (c) 2023 Orbbec 3D Technology, Inc
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
|
||||
#pragma once
|
||||
#include <rclcpp/rclcpp.hpp>
|
||||
|
||||
@@ -20,7 +20,8 @@ namespace orbbec_camera {
|
||||
|
||||
class FrameTimestampCsvLogger {
|
||||
public:
|
||||
FrameTimestampCsvLogger(bool enabled, const std::string &csv_file_path, rclcpp::Logger logger);
|
||||
FrameTimestampCsvLogger(bool drop_log_enabled, const std::string &csv_file_path,
|
||||
rclcpp::Logger logger);
|
||||
|
||||
~FrameTimestampCsvLogger() noexcept;
|
||||
|
||||
@@ -39,6 +40,7 @@ class FrameTimestampCsvLogger {
|
||||
|
||||
void recordPreImagePublish(OBStreamType stream_type, const std::shared_ptr<ob::Frame> &frame,
|
||||
int64_t publish_system_us, int64_t publish_steady_us);
|
||||
void recordImagePublishSkipped(OBStreamType stream_type, const std::shared_ptr<ob::Frame> &frame);
|
||||
|
||||
void shutdown();
|
||||
|
||||
@@ -60,6 +62,7 @@ class FrameTimestampCsvLogger {
|
||||
int64_t sdk_system_ts_us = 0;
|
||||
int64_t arrival_system_us = 0;
|
||||
int64_t arrival_steady_us = 0;
|
||||
int64_t expected_interval_us = 0;
|
||||
std::optional<int64_t> publish_system_us;
|
||||
std::optional<int64_t> publish_steady_us;
|
||||
|
||||
@@ -85,6 +88,10 @@ class FrameTimestampCsvLogger {
|
||||
|
||||
struct PreviousStreamTimestamps {
|
||||
std::optional<int64_t> device_ts_us;
|
||||
std::optional<int64_t> publish_device_ts_us;
|
||||
int64_t expected_interval_us = 0;
|
||||
int64_t dropped_frames = 0;
|
||||
int64_t publish_dropped_frames = 0;
|
||||
std::optional<int64_t> sensor_ts_us;
|
||||
std::optional<int64_t> global_ts_us;
|
||||
std::optional<int64_t> sdk_system_ts_us;
|
||||
@@ -106,9 +113,10 @@ class FrameTimestampCsvLogger {
|
||||
const std::shared_ptr<ob::Frame> &frame,
|
||||
int64_t arrival_system_us, int64_t arrival_steady_us,
|
||||
bool image_publish_expected);
|
||||
void recordPreImagePublishInternal(OBStreamType stream_type,
|
||||
const std::shared_ptr<ob::Frame> &frame,
|
||||
int64_t publish_system_us, int64_t publish_steady_us);
|
||||
void completeImagePublishInternal(OBStreamType stream_type,
|
||||
const std::shared_ptr<ob::Frame> &frame,
|
||||
std::optional<int64_t> publish_system_us,
|
||||
std::optional<int64_t> publish_steady_us);
|
||||
|
||||
void populateArrivalData(StreamState &state, TrackedStream stream,
|
||||
const std::shared_ptr<ob::Frame> &frame, int64_t arrival_system_us,
|
||||
@@ -135,8 +143,10 @@ class FrameTimestampCsvLogger {
|
||||
|
||||
rclcpp::Logger logger_;
|
||||
bool enabled_ = false;
|
||||
bool csv_enabled_ = false;
|
||||
bool drop_log_enabled_ = false;
|
||||
std::atomic_bool shutdown_requested_{false};
|
||||
bool writer_failed_ = false;
|
||||
bool csv_writer_failed_ = false;
|
||||
bool queue_warning_active_ = false;
|
||||
std::string csv_file_path_;
|
||||
std::ofstream csv_stream_;
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2023 Orbbec 3D Technology, Inc
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
* Copyright (c) 2023 Orbbec 3D Technology, Inc
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
#pragma once
|
||||
#include "utils.h"
|
||||
#include <opencv2/opencv.hpp>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2023 Orbbec 3D Technology, Inc
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
* Copyright (c) 2023 Orbbec 3D Technology, Inc
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <rclcpp/rclcpp.hpp>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
@@ -37,8 +39,11 @@
|
||||
#include <std_srvs/srv/set_bool.hpp>
|
||||
#include <std_srvs/srv/empty.hpp>
|
||||
#include <diagnostic_updater/diagnostic_updater.hpp>
|
||||
#include <std_msgs/msg/int32.hpp>
|
||||
|
||||
#include <sensor_msgs/msg/camera_info.hpp>
|
||||
#include <sensor_msgs/msg/compressed_image.hpp>
|
||||
#include <sensor_msgs/msg/image.hpp>
|
||||
#include <camera_info_manager/camera_info_manager.hpp>
|
||||
|
||||
#include <image_publisher/image_publisher.hpp>
|
||||
@@ -50,6 +55,7 @@
|
||||
#include "orbbec_camera_msgs/msg/depth_filter_param.hpp"
|
||||
#include "orbbec_camera_msgs/msg/depth_filter_state.hpp"
|
||||
#include "orbbec_camera_msgs/msg/depth_filters_status.hpp"
|
||||
#include "orbbec_camera_msgs/srv/get_device_config.hpp"
|
||||
#include "orbbec_camera_msgs/srv/get_device_info.hpp"
|
||||
#include "orbbec_camera_msgs/msg/extrinsics.hpp"
|
||||
#include "orbbec_camera_msgs/msg/metadata.hpp"
|
||||
@@ -61,6 +67,7 @@
|
||||
#include "orbbec_camera_msgs/srv/set_string.hpp"
|
||||
#include "orbbec_camera_msgs/srv/set_filter.hpp"
|
||||
#include "orbbec_camera_msgs/srv/set_arrays.hpp"
|
||||
#include "orbbec_camera_msgs/srv/set_stream_profile.hpp"
|
||||
#include "orbbec_camera_msgs/srv/get_user_calib_params.hpp"
|
||||
#include "orbbec_camera_msgs/srv/set_user_calib_params.hpp"
|
||||
#include "orbbec_camera/constants.h"
|
||||
@@ -72,7 +79,7 @@
|
||||
#include "orbbec_camera/fps_delay_status.hpp"
|
||||
#include "orbbec_camera/frame_timestamp_csv_logger.h"
|
||||
#include "jpeg_decoder.h"
|
||||
#include <std_msgs/msg/string.hpp>
|
||||
#include <std_msgs/msg/header.hpp>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -109,6 +116,7 @@
|
||||
#define DEVICE_PATH "/dev/camsync"
|
||||
|
||||
namespace orbbec_camera {
|
||||
using GetDeviceConfig = orbbec_camera_msgs::srv::GetDeviceConfig;
|
||||
using GetDeviceInfo = orbbec_camera_msgs::srv::GetDeviceInfo;
|
||||
using Extrinsics = orbbec_camera_msgs::msg::Extrinsics;
|
||||
using SetInt32 = orbbec_camera_msgs::srv::SetInt32;
|
||||
@@ -119,6 +127,7 @@ using SetBool = std_srvs::srv::SetBool;
|
||||
using GetBool = orbbec_camera_msgs::srv::GetBool;
|
||||
using SetFilter = orbbec_camera_msgs::srv::SetFilter;
|
||||
using SetArrays = orbbec_camera_msgs::srv::SetArrays;
|
||||
using SetStreamProfile = orbbec_camera_msgs::srv::SetStreamProfile;
|
||||
using SetUserCalibParams = orbbec_camera_msgs::srv::SetUserCalibParams;
|
||||
using GetUserCalibParams = orbbec_camera_msgs::srv::GetUserCalibParams;
|
||||
using DepthFilterState = orbbec_camera_msgs::msg::DepthFilterState;
|
||||
@@ -163,7 +172,8 @@ typedef struct {
|
||||
class OBCameraNode {
|
||||
public:
|
||||
OBCameraNode(rclcpp::Node* node, std::shared_ptr<ob::Device> device,
|
||||
std::shared_ptr<Parameters> parameters, bool use_intra_process = false);
|
||||
std::shared_ptr<Parameters> parameters, bool use_intra_process = false,
|
||||
bool is_playback_device = false);
|
||||
|
||||
template <class T>
|
||||
void setAndGetNodeParameter(
|
||||
@@ -190,6 +200,8 @@ class OBCameraNode {
|
||||
|
||||
void startIMU();
|
||||
|
||||
void restartPlaybackStreams();
|
||||
|
||||
int openSocSyncPwmTrigger(uint16_t fps);
|
||||
int closeSocSyncPwmTrigger();
|
||||
void startGmslTrigger();
|
||||
@@ -232,10 +244,61 @@ class OBCameraNode {
|
||||
double timestamp_ = -1; // in nanoseconds
|
||||
};
|
||||
|
||||
struct PendingStreamProfile {
|
||||
stream_index_pair stream_index;
|
||||
int requested_width = 0;
|
||||
int requested_height = 0;
|
||||
int requested_fps = 0;
|
||||
std::shared_ptr<ob::VideoStreamProfile> profile;
|
||||
};
|
||||
|
||||
void setupDevices();
|
||||
|
||||
void loadConfigJson();
|
||||
|
||||
void captureInitialRosParameters();
|
||||
|
||||
bool isLaunchParamProvided(const std::string& param_name) const;
|
||||
|
||||
bool exportConfigJsonToFile(const std::string& file_path, std::string& message);
|
||||
|
||||
void exportConfigJsonIfRequested();
|
||||
|
||||
bool isConfigJsonLoaded() const;
|
||||
|
||||
void syncConfigJsonApplicationConfig();
|
||||
|
||||
void syncApplicationSensorConfigForExport();
|
||||
|
||||
void syncApplicationPointCloudConfigForExport();
|
||||
|
||||
void syncApplicationHdrMergeConfigForExport();
|
||||
|
||||
void syncConfigJsonDeviceSettings();
|
||||
|
||||
void syncConfigJsonFilterSettings(const std::vector<std::shared_ptr<ob::Filter>>& filters,
|
||||
const std::string& sensor_name);
|
||||
|
||||
void setupProfiles();
|
||||
|
||||
std::shared_ptr<ob::VideoStreamProfile> selectVideoStreamProfile(
|
||||
const stream_index_pair& stream_index, int width, int height, int fps, OBFormat format);
|
||||
|
||||
std::optional<stream_index_pair> getImageStreamByName(const std::string& stream_name) const;
|
||||
|
||||
bool validateStreamProfileRequest(const std::shared_ptr<SetStreamProfile::Request>& request,
|
||||
std::vector<PendingStreamProfile>& pending_profiles,
|
||||
std::string& message);
|
||||
|
||||
bool applyStreamProfiles(const std::vector<PendingStreamProfile>& pending_profiles,
|
||||
std::string& message);
|
||||
|
||||
void clearColorFrameQueues();
|
||||
|
||||
void stopColorFrameThreads();
|
||||
|
||||
void setupImageBuffers();
|
||||
|
||||
void updateImageConfig(const stream_index_pair& stream_index);
|
||||
|
||||
void printSensorProfiles(const std::shared_ptr<ob::Sensor>& sensor);
|
||||
@@ -246,6 +309,8 @@ class OBCameraNode {
|
||||
|
||||
void setupTopics();
|
||||
|
||||
void setupImagePublisher(const stream_index_pair& stream_index);
|
||||
|
||||
void setupPipelineConfig();
|
||||
|
||||
void setupDiagnosticUpdater();
|
||||
@@ -262,15 +327,38 @@ class OBCameraNode {
|
||||
|
||||
void setupPublishers();
|
||||
|
||||
void syncSoftwareAlignment();
|
||||
|
||||
void publishDepthFiltersStatus();
|
||||
|
||||
DepthFilterState buildDepthFilterState(const std::string &filter_name, bool enabled,
|
||||
const std::shared_ptr<ob::Filter> &filter) const;
|
||||
void publishLrmObstacleDistance();
|
||||
|
||||
static std::string normalizeDepthFilterName(const std::string &filter_name);
|
||||
DepthFilterState buildDepthFilterState(const std::string& filter_name, bool enabled,
|
||||
const std::shared_ptr<ob::Filter>& filter) const;
|
||||
DepthFilterState buildEnhancedDepthFilterState() const;
|
||||
|
||||
static void appendDepthFilterParam(DepthFilterState &filter_state, const std::string &name,
|
||||
const std::string &value);
|
||||
static std::string normalizeDepthFilterName(const std::string& filter_name);
|
||||
|
||||
static void appendDepthFilterParam(DepthFilterState& filter_state, const std::string& name,
|
||||
const std::string& value);
|
||||
|
||||
void updateDepthFilterEnabledCache(const std::string& filter_name, bool enabled);
|
||||
|
||||
bool applyNamedDepthFilterConfig(
|
||||
const std::string& filter_name, bool enabled,
|
||||
const std::vector<orbbec_camera_msgs::msg::DepthFilterParam>& params, std::string& message);
|
||||
bool applyEnhancedDepthFilterConfig(
|
||||
bool enabled, const std::vector<float>& positional_params,
|
||||
const std::vector<orbbec_camera_msgs::msg::DepthFilterParam>& named_params,
|
||||
std::string& message);
|
||||
bool validateEnhancedDepthFilterConfig(std::string& message) const;
|
||||
bool ensureEnhancedDepthFilter(std::string& message);
|
||||
void applyEnhancedDepthConfidenceThreshold();
|
||||
std::shared_ptr<ob::FrameSet> processEnhancedDepthFilter(
|
||||
const std::shared_ptr<ob::FrameSet>& frame_set);
|
||||
bool convertEnhancedDepthColorFrame(const std::shared_ptr<ob::FrameSet>& frame_set);
|
||||
void setupConfidencePublishers();
|
||||
void publishConfidenceFrame(const std::shared_ptr<ob::Frame>& confidence_frame);
|
||||
|
||||
void setupCameraInfo();
|
||||
|
||||
@@ -291,6 +379,8 @@ class OBCameraNode {
|
||||
|
||||
void setStreamsEnableCallback(const std::shared_ptr<std_srvs::srv::SetBool::Request> request,
|
||||
std::shared_ptr<std_srvs::srv::SetBool::Response> response);
|
||||
void setImageRegistrationModeCallback(const std::shared_ptr<SetString::Request> request,
|
||||
std::shared_ptr<SetString::Response> response);
|
||||
|
||||
void getStreamsEnableCallback(
|
||||
const std::shared_ptr<orbbec_camera_msgs::srv::GetBool::Request> request,
|
||||
@@ -354,6 +444,9 @@ class OBCameraNode {
|
||||
void getDeviceInfoCallback(const std::shared_ptr<GetDeviceInfo::Request>& request,
|
||||
std::shared_ptr<GetDeviceInfo::Response>& response);
|
||||
|
||||
void getDeviceConfigCallback(const std::shared_ptr<GetDeviceConfig::Request>& request,
|
||||
std::shared_ptr<GetDeviceConfig::Response>& response);
|
||||
|
||||
void getSDKVersion(const std::shared_ptr<GetString::Request>& request,
|
||||
std::shared_ptr<GetString::Response>& response);
|
||||
|
||||
@@ -395,6 +488,8 @@ class OBCameraNode {
|
||||
std::shared_ptr<SetInt32::Response>& response);
|
||||
void setDisparitySearchOffsetCallback(const std::shared_ptr<SetInt32::Request>& request,
|
||||
std::shared_ptr<SetInt32::Response>& response);
|
||||
void setSyncIoVoltageLevelCallback(const std::shared_ptr<SetInt32::Request>& request,
|
||||
std::shared_ptr<SetInt32::Response>& response);
|
||||
void setSYNCHostimeCallback(const std::shared_ptr<std_srvs::srv::SetBool::Request>& request,
|
||||
std::shared_ptr<std_srvs::srv::SetBool::Response>& response);
|
||||
void sendSoftwareTriggerCallback(const std::shared_ptr<std_srvs::srv::SetBool::Request>& request,
|
||||
@@ -411,6 +506,9 @@ class OBCameraNode {
|
||||
void switchIRCameraCallback(const std::shared_ptr<SetString::Request>& request,
|
||||
std::shared_ptr<SetString::Response>& response);
|
||||
|
||||
void exportConfigJsonCallback(const std::shared_ptr<SetString::Request>& request,
|
||||
std::shared_ptr<SetString::Response>& response);
|
||||
|
||||
bool writeCustomerData(const std::string& data);
|
||||
|
||||
bool readCustomerData(std::string& out_data);
|
||||
@@ -430,6 +528,9 @@ class OBCameraNode {
|
||||
void setAEStrategyCallback(const std::shared_ptr<SetString::Request>& request,
|
||||
std::shared_ptr<SetString::Response>& response);
|
||||
|
||||
void setStreamProfileCallback(const std::shared_ptr<SetStreamProfile::Request>& request,
|
||||
std::shared_ptr<SetStreamProfile::Response>& response);
|
||||
|
||||
void setUserCalibParamsCallback(const std::shared_ptr<SetUserCalibParams::Request>& request,
|
||||
std::shared_ptr<SetUserCalibParams::Response>& response);
|
||||
|
||||
@@ -452,6 +553,8 @@ class OBCameraNode {
|
||||
|
||||
std::shared_ptr<ob::Frame> processLeftIrFrameFilter(std::shared_ptr<ob::Frame>& frame);
|
||||
|
||||
std::shared_ptr<ob::Frame> processIrFrameFilter(std::shared_ptr<ob::Frame>& frame);
|
||||
|
||||
uint64_t getFrameTimestampUs(const std::shared_ptr<ob::Frame>& frame);
|
||||
|
||||
void onNewFrameSetCallback(std::shared_ptr<ob::FrameSet> frame_set);
|
||||
@@ -459,6 +562,8 @@ class OBCameraNode {
|
||||
std::shared_ptr<ob::Frame> softwareDecodeColorFrame(const std::shared_ptr<ob::Frame>& frame,
|
||||
const stream_index_pair& stream_index);
|
||||
|
||||
bool isColorFrameDecodeRequired(const std::shared_ptr<ob::Frame>& frame) const;
|
||||
|
||||
bool decodeColorFrameToBuffer(const std::shared_ptr<ob::Frame>& frame, uint8_t* buffer);
|
||||
|
||||
std::shared_ptr<ob::Frame> decodeIRMJPGFrame(const std::shared_ptr<ob::Frame>& frame);
|
||||
@@ -498,6 +603,10 @@ class OBCameraNode {
|
||||
|
||||
bool setupFormatConvertType(OBFormat format);
|
||||
bool setupFormatConvertType(OBFormat format, ob::FormatConvertFilter& filter);
|
||||
bool hasCompressedImageSubscriber(const stream_index_pair& stream_index) const;
|
||||
void publishCompressedColorImage(const std::shared_ptr<ob::Frame>& frame,
|
||||
const stream_index_pair& stream_index,
|
||||
const rclcpp::Time& timestamp, const std::string& frame_id);
|
||||
|
||||
orbbec_camera_msgs::msg::IMUInfo createIMUInfo(const stream_index_pair& stream_index);
|
||||
|
||||
@@ -505,14 +614,21 @@ class OBCameraNode {
|
||||
|
||||
static bool isGemini435LePID(uint32_t pid);
|
||||
static bool isPublishMetaData(uint32_t pid);
|
||||
static bool isDabaiASeriesForHwD2C(uint32_t pid);
|
||||
|
||||
static bool isDepthWorkModeDevices(uint32_t pid);
|
||||
static bool isnotLaserDevices(uint32_t pid);
|
||||
|
||||
void setupDepthPostProcessFilter();
|
||||
void setupColorPostProcessFilter();
|
||||
void setupIrPostProcessFilter();
|
||||
void setupRightIrPostProcessFilter();
|
||||
void setupLeftIrPostProcessFilter();
|
||||
void setupUndistortionFilters();
|
||||
bool shouldUseHwD2CColorUndistortion() const;
|
||||
void configureHwD2CColorUndistortion(const std::shared_ptr<ob::Frame>& depth_frame);
|
||||
void applyHwD2CColorUndistortion(std::shared_ptr<ob::FrameSet>& frame_set,
|
||||
const std::shared_ptr<ob::Frame>& depth_frame);
|
||||
|
||||
// interleave AE
|
||||
int init_interleave_hdr_param();
|
||||
@@ -586,6 +702,8 @@ class OBCameraNode {
|
||||
std::map<stream_index_pair, int> rotation_stream_;
|
||||
std::map<stream_index_pair, std::string> stream_name_;
|
||||
std::map<stream_index_pair, std::shared_ptr<image_publisher>> image_publishers_;
|
||||
std::map<stream_index_pair, rclcpp::Publisher<sensor_msgs::msg::CompressedImage>::SharedPtr>
|
||||
compressed_image_publishers_;
|
||||
std::map<stream_index_pair, rclcpp::Publisher<sensor_msgs::msg::CameraInfo>::SharedPtr>
|
||||
camera_info_publishers_;
|
||||
std::map<stream_index_pair, bool> frame_info_logged_;
|
||||
@@ -606,6 +724,7 @@ class OBCameraNode {
|
||||
rclcpp::Service<SetBool>::SharedPtr set_auto_white_balance_srv_;
|
||||
rclcpp::Service<GetString>::SharedPtr get_sdk_version_srv_;
|
||||
rclcpp::Service<SetString>::SharedPtr switch_ir_camera_srv_;
|
||||
rclcpp::Service<SetString>::SharedPtr export_config_json_srv_;
|
||||
rclcpp::Service<SetString>::SharedPtr write_customerdata_srv_;
|
||||
rclcpp::Service<GetString>::SharedPtr read_customerdata_srv_;
|
||||
rclcpp::Service<std_srvs::srv::SetBool>::SharedPtr set_ir_long_exposure_srv_;
|
||||
@@ -613,6 +732,7 @@ class OBCameraNode {
|
||||
set_auto_exposure_srv_;
|
||||
std::map<stream_index_pair, rclcpp::Service<SetArrays>::SharedPtr> set_ae_roi_srv_;
|
||||
rclcpp::Service<GetDeviceInfo>::SharedPtr get_device_srv_;
|
||||
rclcpp::Service<GetDeviceConfig>::SharedPtr get_device_config_srv_;
|
||||
rclcpp::Service<std_srvs::srv::SetBool>::SharedPtr set_laser_enable_srv_;
|
||||
rclcpp::Service<std_srvs::srv::SetBool>::SharedPtr set_ldp_enable_srv_;
|
||||
rclcpp::Service<orbbec_camera_msgs::srv::GetBool>::SharedPtr get_ldp_status_srv_;
|
||||
@@ -632,8 +752,11 @@ class OBCameraNode {
|
||||
rclcpp::Service<GetInt32>::SharedPtr get_point_cloud_decimation_srv_;
|
||||
rclcpp::Service<SetInt32>::SharedPtr set_disparity_range_mode_srv_;
|
||||
rclcpp::Service<SetInt32>::SharedPtr set_disparity_search_offset_srv_;
|
||||
rclcpp::Service<SetInt32>::SharedPtr set_sync_io_voltage_level_srv_;
|
||||
rclcpp::Service<orbbec_camera_msgs::srv::GetBool>::SharedPtr get_streams_enable_srv_;
|
||||
rclcpp::Service<std_srvs::srv::SetBool>::SharedPtr set_streams_enable_srv_;
|
||||
rclcpp::Service<SetString>::SharedPtr set_image_registration_mode_srv_;
|
||||
rclcpp::Service<SetStreamProfile>::SharedPtr set_stream_profile_srv_;
|
||||
rclcpp::Service<GetUserCalibParams>::SharedPtr get_user_calib_params_srv_;
|
||||
rclcpp::Service<SetUserCalibParams>::SharedPtr set_user_calib_params_srv_;
|
||||
rclcpp::Service<SetString>::SharedPtr set_ae_reference_stream_srv_;
|
||||
@@ -690,6 +813,7 @@ class OBCameraNode {
|
||||
int color_ae_roi_bottom_ = -1;
|
||||
int color_exposure_ = -1;
|
||||
int color_gain_ = -1;
|
||||
int color_mjpeg_quality_ = -1;
|
||||
int color_white_balance_ = -1;
|
||||
int color_ae_max_exposure_ = -1;
|
||||
int color_ae_max_gain_ = -1;
|
||||
@@ -730,7 +854,7 @@ class OBCameraNode {
|
||||
int left_ir_sequence_id_filter_id_ = -1;
|
||||
bool enable_frame_sync_ = false;
|
||||
// Only for Gemini2 device
|
||||
std::string disparity_to_depth_mode_ = "HW";
|
||||
std::string disparity_to_depth_mode_;
|
||||
std::string depth_work_mode_;
|
||||
std::string preset_resolution_config_;
|
||||
OBMultiDeviceSyncMode sync_mode_ = OBMultiDeviceSyncMode::OB_MULTI_DEVICE_SYNC_MODE_FREE_RUN;
|
||||
@@ -741,7 +865,7 @@ class OBCameraNode {
|
||||
int trigger_out_delay_us_ = 0;
|
||||
bool trigger_out_enabled_ = false;
|
||||
bool software_trigger_enabled_ = false;
|
||||
int frames_per_trigger_ = 2;
|
||||
int frames_per_trigger_ = 1;
|
||||
bool enable_ptp_config_ = false;
|
||||
std::string depth_precision_str_;
|
||||
OB_DEPTH_PRECISION_LEVEL depth_precision_ = OB_PRECISION_0MM8;
|
||||
@@ -767,6 +891,9 @@ class OBCameraNode {
|
||||
uint8_t* rgb_buffer_ = nullptr;
|
||||
uint8_t* rgb_buffer_left_ = nullptr;
|
||||
uint8_t* rgb_buffer_right_ = nullptr;
|
||||
size_t rgb_buffer_size_ = 0;
|
||||
size_t rgb_buffer_left_size_ = 0;
|
||||
size_t rgb_buffer_right_size_ = 0;
|
||||
bool is_left_color_frame_decoded_ = false;
|
||||
bool is_right_color_frame_decoded_ = false;
|
||||
bool is_color_frame_decoded_ = false;
|
||||
@@ -774,6 +901,7 @@ class OBCameraNode {
|
||||
// For color
|
||||
std::queue<std::shared_ptr<ob::FrameSet>> color_frame_queue_;
|
||||
std::shared_ptr<std::thread> colorFrameThread_ = nullptr;
|
||||
std::atomic_bool stop_color_frame_threads_{false};
|
||||
std::mutex color_frame_queue_lock_;
|
||||
std::condition_variable color_frame_queue_cv_;
|
||||
|
||||
@@ -806,20 +934,23 @@ class OBCameraNode {
|
||||
bool enable_spatial_filter_ = true;
|
||||
bool enable_temporal_filter_ = false;
|
||||
bool enable_hole_filling_filter_ = false;
|
||||
bool enable_edge_noise_removal_filter_ = false;
|
||||
bool enable_spatial_fast_filter_ = false;
|
||||
bool enable_spatial_moderate_filter_ = false;
|
||||
bool enable_false_positive_filter_ = false;
|
||||
bool enable_mgc_noise_removal_filter_ = false;
|
||||
bool enable_lut_noise_removal_filter_ = false;
|
||||
bool enable_disp_outliers_filter_ = false;
|
||||
|
||||
// filter params
|
||||
int disp_outliers_filter_search_mode_ = -1;
|
||||
int decimation_filter_scale_ = -1;
|
||||
int sequence_id_filter_id_ = -1;
|
||||
int threshold_filter_max_ = -1;
|
||||
int threshold_filter_min_ = -1;
|
||||
float hardware_noise_removal_filter_threshold_ = -1.0;
|
||||
int noise_removal_filter_min_diff_ = 256;
|
||||
int noise_removal_filter_max_size_ = 80;
|
||||
int noise_removal_filter_min_diff_ = -1;
|
||||
int noise_removal_filter_max_size_ = -1;
|
||||
float spatial_filter_alpha_ = -1;
|
||||
int spatial_filter_diff_threshold_ = -1;
|
||||
int spatial_filter_magnitude_ = -1;
|
||||
@@ -838,16 +969,25 @@ class OBCameraNode {
|
||||
int spatial_moderate_filter_radius_ = -1;
|
||||
int spatial_moderate_filter_diff_threshold_ = -1;
|
||||
int spatial_moderate_filter_magnitude_ = -1;
|
||||
rclcpp::Publisher<std_msgs::msg::String>::SharedPtr filter_status_pub_;
|
||||
rclcpp::Publisher<DepthFiltersStatus>::SharedPtr depth_filters_status_pub_;
|
||||
nlohmann::json filter_status_;
|
||||
std::string align_mode_ = "HW";
|
||||
std::unique_ptr<diagnostic_updater::Updater> diagnostic_updater_ = nullptr;
|
||||
double diagnostic_period_ = 1.0;
|
||||
double diagnostic_period_ = 0.0;
|
||||
bool enable_laser_ = false;
|
||||
std::unique_ptr<ob::Align> align_filter_ = nullptr;
|
||||
std::shared_ptr<ob::EnhancedDepthFilter> enhanced_depth_filter_ = nullptr;
|
||||
ob::FormatConvertFilter enhanced_depth_format_convert_filter_;
|
||||
std::mutex enhanced_depth_filter_mutex_;
|
||||
std::atomic_bool enable_enhanced_depth_{false};
|
||||
std::string enhanced_depth_model_path_;
|
||||
int enhanced_depth_confidence_threshold_ = -1;
|
||||
rclcpp::Publisher<sensor_msgs::msg::Image>::SharedPtr confidence_image_publisher_;
|
||||
cv::Mat confidence_image_;
|
||||
OBStreamType align_target_stream_ = OB_STREAM_COLOR;
|
||||
bool retry_on_usb3_detection_failure_ = false;
|
||||
bool config_json_loaded_ = false;
|
||||
std::unordered_set<std::string> initial_ros_params_;
|
||||
std::atomic_bool is_camera_node_initialized_{false};
|
||||
int laser_energy_level_ = -1;
|
||||
ob::PointCloudFilter depth_point_cloud_filter_;
|
||||
@@ -866,70 +1006,81 @@ class OBCameraNode {
|
||||
int min_depth_limit_ = 0;
|
||||
int max_depth_limit_ = 0;
|
||||
std::string time_domain_ = "global"; // device, system, global
|
||||
bool enable_frame_timestamp_csv_ = false;
|
||||
bool enable_frame_drop_log_ = false;
|
||||
std::string frame_timestamp_csv_file_;
|
||||
std::unique_ptr<FrameTimestampCsvLogger> frame_timestamp_csv_logger_;
|
||||
std::string exposure_range_mode_ = "default";
|
||||
std::string exposure_range_mode_;
|
||||
std::string load_config_json_file_path_ = "";
|
||||
std::string export_config_json_file_path_ = "";
|
||||
// soft ware trigger
|
||||
rclcpp::TimerBase::SharedPtr software_trigger_timer_;
|
||||
rclcpp::TimerBase::SharedPtr lrm_obstacle_distance_timer_;
|
||||
rclcpp::TimerBase::SharedPtr diagnostic_timer_;
|
||||
rclcpp::Publisher<std_msgs::msg::Int32>::SharedPtr lrm_obstacle_distance_pub_;
|
||||
std::mutex diagnostic_mutex_;
|
||||
std::condition_variable diagnostic_cv_;
|
||||
bool diagnostic_running_ = false;
|
||||
std::chrono::milliseconds software_trigger_period_{33};
|
||||
bool enable_lrm_obstacle_distance_publish_ = false;
|
||||
double lrm_obstacle_distance_publish_rate_ = 10.0;
|
||||
bool enable_heartbeat_ = false;
|
||||
bool enable_firmware_log_ = false;
|
||||
bool enable_color_undistortion_ = false;
|
||||
std::shared_ptr<image_publisher> color_undistortion_publisher_;
|
||||
rclcpp::Publisher<sensor_msgs::msg::CameraInfo>::SharedPtr
|
||||
color_undistortion_camera_info_publisher_;
|
||||
bool enable_fps_boost_ = false;
|
||||
std::map<stream_index_pair, bool> enable_undistortion_;
|
||||
std::shared_ptr<ob::UnDistortionFilter> hw_d2c_color_undistortion_filter_;
|
||||
bool hw_d2c_color_undistortion_configured_ = false;
|
||||
bool has_first_color_frame_ = false;
|
||||
bool use_intra_process_ = false;
|
||||
// True when device_ is an ob::PlaybackDevice. Real-device-only hardware
|
||||
// tuning (heartbeat, USB3 retry, laser, sync config, etc.) is skipped in
|
||||
// setupDevices() for playback devices since those SDK components aren't
|
||||
// registered for a recorded .bag file.
|
||||
bool is_playback_device_ = false;
|
||||
std::string cloud_frame_id_;
|
||||
std::mutex depth_filter_mutex_;
|
||||
std::vector<std::shared_ptr<ob::Filter>> depth_filter_list_;
|
||||
std::vector<std::shared_ptr<ob::Filter>> color_filter_list_;
|
||||
std::vector<std::shared_ptr<ob::Filter>> left_color_filter_list_;
|
||||
std::vector<std::shared_ptr<ob::Filter>> right_color_filter_list_;
|
||||
std::vector<std::shared_ptr<ob::Filter>> ir_filter_list_;
|
||||
std::vector<std::shared_ptr<ob::Filter>> left_ir_filter_list_;
|
||||
std::vector<std::shared_ptr<ob::Filter>> right_ir_filter_list_;
|
||||
|
||||
// interleave AE
|
||||
std::string interleave_ae_mode_ = "hdr"; // hdr or laser
|
||||
std::string interleave_ae_mode_; // hdr or laser
|
||||
bool interleave_frame_enable_ = false;
|
||||
bool interleave_skip_enable_ = false;
|
||||
int interleave_skip_index_ = 1;
|
||||
int interleave_skip_index_ = -1;
|
||||
|
||||
// hdr and laser interleave params
|
||||
int hdr_index1_laser_control_ = 1;
|
||||
int hdr_index1_depth_exposure_ = 1;
|
||||
int hdr_index1_depth_gain_ = 16;
|
||||
int hdr_index1_ir_brightness_ = 30;
|
||||
int hdr_index1_ir_ae_max_exposure_ = 30458;
|
||||
int hdr_index0_laser_control_ = 1;
|
||||
int hdr_index0_depth_exposure_ = 7500;
|
||||
int hdr_index0_depth_gain_ = 16;
|
||||
int hdr_index0_ir_brightness_ = 90;
|
||||
int hdr_index0_ir_ae_max_exposure_ = 30458;
|
||||
int hdr_index1_laser_control_ = -1;
|
||||
int hdr_index1_depth_exposure_ = -1;
|
||||
int hdr_index1_depth_gain_ = -1;
|
||||
int hdr_index1_ir_brightness_ = -1;
|
||||
int hdr_index1_ir_ae_max_exposure_ = -1;
|
||||
int hdr_index0_laser_control_ = -1;
|
||||
int hdr_index0_depth_exposure_ = -1;
|
||||
int hdr_index0_depth_gain_ = -1;
|
||||
int hdr_index0_ir_brightness_ = -1;
|
||||
int hdr_index0_ir_ae_max_exposure_ = -1;
|
||||
|
||||
int laser_index1_laser_control_ = 0;
|
||||
int laser_index1_depth_exposure_ = 3000;
|
||||
int laser_index1_depth_gain_ = 16;
|
||||
int laser_index1_ir_brightness_ = 60;
|
||||
int laser_index1_ir_ae_max_exposure_ = 7000;
|
||||
int laser_index0_laser_control_ = 1;
|
||||
int laser_index0_depth_exposure_ = 3000;
|
||||
int laser_index0_depth_gain_ = 16;
|
||||
int laser_index0_ir_brightness_ = 60;
|
||||
int laser_index0_ir_ae_max_exposure_ = 17000;
|
||||
int laser_index1_laser_control_ = -1;
|
||||
int laser_index1_depth_exposure_ = -1;
|
||||
int laser_index1_depth_gain_ = -1;
|
||||
int laser_index1_ir_brightness_ = -1;
|
||||
int laser_index1_ir_ae_max_exposure_ = -1;
|
||||
int laser_index0_laser_control_ = -1;
|
||||
int laser_index0_depth_exposure_ = -1;
|
||||
int laser_index0_depth_gain_ = -1;
|
||||
int laser_index0_ir_brightness_ = -1;
|
||||
int laser_index0_ir_ae_max_exposure_ = -1;
|
||||
|
||||
int disparity_range_mode_ = -1;
|
||||
int disparity_search_offset_ = -1;
|
||||
bool disparity_offset_config_ = false;
|
||||
int offset_index0_ = -1;
|
||||
int offset_index1_ = -1;
|
||||
int sync_io_voltage_level_ = -1;
|
||||
|
||||
std::string frame_aggregate_mode_ = "ANY"; // # full_frame, color_frame, ANY or disable
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
#include <std_srvs/srv/empty.hpp>
|
||||
#include <backward_ros/backward.hpp>
|
||||
#include "libobsensor/hpp/Device.hpp"
|
||||
#include "libobsensor/hpp/RecordPlayback.hpp"
|
||||
#include "orbbec_camera_msgs/srv/set_bag_recording.hpp"
|
||||
|
||||
namespace orbbec_camera {
|
||||
|
||||
@@ -57,6 +59,10 @@ class OBCameraNodeDriver : public rclcpp::Node {
|
||||
|
||||
void initializeDevice(const std::shared_ptr<ob::Device>& device);
|
||||
|
||||
void initializeBagPlayback();
|
||||
|
||||
void exportBagPresetJson(const std::string& bag_path);
|
||||
|
||||
void startDevice(const std::shared_ptr<ob::DeviceList>& list);
|
||||
|
||||
void connectNetDevice(const std::string& net_device_ip, int net_device_port);
|
||||
@@ -77,6 +83,10 @@ class OBCameraNodeDriver : public rclcpp::Node {
|
||||
|
||||
void rebootDeviceCallback(const std::shared_ptr<std_srvs::srv::Empty::Request> request,
|
||||
std::shared_ptr<std_srvs::srv::Empty::Response> response);
|
||||
|
||||
void setBagRecordingCallback(
|
||||
const std::shared_ptr<orbbec_camera_msgs::srv::SetBagRecording::Request> request,
|
||||
std::shared_ptr<orbbec_camera_msgs::srv::SetBagRecording::Response> response);
|
||||
void presetUpdateCallback(bool firstCall, OBFwUpdateState state, const char* message,
|
||||
uint8_t percent);
|
||||
void updatePresetFirmware(std::string path);
|
||||
@@ -87,6 +97,8 @@ class OBCameraNodeDriver : public rclcpp::Node {
|
||||
|
||||
OBDeviceAccessMode stringToAccessMode(const std::string& mode_str);
|
||||
std::string accessModeToString(OBDeviceAccessMode mode);
|
||||
OBClockType timestampClockTypeFromString(const std::string& clock_type_str);
|
||||
std::string timestampClockTypeToString(OBClockType clock_type);
|
||||
|
||||
private:
|
||||
const rclcpp::NodeOptions node_options_;
|
||||
@@ -131,8 +143,11 @@ class OBCameraNodeDriver : public rclcpp::Node {
|
||||
int connection_delay_ = 100;
|
||||
bool enable_sync_host_time_ = true;
|
||||
std::chrono::milliseconds time_sync_period_{6000};
|
||||
std::string timestamp_clock_type_str_;
|
||||
std::string preset_firmware_path_;
|
||||
rclcpp::Service<std_srvs::srv::Empty>::SharedPtr reboot_device_srv_ = nullptr;
|
||||
rclcpp::Service<orbbec_camera_msgs::srv::SetBagRecording>::SharedPtr set_bag_recording_srv_ =
|
||||
nullptr;
|
||||
std::chrono::time_point<std::chrono::system_clock> start_time_;
|
||||
std::string extension_path_;
|
||||
static backward::SignalHandling sh; // for stack trace
|
||||
@@ -140,6 +155,7 @@ class OBCameraNodeDriver : public rclcpp::Node {
|
||||
std::atomic<bool> firmware_update_success_{false};
|
||||
std::atomic<bool> need_reupdate_{false};
|
||||
std::atomic<bool> is_reupdating_{false}; // Flag to track if we're in reupdate process
|
||||
std::atomic<bool> delay_stream_start_after_reconnect_{false};
|
||||
rclcpp::TimerBase::SharedPtr device_status_timer_ = nullptr;
|
||||
int device_status_interval_hz = 2; // 2Hz
|
||||
rclcpp::Publisher<orbbec_camera_msgs::msg::DeviceStatus>::SharedPtr device_status_pub_ = nullptr;
|
||||
@@ -152,5 +168,13 @@ class OBCameraNodeDriver : public rclcpp::Node {
|
||||
std::string force_ip_gateway_; // e.g. "192.168.1.1"
|
||||
std::atomic<bool> force_ip_success_{false};
|
||||
std::string device_type_;
|
||||
// bag recording
|
||||
std::string bag_record_filename_;
|
||||
bool bag_record_compression_ = true;
|
||||
std::shared_ptr<ob::RecordDevice> record_device_ = nullptr;
|
||||
// bag playback
|
||||
std::string bag_filename_;
|
||||
bool bag_loop_ = false;
|
||||
std::shared_ptr<ob::PlaybackDevice> playback_device_ = nullptr;
|
||||
};
|
||||
} // namespace orbbec_camera
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2023 Orbbec 3D Technology, Inc
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
* Copyright (c) 2023 Orbbec 3D Technology, Inc
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "jpeg_decoder.h"
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2023 Orbbec 3D Technology, Inc
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
* Copyright (c) 2023 Orbbec 3D Technology, Inc
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
|
||||
#pragma once
|
||||
#include <rclcpp/rclcpp.hpp>
|
||||
|
||||
@@ -71,20 +71,21 @@ inline std::string formatObErrorWithStatus(const ob::Error& e) {
|
||||
RCLCPP_ERROR(logger_, "Unknown exception in %s at line %d", __FUNCTION__, __LINE__); \
|
||||
}
|
||||
|
||||
#define TRY_TO_SET_PROPERTY(func, property, value) \
|
||||
try { \
|
||||
device_->func(property, value); \
|
||||
} catch (const ob::Error& e) { \
|
||||
RCLCPP_ERROR_STREAM(logger_, "Failed to set " << property << " to " << value << " in " \
|
||||
<< __FUNCTION__ << " at line " << __LINE__ \
|
||||
<< ": " << orbbec_camera::formatObErrorWithStatus(e)); \
|
||||
} catch (const std::exception& e) { \
|
||||
RCLCPP_ERROR_STREAM(logger_, "Failed to set " << property << " to " << value << " in " \
|
||||
<< __FUNCTION__ << " at line " << __LINE__ \
|
||||
<< ": " << e.what()); \
|
||||
} catch (...) { \
|
||||
RCLCPP_ERROR_STREAM(logger_, "Failed to set " << property << " to " << value << " in " \
|
||||
<< __FUNCTION__ << " at line " << __LINE__); \
|
||||
#define TRY_TO_SET_PROPERTY(func, property, value) \
|
||||
try { \
|
||||
device_->func(property, value); \
|
||||
} catch (const ob::Error& e) { \
|
||||
RCLCPP_ERROR_STREAM(logger_, "Failed to set " << property << " to " << value << " in " \
|
||||
<< __FUNCTION__ << " at line " << __LINE__ \
|
||||
<< ": " \
|
||||
<< orbbec_camera::formatObErrorWithStatus(e)); \
|
||||
} catch (const std::exception& e) { \
|
||||
RCLCPP_ERROR_STREAM(logger_, "Failed to set " << property << " to " << value << " in " \
|
||||
<< __FUNCTION__ << " at line " << __LINE__ \
|
||||
<< ": " << e.what()); \
|
||||
} catch (...) { \
|
||||
RCLCPP_ERROR_STREAM(logger_, "Failed to set " << property << " to " << value << " in " \
|
||||
<< __FUNCTION__ << " at line " << __LINE__); \
|
||||
}
|
||||
|
||||
// Macros for checking conditions and comparing values
|
||||
@@ -166,10 +167,9 @@ std::string getObSDKVersion();
|
||||
|
||||
OBLogSeverity obLogSeverityFromString(const std::string_view& log_level);
|
||||
|
||||
std::string getRosLogDirectory();
|
||||
std::string getObSdkLogDirectory();
|
||||
|
||||
std::string configureObSdkLoggerForTool(const std::string& tool_name,
|
||||
const std::string& log_level);
|
||||
std::string configureObSdkLoggerForTool(const std::string& tool_name, const std::string& log_level);
|
||||
|
||||
OBFormat OBFormatFromString(const std::string& format);
|
||||
|
||||
|
||||
@@ -17,6 +17,9 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('serial_number', default_value=''),
|
||||
DeclareLaunchArgument('usb_port', default_value=''),
|
||||
DeclareLaunchArgument('device_num', default_value='1'),
|
||||
DeclareLaunchArgument('bag_record_filename', default_value=''),
|
||||
DeclareLaunchArgument('bag_filename', default_value=''),
|
||||
DeclareLaunchArgument('bag_loop', default_value='false'),
|
||||
DeclareLaunchArgument('vendor_id', default_value='0x2bc5'),
|
||||
DeclareLaunchArgument('product_id', default_value=''),
|
||||
DeclareLaunchArgument('enable_point_cloud', default_value='true'),
|
||||
@@ -61,15 +64,19 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('tf_publish_rate', default_value='0.0'),
|
||||
DeclareLaunchArgument('ir_info_url', default_value=''),
|
||||
DeclareLaunchArgument('color_info_url', default_value=''),
|
||||
DeclareLaunchArgument('log_level', default_value='none'),
|
||||
DeclareLaunchArgument('log_level', default_value='info'),
|
||||
DeclareLaunchArgument('log_file_name', default_value=''),
|
||||
DeclareLaunchArgument('enable_publish_extrinsic', default_value='false'),
|
||||
DeclareLaunchArgument('enable_d2c_viewer', default_value='false'),
|
||||
DeclareLaunchArgument('enable_ldp', default_value='true'),
|
||||
DeclareLaunchArgument('ordered_pc', default_value='false'),
|
||||
DeclareLaunchArgument('use_hardware_time', default_value='false'),
|
||||
DeclareLaunchArgument('enable_frame_timestamp_csv', default_value='false'),
|
||||
DeclareLaunchArgument('timestamp_clock_type', default_value=''), # realtime or monotonic, default is realtime.
|
||||
DeclareLaunchArgument('enable_frame_drop_log', default_value='false'),
|
||||
DeclareLaunchArgument('frame_timestamp_csv_file', default_value=''),
|
||||
DeclareLaunchArgument('enable_color_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_depth_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_ir_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_depth_scale', default_value='true'),
|
||||
DeclareLaunchArgument('align_mode', default_value='HW'),
|
||||
DeclareLaunchArgument('laser_energy_level', default_value='-1'),
|
||||
|
||||
@@ -17,6 +17,9 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument("serial_number", default_value=""),
|
||||
DeclareLaunchArgument("usb_port", default_value=""),
|
||||
DeclareLaunchArgument("device_num", default_value="1"),
|
||||
DeclareLaunchArgument("bag_record_filename", default_value=""),
|
||||
DeclareLaunchArgument("bag_filename", default_value=""),
|
||||
DeclareLaunchArgument("bag_loop", default_value="false"),
|
||||
DeclareLaunchArgument("uvc_backend", default_value="libuvc"), # libuvc or v4l2
|
||||
DeclareLaunchArgument("product_id", default_value=""),
|
||||
DeclareLaunchArgument("enable_point_cloud", default_value="true"),
|
||||
@@ -73,7 +76,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument("tf_publish_rate", default_value="0.0"),
|
||||
DeclareLaunchArgument("ir_info_url", default_value=""),
|
||||
DeclareLaunchArgument("color_info_url", default_value=""),
|
||||
DeclareLaunchArgument("log_level", default_value="none"),
|
||||
DeclareLaunchArgument("log_level", default_value="info"),
|
||||
DeclareLaunchArgument("log_file_name", default_value=""),
|
||||
DeclareLaunchArgument("enable_publish_extrinsic", default_value="false"),
|
||||
DeclareLaunchArgument("enable_frame_sync", default_value="true"),
|
||||
@@ -105,8 +108,12 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument("enable_heartbeat", default_value="false"),
|
||||
DeclareLaunchArgument("enable_firmware_log", default_value="false"),
|
||||
DeclareLaunchArgument("time_domain", default_value="global"),
|
||||
DeclareLaunchArgument('enable_frame_timestamp_csv', default_value='false'),
|
||||
DeclareLaunchArgument("timestamp_clock_type", default_value=""), # realtime or monotonic, default is realtime.
|
||||
DeclareLaunchArgument('enable_frame_drop_log', default_value='false'),
|
||||
DeclareLaunchArgument('frame_timestamp_csv_file', default_value=''),
|
||||
DeclareLaunchArgument('enable_color_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_depth_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_ir_undistortion', default_value='false'),
|
||||
]
|
||||
|
||||
# Node configuration
|
||||
|
||||
@@ -42,7 +42,7 @@ def load_parameters(context, args):
|
||||
if config_file_path:
|
||||
yaml_params = load_yaml(config_file_path)
|
||||
default_params = merge_params(default_params, yaml_params)
|
||||
skip_convert = {'config_file_path', 'usb_port', 'serial_number'}
|
||||
skip_convert = {'config_file_path', 'usb_port', 'serial_number', 'bag_record_filename', 'bag_filename'}
|
||||
|
||||
result = {}
|
||||
for key, value in default_params.items():
|
||||
@@ -74,6 +74,9 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('serial_number', default_value=''),
|
||||
DeclareLaunchArgument('usb_port', default_value=''),
|
||||
DeclareLaunchArgument('device_num', default_value='1'),
|
||||
DeclareLaunchArgument('bag_record_filename', default_value=''),
|
||||
DeclareLaunchArgument('bag_filename', default_value=''),
|
||||
DeclareLaunchArgument('bag_loop', default_value='false'),
|
||||
DeclareLaunchArgument('upgrade_firmware', default_value=''),
|
||||
DeclareLaunchArgument('preset_firmware_path', default_value=''),
|
||||
DeclareLaunchArgument('load_config_json_file_path', default_value=''),
|
||||
@@ -151,7 +154,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('tf_publish_rate', default_value='0.0'),
|
||||
DeclareLaunchArgument('ir_info_url', default_value=''),
|
||||
DeclareLaunchArgument('color_info_url', default_value=''),
|
||||
DeclareLaunchArgument('log_level', default_value='none'),
|
||||
DeclareLaunchArgument('log_level', default_value='info'),
|
||||
DeclareLaunchArgument('log_file_name', default_value=''),
|
||||
DeclareLaunchArgument('enable_publish_extrinsic', default_value='false'),
|
||||
DeclareLaunchArgument('enable_d2c_viewer', default_value='false'),
|
||||
@@ -164,7 +167,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('trigger2image_delay_us', default_value='0'),
|
||||
DeclareLaunchArgument('trigger_out_delay_us', default_value='0'),
|
||||
DeclareLaunchArgument('trigger_out_enabled', default_value='true'),
|
||||
DeclareLaunchArgument('frames_per_trigger', default_value='2'),
|
||||
DeclareLaunchArgument('frames_per_trigger', default_value='1'),
|
||||
DeclareLaunchArgument('software_trigger_period', default_value='33'), # ms
|
||||
DeclareLaunchArgument('enable_frame_sync', default_value='true'),
|
||||
DeclareLaunchArgument('ordered_pc', default_value='false'),
|
||||
@@ -207,9 +210,13 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('enable_sync_host_time', default_value='false'),
|
||||
DeclareLaunchArgument('time_sync_period', default_value='6.0'), # seconds
|
||||
DeclareLaunchArgument('time_domain', default_value='global'),# global, device, system
|
||||
DeclareLaunchArgument('enable_frame_timestamp_csv', default_value='false'),
|
||||
DeclareLaunchArgument('timestamp_clock_type', default_value=''),# realtime or monotonic, default is realtime.
|
||||
DeclareLaunchArgument('enable_frame_drop_log', default_value='false'),
|
||||
DeclareLaunchArgument('frame_timestamp_csv_file', default_value=''),
|
||||
DeclareLaunchArgument('enable_color_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_depth_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_left_ir_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_right_ir_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('config_file_path', default_value=''),
|
||||
DeclareLaunchArgument('enable_heartbeat', default_value='false'),
|
||||
DeclareLaunchArgument('enable_firmware_log', default_value='false'),
|
||||
|
||||
@@ -42,7 +42,7 @@ def load_parameters(context, args):
|
||||
if config_file_path:
|
||||
yaml_params = load_yaml(config_file_path)
|
||||
default_params = merge_params(default_params, yaml_params)
|
||||
skip_convert = {'config_file_path', 'usb_port', 'serial_number'}
|
||||
skip_convert = {'config_file_path', 'usb_port', 'serial_number', 'bag_record_filename', 'bag_filename'}
|
||||
|
||||
result = {}
|
||||
for key, value in default_params.items():
|
||||
@@ -74,6 +74,9 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('serial_number', default_value=''),
|
||||
DeclareLaunchArgument('usb_port', default_value=''),
|
||||
DeclareLaunchArgument('device_num', default_value='1'),
|
||||
DeclareLaunchArgument('bag_record_filename', default_value=''),
|
||||
DeclareLaunchArgument('bag_filename', default_value=''),
|
||||
DeclareLaunchArgument('bag_loop', default_value='false'),
|
||||
DeclareLaunchArgument('upgrade_firmware', default_value=''),
|
||||
DeclareLaunchArgument('preset_firmware_path', default_value=''),
|
||||
DeclareLaunchArgument('load_config_json_file_path', default_value=''),
|
||||
@@ -151,7 +154,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('tf_publish_rate', default_value='0.0'),
|
||||
DeclareLaunchArgument('ir_info_url', default_value=''),
|
||||
DeclareLaunchArgument('color_info_url', default_value=''),
|
||||
DeclareLaunchArgument('log_level', default_value='none'),
|
||||
DeclareLaunchArgument('log_level', default_value='info'),
|
||||
DeclareLaunchArgument('log_file_name', default_value=''),
|
||||
DeclareLaunchArgument('enable_publish_extrinsic', default_value='false'),
|
||||
DeclareLaunchArgument('enable_d2c_viewer', default_value='false'),
|
||||
@@ -164,7 +167,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('trigger2image_delay_us', default_value='0'),
|
||||
DeclareLaunchArgument('trigger_out_delay_us', default_value='0'),
|
||||
DeclareLaunchArgument('trigger_out_enabled', default_value='true'),
|
||||
DeclareLaunchArgument('frames_per_trigger', default_value='2'),
|
||||
DeclareLaunchArgument('frames_per_trigger', default_value='1'),
|
||||
DeclareLaunchArgument('software_trigger_period', default_value='33'), # ms
|
||||
DeclareLaunchArgument('enable_frame_sync', default_value='true'),
|
||||
DeclareLaunchArgument('ordered_pc', default_value='false'),
|
||||
@@ -209,9 +212,13 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('enable_sync_host_time', default_value='false'),
|
||||
DeclareLaunchArgument('time_sync_period', default_value='6.0'), # seconds
|
||||
DeclareLaunchArgument('time_domain', default_value='global'),# global, device, system
|
||||
DeclareLaunchArgument('enable_frame_timestamp_csv', default_value='false'),
|
||||
DeclareLaunchArgument('timestamp_clock_type', default_value=''),# realtime or monotonic, default is realtime.
|
||||
DeclareLaunchArgument('enable_frame_drop_log', default_value='false'),
|
||||
DeclareLaunchArgument('frame_timestamp_csv_file', default_value=''),
|
||||
DeclareLaunchArgument('enable_color_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_depth_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_left_ir_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_right_ir_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('config_file_path', default_value=''),
|
||||
DeclareLaunchArgument('enable_heartbeat', default_value='false'),
|
||||
DeclareLaunchArgument('enable_firmware_log', default_value='false'),
|
||||
|
||||
@@ -17,6 +17,9 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('serial_number', default_value=''),
|
||||
DeclareLaunchArgument('usb_port', default_value=''),
|
||||
DeclareLaunchArgument('device_num', default_value='1'),
|
||||
DeclareLaunchArgument('bag_record_filename', default_value=''),
|
||||
DeclareLaunchArgument('bag_filename', default_value=''),
|
||||
DeclareLaunchArgument('bag_loop', default_value='false'),
|
||||
DeclareLaunchArgument('vendor_id', default_value='0x2bc5'),
|
||||
DeclareLaunchArgument('product_id', default_value=''),
|
||||
DeclareLaunchArgument('enable_point_cloud', default_value='true'),
|
||||
@@ -71,7 +74,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('tf_publish_rate', default_value='0.0'),
|
||||
DeclareLaunchArgument('ir_info_url', default_value=''),
|
||||
DeclareLaunchArgument('color_info_url', default_value=''),
|
||||
DeclareLaunchArgument('log_level', default_value='none'),
|
||||
DeclareLaunchArgument('log_level', default_value='info'),
|
||||
DeclareLaunchArgument('log_file_name', default_value=''),
|
||||
DeclareLaunchArgument('enable_publish_extrinsic', default_value='false'),
|
||||
DeclareLaunchArgument('enable_soft_filter', default_value='true'),
|
||||
@@ -82,8 +85,12 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('enable_lut_noise_removal_filter', default_value='false'),
|
||||
DeclareLaunchArgument('ordered_pc', default_value='false'),
|
||||
DeclareLaunchArgument('use_hardware_time', default_value='false'),
|
||||
DeclareLaunchArgument('enable_frame_timestamp_csv', default_value='false'),
|
||||
DeclareLaunchArgument('timestamp_clock_type', default_value=''), # realtime or monotonic, default is realtime.
|
||||
DeclareLaunchArgument('enable_frame_drop_log', default_value='false'),
|
||||
DeclareLaunchArgument('frame_timestamp_csv_file', default_value=''),
|
||||
DeclareLaunchArgument('enable_color_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_depth_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_ir_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_depth_scale', default_value='true'),
|
||||
DeclareLaunchArgument('align_mode', default_value='HW'),
|
||||
DeclareLaunchArgument('laser_energy_level', default_value='-1'),
|
||||
|
||||
@@ -17,6 +17,9 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('serial_number', default_value=''),
|
||||
DeclareLaunchArgument('usb_port', default_value=''),
|
||||
DeclareLaunchArgument('device_num', default_value='1'),
|
||||
DeclareLaunchArgument('bag_record_filename', default_value=''),
|
||||
DeclareLaunchArgument('bag_filename', default_value=''),
|
||||
DeclareLaunchArgument('bag_loop', default_value='false'),
|
||||
DeclareLaunchArgument('vendor_id', default_value='0x2bc5'),
|
||||
DeclareLaunchArgument('product_id', default_value=''),
|
||||
DeclareLaunchArgument('enable_point_cloud', default_value='true'),
|
||||
@@ -31,20 +34,34 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('color_fps', default_value='25'),
|
||||
DeclareLaunchArgument('color_format', default_value='MJPG'),
|
||||
DeclareLaunchArgument('enable_color', default_value='true'),
|
||||
DeclareLaunchArgument('flip_color', default_value='false'),
|
||||
DeclareLaunchArgument('color_flip', default_value='false'),
|
||||
DeclareLaunchArgument('color_mirror', default_value='false'),
|
||||
DeclareLaunchArgument('color_rotation', default_value='-1'),
|
||||
DeclareLaunchArgument('color_qos', default_value='default'),
|
||||
DeclareLaunchArgument('color_camera_info_qos', default_value='default'),
|
||||
DeclareLaunchArgument('enable_color_auto_exposure_priority', default_value='false'),
|
||||
DeclareLaunchArgument('enable_color_auto_exposure', default_value='true'),
|
||||
DeclareLaunchArgument('color_exposure', default_value='-1'),
|
||||
DeclareLaunchArgument('color_gain', default_value='-1'),
|
||||
DeclareLaunchArgument('color_brightness', default_value='-1'),
|
||||
DeclareLaunchArgument('enable_color_auto_white_balance', default_value='true'),
|
||||
DeclareLaunchArgument('color_white_balance', default_value='-1'),
|
||||
DeclareLaunchArgument('color_sharpness', default_value='-1'),
|
||||
DeclareLaunchArgument('color_gamma', default_value='-1'),
|
||||
DeclareLaunchArgument('color_saturation', default_value='-1'),
|
||||
DeclareLaunchArgument('color_contrast', default_value='-1'),
|
||||
DeclareLaunchArgument('color_backlight_compensation', default_value='-1'),
|
||||
DeclareLaunchArgument('color_powerline_freq', default_value=''),
|
||||
DeclareLaunchArgument('depth_width', default_value='640'),
|
||||
DeclareLaunchArgument('depth_height', default_value='400'),
|
||||
DeclareLaunchArgument('depth_fps', default_value='10'),
|
||||
DeclareLaunchArgument('depth_format', default_value='Y12'),
|
||||
DeclareLaunchArgument('enable_depth', default_value='true'),
|
||||
DeclareLaunchArgument('flip_depth', default_value='false'),
|
||||
DeclareLaunchArgument('depth_flip', default_value='false'),
|
||||
DeclareLaunchArgument('depth_mirror', default_value='false'),
|
||||
DeclareLaunchArgument('depth_rotation', default_value='-1'),
|
||||
DeclareLaunchArgument('depth_exposure', default_value='-1'),
|
||||
DeclareLaunchArgument('depth_gain', default_value='-1'),
|
||||
DeclareLaunchArgument('depth_qos', default_value='default'),
|
||||
DeclareLaunchArgument('depth_camera_info_qos', default_value='default'),
|
||||
# /config/depthfilter/Openni_device.json,need config path.
|
||||
@@ -54,7 +71,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('ir_fps', default_value='10'),
|
||||
DeclareLaunchArgument('ir_format', default_value='Y10'),
|
||||
DeclareLaunchArgument('enable_ir', default_value='true'),
|
||||
DeclareLaunchArgument('flip_ir', default_value='false'),
|
||||
DeclareLaunchArgument('ir_flip', default_value='false'),
|
||||
DeclareLaunchArgument('ir_qos', default_value='default'),
|
||||
DeclareLaunchArgument('ir_camera_info_qos', default_value='default'),
|
||||
DeclareLaunchArgument('enable_ir_auto_exposure', default_value='true'),
|
||||
@@ -65,21 +82,47 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('tf_publish_rate', default_value='0.0'),
|
||||
DeclareLaunchArgument('ir_info_url', default_value=''),
|
||||
DeclareLaunchArgument('color_info_url', default_value=''),
|
||||
DeclareLaunchArgument('log_level', default_value='none'),
|
||||
DeclareLaunchArgument('log_level', default_value='info'),
|
||||
DeclareLaunchArgument('log_file_name', default_value=''),
|
||||
DeclareLaunchArgument('enable_publish_extrinsic', default_value='false'),
|
||||
DeclareLaunchArgument('enable_d2c_viewer', default_value='false'),
|
||||
DeclareLaunchArgument('enable_soft_filter', default_value='true'),
|
||||
DeclareLaunchArgument('enable_soft_filter', default_value='true'),
|
||||
DeclareLaunchArgument('soft_filter_max_diff', default_value='-1'),
|
||||
DeclareLaunchArgument('soft_filter_speckle_size', default_value='-1'),
|
||||
DeclareLaunchArgument('enable_noise_removal_filter', default_value='true'),
|
||||
DeclareLaunchArgument('noise_removal_filter_min_diff', default_value='256'),
|
||||
DeclareLaunchArgument('noise_removal_filter_max_size', default_value='80'),
|
||||
DeclareLaunchArgument('enable_mgc_noise_removal_filter', default_value='false'),
|
||||
DeclareLaunchArgument('enable_lut_noise_removal_filter', default_value='false'),
|
||||
DeclareLaunchArgument('enable_disp_outliers_filter', default_value='false'),
|
||||
DeclareLaunchArgument('disp_outliers_filter_search_mode', default_value=''), # FULL or OFFSET_80
|
||||
DeclareLaunchArgument('enable_edge_noise_removal_filter', default_value='false'),
|
||||
DeclareLaunchArgument('enable_spatial_fast_filter', default_value='false'),
|
||||
DeclareLaunchArgument('spatial_fast_filter_radius', default_value='-1'),
|
||||
DeclareLaunchArgument('enable_spatial_moderate_filter', default_value='false'),
|
||||
DeclareLaunchArgument('spatial_moderate_filter_diff_threshold', default_value='-1'),
|
||||
DeclareLaunchArgument('spatial_moderate_filter_magnitude', default_value='-1'),
|
||||
DeclareLaunchArgument('spatial_moderate_filter_radius', default_value='-1'),
|
||||
DeclareLaunchArgument('enable_spatial_filter', default_value='false'),
|
||||
DeclareLaunchArgument('spatial_filter_alpha', default_value='-1.0'),
|
||||
DeclareLaunchArgument('spatial_filter_diff_threshold', default_value='-1'),
|
||||
DeclareLaunchArgument('spatial_filter_magnitude', default_value='-1'),
|
||||
DeclareLaunchArgument('spatial_filter_radius', default_value='-1'),
|
||||
DeclareLaunchArgument('enable_temporal_filter', default_value='false'),
|
||||
DeclareLaunchArgument('temporal_filter_diff_threshold', default_value='-1.0'),
|
||||
DeclareLaunchArgument('temporal_filter_weight', default_value='-1.0'),
|
||||
DeclareLaunchArgument('enable_hole_filling_filter', default_value='false'),
|
||||
DeclareLaunchArgument('hole_filling_filter_mode', default_value=''),
|
||||
DeclareLaunchArgument('enable_threshold_filter', default_value='true'),
|
||||
DeclareLaunchArgument('threshold_filter_max', default_value='-1'),
|
||||
DeclareLaunchArgument('threshold_filter_min', default_value='-1'),
|
||||
DeclareLaunchArgument('use_hardware_time', default_value='false'),
|
||||
DeclareLaunchArgument('enable_frame_timestamp_csv', default_value='false'),
|
||||
DeclareLaunchArgument('timestamp_clock_type', default_value=''), # realtime or monotonic, default is realtime.
|
||||
DeclareLaunchArgument('enable_frame_drop_log', default_value='false'),
|
||||
DeclareLaunchArgument('frame_timestamp_csv_file', default_value=''),
|
||||
DeclareLaunchArgument('enable_color_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_depth_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_ir_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('align_mode', default_value='HW'),
|
||||
DeclareLaunchArgument('laser_energy_level', default_value='-1'),
|
||||
DeclareLaunchArgument('enable_ldp', default_value='true'),
|
||||
DeclareLaunchArgument('enable_heartbeat', default_value='false'),
|
||||
DeclareLaunchArgument('enable_firmware_log', default_value='false'),
|
||||
]
|
||||
|
||||
@@ -17,6 +17,9 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument("serial_number", default_value=""),
|
||||
DeclareLaunchArgument("usb_port", default_value=""),
|
||||
DeclareLaunchArgument("device_num", default_value="1"),
|
||||
DeclareLaunchArgument("bag_record_filename", default_value=""),
|
||||
DeclareLaunchArgument("bag_filename", default_value=""),
|
||||
DeclareLaunchArgument("bag_loop", default_value="false"),
|
||||
DeclareLaunchArgument("product_id", default_value=""),
|
||||
DeclareLaunchArgument("enable_point_cloud", default_value="true"),
|
||||
DeclareLaunchArgument("cloud_frame_id", default_value=""),
|
||||
@@ -70,7 +73,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument("tf_publish_rate", default_value="0.0"),
|
||||
DeclareLaunchArgument("ir_info_url", default_value=""),
|
||||
DeclareLaunchArgument("color_info_url", default_value=""),
|
||||
DeclareLaunchArgument("log_level", default_value="none"),
|
||||
DeclareLaunchArgument("log_level", default_value="info"),
|
||||
DeclareLaunchArgument("log_file_name", default_value=""),
|
||||
DeclareLaunchArgument("enable_publish_extrinsic", default_value="false"),
|
||||
DeclareLaunchArgument("enable_d2c_viewer", default_value="false"),
|
||||
@@ -83,8 +86,12 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument("enable_heartbeat", default_value="false"),
|
||||
DeclareLaunchArgument("enable_firmware_log", default_value="false"),
|
||||
DeclareLaunchArgument("time_domain", default_value="device"),
|
||||
DeclareLaunchArgument('enable_frame_timestamp_csv', default_value='false'),
|
||||
DeclareLaunchArgument("timestamp_clock_type", default_value=""), # realtime or monotonic, default is realtime.
|
||||
DeclareLaunchArgument('enable_frame_drop_log', default_value='false'),
|
||||
DeclareLaunchArgument('frame_timestamp_csv_file', default_value=''),
|
||||
DeclareLaunchArgument('enable_color_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_depth_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_ir_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('device_preset', default_value='Custom'),
|
||||
]
|
||||
|
||||
|
||||
@@ -17,6 +17,9 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument("serial_number", default_value=""),
|
||||
DeclareLaunchArgument("usb_port", default_value=""),
|
||||
DeclareLaunchArgument("device_num", default_value="1"),
|
||||
DeclareLaunchArgument("bag_record_filename", default_value=""),
|
||||
DeclareLaunchArgument("bag_filename", default_value=""),
|
||||
DeclareLaunchArgument("bag_loop", default_value="false"),
|
||||
DeclareLaunchArgument("uvc_backend", default_value="libuvc"), # libuvc or v4l2
|
||||
DeclareLaunchArgument("product_id", default_value=""),
|
||||
DeclareLaunchArgument("enable_point_cloud", default_value="false"),
|
||||
@@ -73,7 +76,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument("tf_publish_rate", default_value="0.0"),
|
||||
DeclareLaunchArgument("ir_info_url", default_value=""),
|
||||
DeclareLaunchArgument("color_info_url", default_value=""),
|
||||
DeclareLaunchArgument("log_level", default_value="none"),
|
||||
DeclareLaunchArgument("log_level", default_value="info"),
|
||||
DeclareLaunchArgument("log_file_name", default_value=""),
|
||||
DeclareLaunchArgument("enable_publish_extrinsic", default_value="false"),
|
||||
DeclareLaunchArgument("enable_d2c_viewer", default_value="false"),
|
||||
@@ -111,8 +114,12 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument("enable_heartbeat", default_value="false"),
|
||||
DeclareLaunchArgument("enable_firmware_log", default_value="false"),
|
||||
DeclareLaunchArgument("time_domain", default_value="global"),
|
||||
DeclareLaunchArgument('enable_frame_timestamp_csv', default_value='false'),
|
||||
DeclareLaunchArgument("timestamp_clock_type", default_value=""), # realtime or monotonic, default is realtime.
|
||||
DeclareLaunchArgument('enable_frame_drop_log', default_value='false'),
|
||||
DeclareLaunchArgument('frame_timestamp_csv_file', default_value=''),
|
||||
DeclareLaunchArgument('enable_color_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_depth_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_ir_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('device_preset', default_value='Custom'),
|
||||
]
|
||||
|
||||
|
||||
@@ -17,6 +17,9 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument("serial_number", default_value=""),
|
||||
DeclareLaunchArgument("usb_port", default_value=""),
|
||||
DeclareLaunchArgument("device_num", default_value="1"),
|
||||
DeclareLaunchArgument("bag_record_filename", default_value=""),
|
||||
DeclareLaunchArgument("bag_filename", default_value=""),
|
||||
DeclareLaunchArgument("bag_loop", default_value="false"),
|
||||
DeclareLaunchArgument("uvc_backend", default_value="libuvc"), # libuvc or v4l2
|
||||
DeclareLaunchArgument("product_id", default_value=""),
|
||||
DeclareLaunchArgument("enable_point_cloud", default_value="true"),
|
||||
@@ -79,7 +82,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument("enumerate_net_device", default_value="true"),
|
||||
DeclareLaunchArgument("net_device_ip", default_value=""),
|
||||
DeclareLaunchArgument("net_device_port", default_value="0"),
|
||||
DeclareLaunchArgument("log_level", default_value="none"),
|
||||
DeclareLaunchArgument("log_level", default_value="info"),
|
||||
DeclareLaunchArgument("log_file_name", default_value=""),
|
||||
DeclareLaunchArgument("enable_publish_extrinsic", default_value="false"),
|
||||
DeclareLaunchArgument("enable_d2c_viewer", default_value="false"),
|
||||
@@ -117,8 +120,12 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument("enable_heartbeat", default_value="false"),
|
||||
DeclareLaunchArgument("enable_firmware_log", default_value="false"),
|
||||
DeclareLaunchArgument("time_domain", default_value="global"),
|
||||
DeclareLaunchArgument('enable_frame_timestamp_csv', default_value='false'),
|
||||
DeclareLaunchArgument("timestamp_clock_type", default_value=""), # realtime or monotonic, default is realtime.
|
||||
DeclareLaunchArgument('enable_frame_drop_log', default_value='false'),
|
||||
DeclareLaunchArgument('frame_timestamp_csv_file', default_value=''),
|
||||
DeclareLaunchArgument('enable_color_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_depth_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('enable_ir_undistortion', default_value='false'),
|
||||
DeclareLaunchArgument('device_preset', default_value='Custom'),
|
||||
|
||||
# Force IP parameters
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user