diff --git a/.gitignore b/.gitignore index ef33f5a4..cb3d6897 100644 --- a/.gitignore +++ b/.gitignore @@ -142,8 +142,8 @@ dist/ downloads/ eggs/ .eggs/ -lib/ -lib64/ +# lib/ +# lib64/ parts/ sdist/ var/ @@ -400,11 +400,11 @@ mono_crash.* [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ +# x64/ +# x86/ +# [Ww][Ii][Nn]32/ +# [Aa][Rr][Mm]/ +# [Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ diff --git a/orbbec_camera/SDK/include/libobsensor/h/Property.h b/orbbec_camera/SDK/include/libobsensor/h/Property.h index f5250b33..2d00f182 100644 --- a/orbbec_camera/SDK/include/libobsensor/h/Property.h +++ b/orbbec_camera/SDK/include/libobsensor/h/Property.h @@ -746,6 +746,11 @@ typedef enum { */ OB_PROP_SDK_IR_RIGHT_FRAME_UNPACK_BOOL = 3012, + /** + * @brief Read the current network bandwidth type of the network device, whether it is Gigabit Ethernet or Fast Ethernet, such as G335LE. + */ + OB_PROP_NETWORK_BANDWIDTH_TYPE_INT = 3027, + /** * @brief Calibration JSON file read from device (Femto Mega, read only) */ diff --git a/orbbec_camera/SDK/include/libobsensor/hpp/Filter.hpp b/orbbec_camera/SDK/include/libobsensor/hpp/Filter.hpp index d124c35e..88afc1f7 100644 --- a/orbbec_camera/SDK/include/libobsensor/hpp/Filter.hpp +++ b/orbbec_camera/SDK/include/libobsensor/hpp/Filter.hpp @@ -503,7 +503,7 @@ private: std::map sequenceIdList_{ { 0.f, "all" }, { 1.f, "1" } }; OBSequenceIdItem *outputSequenceIdList_ = nullptr; - void initSeqenceIdList() { + void initSequenceIdList() { outputSequenceIdList_ = new OBSequenceIdItem[sequenceIdList_.size()]; int i = 0; @@ -521,7 +521,7 @@ public: auto impl = ob_create_filter("SequenceIdFilter", &error); Error::handle(&error); init(impl); - initSeqenceIdList(); + initSequenceIdList(); } virtual ~SequenceIdFilter() noexcept { diff --git a/orbbec_camera/SDK/include/libobsensor/hpp/Pipeline.hpp b/orbbec_camera/SDK/include/libobsensor/hpp/Pipeline.hpp index 7a1f4ebd..28936bda 100644 --- a/orbbec_camera/SDK/include/libobsensor/hpp/Pipeline.hpp +++ b/orbbec_camera/SDK/include/libobsensor/hpp/Pipeline.hpp @@ -387,7 +387,7 @@ public: /** * @brief Get the stream profile list of supported depth-to-color alignments * - * @param colorProfile The color stream profile, witch is the target stream profile for the depth-to-color alignment. + * @param colorProfile The color stream profile, which is the target stream profile for the depth-to-color alignment. * @param alignMode The alignment mode. * * @attention Currently, only ALIGN_D2C_HW_MODE supported. For other align modes, please using the AlignFilter interface. @@ -449,4 +449,3 @@ public: }; } // namespace ob - diff --git a/orbbec_camera/SDK/lib/arm64/OrbbecSDKConfig-release.cmake b/orbbec_camera/SDK/lib/arm64/OrbbecSDKConfig-release.cmake index dbad6a87..abca438e 100644 --- a/orbbec_camera/SDK/lib/arm64/OrbbecSDKConfig-release.cmake +++ b/orbbec_camera/SDK/lib/arm64/OrbbecSDKConfig-release.cmake @@ -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" - IMPORTED_SONAME_RELEASE "libOrbbecSDK.so" + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.1.1" + 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" ) +list(APPEND _cmake_import_check_files_for_ob::OrbbecSDK "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.1.1" ) # Commands beyond this point should not need to know the version. set(CMAKE_IMPORT_FILE_VERSION) diff --git a/orbbec_camera/SDK/lib/arm64/extensions/filters/libFilterProcessor.so b/orbbec_camera/SDK/lib/arm64/extensions/filters/libFilterProcessor.so index c7ee22bb..0c65057d 100644 Binary files a/orbbec_camera/SDK/lib/arm64/extensions/filters/libFilterProcessor.so and b/orbbec_camera/SDK/lib/arm64/extensions/filters/libFilterProcessor.so differ diff --git a/orbbec_camera/SDK/lib/arm64/extensions/filters/libob_priv_filter.so b/orbbec_camera/SDK/lib/arm64/extensions/filters/libob_priv_filter.so index 83d8b2c8..b8a31309 100644 Binary files a/orbbec_camera/SDK/lib/arm64/extensions/filters/libob_priv_filter.so and b/orbbec_camera/SDK/lib/arm64/extensions/filters/libob_priv_filter.so differ diff --git a/orbbec_camera/SDK/lib/arm64/extensions/firmwareupdater/libfirmwareupdater.so b/orbbec_camera/SDK/lib/arm64/extensions/firmwareupdater/libfirmwareupdater.so index a7dec724..d2f7a92d 100644 Binary files a/orbbec_camera/SDK/lib/arm64/extensions/firmwareupdater/libfirmwareupdater.so and b/orbbec_camera/SDK/lib/arm64/extensions/firmwareupdater/libfirmwareupdater.so differ diff --git a/orbbec_camera/SDK/lib/arm64/extensions/frameprocessor/libob_frame_processor.so b/orbbec_camera/SDK/lib/arm64/extensions/frameprocessor/libob_frame_processor.so index 79bdedde..0edf062e 100644 Binary files a/orbbec_camera/SDK/lib/arm64/extensions/frameprocessor/libob_frame_processor.so and b/orbbec_camera/SDK/lib/arm64/extensions/frameprocessor/libob_frame_processor.so differ diff --git a/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so deleted file mode 100644 index af8eaefd..00000000 Binary files a/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so and /dev/null differ diff --git a/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so new file mode 120000 index 00000000..1e0e3c31 --- /dev/null +++ b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so @@ -0,0 +1 @@ +libOrbbecSDK.so.2 \ No newline at end of file diff --git a/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.2 b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.2 new file mode 120000 index 00000000..66e64377 --- /dev/null +++ b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.2 @@ -0,0 +1 @@ +libOrbbecSDK.so.2.1.1 \ No newline at end of file diff --git a/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.2.1.1 b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.2.1.1 new file mode 100644 index 00000000..3ef3fbcf Binary files /dev/null and b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.2.1.1 differ diff --git a/orbbec_camera/SDK/lib/x64/OrbbecSDKConfig-release.cmake b/orbbec_camera/SDK/lib/x64/OrbbecSDKConfig-release.cmake index dbad6a87..abca438e 100644 --- a/orbbec_camera/SDK/lib/x64/OrbbecSDKConfig-release.cmake +++ b/orbbec_camera/SDK/lib/x64/OrbbecSDKConfig-release.cmake @@ -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" - IMPORTED_SONAME_RELEASE "libOrbbecSDK.so" + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.1.1" + 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" ) +list(APPEND _cmake_import_check_files_for_ob::OrbbecSDK "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.1.1" ) # Commands beyond this point should not need to know the version. set(CMAKE_IMPORT_FILE_VERSION) diff --git a/orbbec_camera/SDK/lib/x64/extensions/filters/libFilterProcessor.so b/orbbec_camera/SDK/lib/x64/extensions/filters/libFilterProcessor.so index 4c904543..47293bdc 100644 Binary files a/orbbec_camera/SDK/lib/x64/extensions/filters/libFilterProcessor.so and b/orbbec_camera/SDK/lib/x64/extensions/filters/libFilterProcessor.so differ diff --git a/orbbec_camera/SDK/lib/x64/extensions/filters/libob_priv_filter.so b/orbbec_camera/SDK/lib/x64/extensions/filters/libob_priv_filter.so index 88bc5ce2..accbdb4b 100644 Binary files a/orbbec_camera/SDK/lib/x64/extensions/filters/libob_priv_filter.so and b/orbbec_camera/SDK/lib/x64/extensions/filters/libob_priv_filter.so differ diff --git a/orbbec_camera/SDK/lib/x64/extensions/firmwareupdater/libfirmwareupdater.so b/orbbec_camera/SDK/lib/x64/extensions/firmwareupdater/libfirmwareupdater.so index d45350dd..ef381c54 100644 Binary files a/orbbec_camera/SDK/lib/x64/extensions/firmwareupdater/libfirmwareupdater.so and b/orbbec_camera/SDK/lib/x64/extensions/firmwareupdater/libfirmwareupdater.so differ diff --git a/orbbec_camera/SDK/lib/x64/extensions/frameprocessor/libob_frame_processor.so b/orbbec_camera/SDK/lib/x64/extensions/frameprocessor/libob_frame_processor.so index fb90e6b6..7285c132 100644 Binary files a/orbbec_camera/SDK/lib/x64/extensions/frameprocessor/libob_frame_processor.so and b/orbbec_camera/SDK/lib/x64/extensions/frameprocessor/libob_frame_processor.so differ diff --git a/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so deleted file mode 100644 index f2adde2b..00000000 Binary files a/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so and /dev/null differ diff --git a/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so new file mode 120000 index 00000000..1e0e3c31 --- /dev/null +++ b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so @@ -0,0 +1 @@ +libOrbbecSDK.so.2 \ No newline at end of file diff --git a/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.2 b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.2 new file mode 120000 index 00000000..66e64377 --- /dev/null +++ b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.2 @@ -0,0 +1 @@ +libOrbbecSDK.so.2.1.1 \ No newline at end of file diff --git a/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.2.1.1 b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.2.1.1 new file mode 100644 index 00000000..18799864 Binary files /dev/null and b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.2.1.1 differ diff --git a/orbbec_camera/config/OrbbecSDKConfig.xml b/orbbec_camera/config/OrbbecSDKConfig.xml deleted file mode 100644 index 4db6b390..00000000 --- a/orbbec_camera/config/OrbbecSDKConfig.xml +++ /dev/null @@ -1,1605 +0,0 @@ - - - - 1.1 - - - - - 5 - - 3 - - - - 100 - - 3 - - false - - - - - true - - 2048 - - 10 - - 10 - - - - false - - 1000 - - 100 - - - - - - - - true - - - true - - false - - 1920 - - 1080 - - 30 - - MJPG - ]]> - - - - - 0 - - false - - - - - - false - - - Auto - - - - V4L2 - - - - 640 - - 576 - - 30 - - Y16 - - 0 - - 5000 - - 0 - - 5000 - - - - - 1920 - - 1080 - - 30 - - MJPG - - 0 - - 5000 - - 0 - - 5000 - - - - - 640 - - 576 - - 30 - - Y16 - - 0 - - 5000 - - 0 - - 5000 - - - - - - - 640 - - 576 - - 30 - - Y16 - - 0 - - 5000 - - 0 - - 5000 - - - - - 1920 - - 1080 - - 30 - - MJPG - - 0 - - 5000 - - 0 - - 5000 - - - - - 640 - - 576 - - 30 - - Y16 - - 0 - - 5000 - - 0 - - 5000 - - - - - - LibUVC - - - - 640 - - 576 - - 30 - - Y16 - - 0 - - 5000 - - 0 - - 5000 - - - - - 1920 - - 1080 - - 30 - - MJPG - - 0 - - 5000 - - 0 - - 5000 - - - - - 640 - - 576 - - 30 - - Y16 - - 0 - - 5000 - - 0 - - 5000 - - - - - - - LibUVC - - - 0 - - - 0 - - 5000 - - 0 - - 2000 - - 1280 - - 800 - - 30 - RLE - - - - 1280 - - 720 - - 30 - MJPG - - - - 1280 - - 800 - - 30 - Y8 - - - - 1280 - - 800 - - 30 - Y8 - - - - 1280 - - 800 - - 30 - Y8 - - - - - - - - - - - - - - - - 640 - - 400 - - 30 - RLE - - - - 640 - - 400 - - 30 - Y8 - - - - - - - 640 - - 400 - - 15 - RLE - - - - - - 1920 - - 1080 - - 30 - MJPG - - - - 1280 - - 800 - - 30 - Y10 - - - - 1280 - - 800 - - 30 - Y10 - - - - - - - 1920 - - 1080 - - 30 - MJPG - - - - 1280 - - 800 - - 30 - Y8 - - - - 1280 - - 800 - - 30 - Y8 - - - - - - - - LibUVC - - - 0 - - - - 0 - - 5000 - - 0 - - 2000 - - 1280 - - 800 - - 30 - RLE - - - - 1280 - - 720 - - 30 - - MJPG - - 0 - - - - 1280 - - 800 - - 30 - - Y8 - - 0 - - - - 1280 - - 800 - - 30 - Y8 - - 0 - - - - 1280 - - 800 - - 30 - Y8 - - 0 - - - - - - - 640 - - 400 - - 30 - RLE - - 0 - - - - 640 - - 400 - - 30 - Y8 - - 0 - - - - - - 1920 - - 1080 - - 30 - MJPG - - 0 - - - - 1280 - - 800 - - 30 - Y10 - - 0 - - - - 1280 - - 800 - - 30 - Y10 - - 0 - - - - - - - 1920 - - 1080 - - 30 - MJPG - - 0 - - - - 1280 - - 800 - - 30 - Y8 - - 0 - - - - 1280 - - 800 - - 30 - Y8 - - 0 - - - - - - - - LibUVC - - - 0 - - - - - - 2 - - 10000 - - 2 - - 2000 - - 800 - - 600 - - 30 - RLE - - - - 1280 - - 720 - - 30 - MJPG - - - - 800 - - 600 - - 30 - Y8 - - - - - - 1600 - - 1200 - - 30 - RLE - - - - 1280 - - 720 - - 30 - MJPG - - - - 800 - - 600 - - 30 - Y8 - - - - - - 640 - - 480 - - 30 - RLE - - - - 1280 - - 720 - - 30 - MJPG - - - - 640 - - 480 - - 30 - Y8 - - - - - - - - LibUVC - - - 0 - - - - 0 - - 5000 - - 5 - - 5000 - - 1280 - - 800 - - 10 - RVL - - - - 1280 - - 800 - - 10 - MJPG - - 0 - - 5 - - 5000 - - - - 1280 - - 800 - - 10 - Y8 - - 0 - - 5 - - 5000 - - - - 1280 - - 800 - - 10 - Y8 - - 0 - - 5 - - 5000 - - - - 5 - - 5000 - - - - 5 - - 5000 - - - - - - - 1280 - - 800 - - 20 - MJPG - - 0 - - 5 - - 5000 - - - - 640 - - 400 - - 20 - RVL - - 0 - - 5 - - 5000 - - - - 640 - - 400 - - 20 - Y8 - - 0 - - 5 - - 5000 - - - - 640 - - 400 - - 20 - Y8 - - 0 - - 5 - - 5000 - - - - - - 1280 - - 800 - - 10 - MJPG - - 0 - - 5 - - 5000 - - - - 1280 - - 800 - - 10 - Y10 - - 0 - - 5 - - 5000 - - - - 1280 - - 800 - - 10 - Y10 - - 0 - - 5 - - 5000 - - - - - - 1280 - - 800 - - 10 - MJPG - - 0 - - 5 - - 5000 - - - - 1280 - - 800 - - 10 - Y8 - - 0 - - 5 - - 5000 - - - - 1280 - - 800 - - 10 - Y8 - - 0 - - 5 - - 5000 - - - - - - - - V4L2 - - - 0 - - 1 - - - - - - 0 - - 5000 - - 0 - - 2000 - - 848 - - 480 - - 30 - Y16 - - - - 1280 - - 720 - - 30 - MJPG - - - - 848 - - 480 - - 30 - Y8 - - - - 848 - - 480 - - 30 - Y8 - - - - 848 - - 480 - - 30 - Y8 - - - - - - - V4L2 - - - 0 - - 1 - - - - - - 0 - - 5000 - - 0 - - 2000 - - 848 - - 480 - - 30 - Y16 - - - - 1280 - - 720 - - 30 - MJPG - - - - 848 - - 480 - - 30 - Y8 - - - - 848 - - 480 - - 30 - Y8 - - - - 848 - - 480 - - 30 - Y8 - - - - - - - V4L2 - - - 0 - - 1 - - - 0 - - 5000 - - 0 - - 2000 - - 848 - - 480 - - 30 - Y16 - - - - 1280 - - 720 - - 30 - MJPG - - - - 848 - - 480 - - 30 - Y8 - - - - 848 - - 480 - - 30 - Y8 - - - - 848 - - 480 - - 30 - Y8 - - - - - - - V4L2 - - - 0 - - 1 - - - - - - 0 - - 5000 - - 0 - - 2000 - - 848 - - 480 - - 30 - Y16 - - - - 1280 - - 720 - - 30 - MJPG - - - - 848 - - 480 - - 30 - Y8 - - - - 848 - - 480 - - 30 - Y8 - - - - 848 - - 480 - - 30 - Y8 - - - - - - - V4L2 - - - 0 - - 1 - - - - - - 0 - - 5000 - - 0 - - 2000 - - 848 - - 480 - - 30 - Y16 - - - - 1280 - - 720 - - 30 - MJPG - - - - 848 - - 480 - - 30 - Y8 - - - - 848 - - 480 - - 30 - Y8 - - - - 848 - - 480 - - 30 - Y8 - - - - - - - V4L2 - - - 0 - - 1 - - - - - - 0 - - 5000 - - 0 - - 2000 - - 640 - - 480 - - 30 - Y16 - - - - 1280 - - 720 - - 30 - MJPG - - - - 640 - - 480 - - 30 - Y8 - - - - 640 - - 480 - - 30 - Y8 - - - - 640 - - 480 - - 30 - Y8 - - - - - - - V4L2 - - - 0 - - 1 - - - - - - 0 - - 5000 - - 0 - - 2000 - - 640 - - 480 - - 30 - Y16 - - - - 1280 - - 720 - - 30 - MJPG - - - - 640 - - 480 - - 30 - Y8 - - - - 640 - - 480 - - 30 - Y8 - - - - 640 - - 480 - - 30 - Y8 - - - - \ No newline at end of file diff --git a/orbbec_camera/config/OrbbecSDKConfig_v2.0.xml b/orbbec_camera/config/OrbbecSDKConfig_v2.0.xml index ea6a5cf1..068b318a 100644 --- a/orbbec_camera/config/OrbbecSDKConfig_v2.0.xml +++ b/orbbec_camera/config/OrbbecSDKConfig_v2.0.xml @@ -8,9 +8,9 @@ - 0 + 5 - 0 + 3 @@ -36,15 +36,6 @@ 10 - - false - - 1000 - - 100 - - @@ -92,6 +83,15 @@ V4L2 + + false + + 1000 + + 100 + + 640 @@ -166,6 +166,15 @@ + + false + + 1000 + + 100 + + 640 @@ -244,6 +253,15 @@ will determine the device's speciality. Optional values: V4L2, LibUVC --> LibUVC + + false + + 1000 + + 100 + + 640 @@ -323,6 +341,15 @@ will determine the device's speciality. Optional values: V4L2, LibUVC --> LibUVC + + false + + 1000 + + 100 + + 0 @@ -497,6 +524,15 @@ will determine the device's speciality. Optional values: V4L2, LibUVC --> LibUVC + + false + + 1000 + + 100 + + 0 @@ -671,6 +707,15 @@ will determine the device's speciality. Optional values: V4L2, LibUVC --> LibUVC + + false + + 1000 + + 100 + + 0 @@ -783,6 +828,15 @@ will determine the device's speciality. Optional values: V4L2, LibUVC --> LibUVC + + false + + 1000 + + 100 + + 0 @@ -1059,6 +1113,15 @@ this item will determine the device's speciality. Optional values: V4L2, LibUVC --> LibUVC + + true + + 1000 + + 100 + + 0 LibUVC + + true + + 1000 + + 100 + + 0 LibUVC + + true + + 1000 + + 100 + + 0 LibUVC + + true + + 1000 + + 100 + + 0 LibUVC + + true + + 1000 + + 100 + + 0 LibUVC + + true + + 1000 + + 100 + + 0 @@ -1517,6 +1625,15 @@ will determine the device's speciality. Optional values: V4L2, LibUVC --> LibUVC + + true + + 1000 + + 100 + + 0 @@ -1601,5 +1718,131 @@ Y8 + + + + LibUVC + + + false + + 1000 + + 100 + + + + 0 + + + + 0 + + 5000 + + 0 + + 2000 + + 1280 + + 800 + + 15 + Y16 + + + + 1280 + + 720 + + 15 + + MJPG + + 0 + + + + 1280 + + 800 + + 15 + + Y8 + + 0 + + + + + + LibUVC + + + false + + 1000 + + 100 + + + + 0 + + + + 0 + + 5000 + + 0 + + 2000 + + 1280 + + 800 + + 15 + Y16 + + + + 1280 + + 720 + + 15 + + MJPG + + 0 + + + + 1280 + + 800 + + 15 + + Y8 + + 0 + + \ No newline at end of file diff --git a/orbbec_camera/config/astra2.yaml b/orbbec_camera/config/astra2.yaml new file mode 100644 index 00000000..006e3bfc --- /dev/null +++ b/orbbec_camera/config/astra2.yaml @@ -0,0 +1,111 @@ +# 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, 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 + # The delay time for reopening the device, in milliseconds. Usually, there is no need to modify by default. + connection_delay: 100 + + color: + # If true, the color image will be enabled + enable_color: true + # Width of the color image. If 0, the default width will be used + color_width: 1280 + # Height of the color image. If 0, the default height will be used + color_height: 720 + # Fps of the color image. If 0, the default FPS will be used + color_fps: 30 + + depth: + # If true, the depth image will be enabled + enable_depth: true + # Width of the depth image. If 0, the default width will be used + depth_width: 800 + # Height of the depth image. If 0, the default height will be used + depth_height: 600 + # Fps of the depth image. If 0, the default FPS will be used + depth_fps: 30 + # Format of the depth image. + depth_format: "RLE" + # Depth registration mode. + depth_registration: false + # The alignment mode to be used. + align_mode: "HW" + + ir: + # If false, the left IR image will not be enabled + enable_ir: true + # Width of the left IR image. If 0, the default width will be used + ir_width: 800 + # Height of the left IR image. If 0, the default height will be used + ir_height: 600 + # Fps of the ir image. If 0, the default FPS will be used + ir_fps: 30 + # Format of the left IR image. Supported formats are 'Y8' + ir_format: "Y8" + + imu: + # If true, the IMU accelerometer data will be enabled + enable_accel: false + # Rate of the + accel_rate: "100hz" + # Range of the accelerometer. + accel_range: "4g" + # If true, the IMU gyroscope data will be enabled + enable_gyro: false + # Rate of the gyroscope. + gyro_rate: "100hz" + # Range of the gyroscope. + gyro_range: "1000dps" + + point_cloud: + # If true, the point cloud will be enabled + enable_point_cloud: true + # enable color point cloud. {fase:disable, true:enable} + enable_colored_point_cloud: false + + 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 + # If false, the hardware time will not be used + use_hardware_time: false + # If false, the host time will not be synchronized with the device time + enable_sync_host_time: false + + 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 diff --git a/orbbec_camera/config/camera_335_params.yaml b/orbbec_camera/config/camera_335_params.yaml deleted file mode 100644 index 2471a708..00000000 --- a/orbbec_camera/config/camera_335_params.yaml +++ /dev/null @@ -1,49 +0,0 @@ -# common params -depth_registration: false -enable_d2c_viewer: false -enable_point_cloud: false -enable_colored_point_cloud: false -enable_ldp: false -device_preset: "Default" - - -# enable_laser: true -interleave_ae_mode: "laser" -interleave_frame_enable: true -interleave_skip_enable: false -interleave_skip_index: 1 -time_domain: "global" # global, device, system -enable_sync_host_time: true - -trigger_out_enabled: true -frames_per_trigger: 0 -software_trigger_period: 0 - - -# color params -enable_color: false -color_width: 640 -color_height: 480 -color_fps: 30 -color_format: "MJPG" -enable_color_auto_exposure: false -color_exposure: 50 # 5ms -color_gain: 16 # -1 default - - -#left ir params -enable_left_ir: true -left_ir_width: 640 -left_ir_height: 480 -left_ir_fps: 30 -left_ir_format: "Y8" -enable_ir_auto_exposure: true -ir_exposure: 5000 # 5ms -ir_gain: 16 # -1 default - -# depth params -enable_depth: true -depth_width: 640 -depth_height: 480 -depth_fps: 30 -depth_format: "Y16" diff --git a/orbbec_camera/config/common.yaml b/orbbec_camera/config/common.yaml new file mode 100644 index 00000000..0d8710ea --- /dev/null +++ b/orbbec_camera/config/common.yaml @@ -0,0 +1,437 @@ +# 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" + # 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 + vendor_id: "0x2bc5" + # 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 + flip_color: 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 + flip_depth: 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 + flip_ir: 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 + liner_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 + enable_hardware_d2d: true + # 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: "" + # If true, the 3D reconstruction mode will be enabled + enable_3d_reconstruction_mode: false + # 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: 20 + hdr_index1_ir_ae_max_exposure: 2000 + hdr_index0_laser_control: 1 + hdr_index0_depth_exposure: 7500 + hdr_index0_depth_gain: 16 + hdr_index0_ir_brightness: 60 + hdr_index0_ir_ae_max_exposure: 10000 + + 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 diff --git a/orbbec_camera/config/femto.yaml b/orbbec_camera/config/femto.yaml new file mode 100644 index 00000000..c611bb92 --- /dev/null +++ b/orbbec_camera/config/femto.yaml @@ -0,0 +1,129 @@ +# 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, 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 + # The delay time for reopening the device, in milliseconds. Usually, there is no need to modify by default. + connection_delay: 100 + # If true, the heartbeat will be enabled + enable_heartbeat: false + # If true, the LDP will be enabled + enable_ldp: true + + 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 + # Width of the color image. If 0, the default width will be used + color_width: 640 + # Height of the color image. If 0, the default height will be used + color_height: 480 + # If 0, the default FPS will be used + color_fps: 30 + # Format of the color image. + color_format: "MJPG" + + depth: + # If true, the depth image will be enabled + enable_depth: true + # Width of the depth image. If 0, the default width will be used + depth_width: 640 + # Height of the depth image. If 0, the default height will be used + depth_height: 480 + # fps of the depth image. If 0, the default FPS will be used + depth_fps: 30 + # Format of the depth image. + depth_format: "Y16" + # Depth registration enable + depth_registration: false + + # The alignment mode to be used. Options are "HW" for hardware alignment and "SW" for software alignment + align_mode: "HW" + + ir: + # If false, the left IR image will not be enabled + enable_ir: true + # Width of the left IR image. If 0, the default width will be used + ir_width: 640 + # Height of the left IR image. If 0, the default height will be used + ir_height: 480 + # Fps of the left IR image. If 0, the default FPS will be used + ir_fps: 30 + # Format of the left IR image. Supported formats are 'Y8' + ir_format: "Y16" + + imu: + # If true, the IMU accelerometer data will be enabled + enable_accel: false + # Rate of the + accel_rate: "100hz" + # Range of the accelerometer. + accel_range: "4g" + # If true, the IMU gyroscope data will be enabled + enable_gyro: false + # Rate of the gyroscope. + gyro_rate: "100hz" + # Range of the gyroscope. + gyro_range: "1000dps" + # enable_sync_output_accel_gyro + enable_sync_output_accel_gyro: true + + point_cloud: + # If true, the point cloud will be enabled + enable_point_cloud: true + # enable color point cloud. {fase:disable, true:enable} + enable_colored_point_cloud: false + + advanced: + # If true, the extrinsics publish will be enabled + enable_publish_extrinsic: false + # If true, the frame synchronization will be enabled + enable_frame_sync: false + # If true, Overlay display of color image and depth image after D2C processing will be enabled + enable_d2c_viewer: false + # If false, the hardware time will not be used + use_hardware_time: false + # If false, the host time will not be synchronized with the device time + enable_sync_host_time: false + + 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 diff --git a/orbbec_camera/config/femtobolt.yaml b/orbbec_camera/config/femtobolt.yaml new file mode 100644 index 00000000..25d9a856 --- /dev/null +++ b/orbbec_camera/config/femtobolt.yaml @@ -0,0 +1,129 @@ +# config/*.yaml files are used to configure the camera parameters +# +# For Femto Mega and Femto Bolt devices, Configuration of depth NFOV and WFOV modes. +# NFOV and WFOV modes are achieved by configuring the resolution of Depth and IR in the startup file. +# In the startup file, depth_width, depth_height, ir_width, ir_height represent the resolution of depth and the resolution of IR, respectively. +# The frame rate and resolution of IR must be consistent with depth. The corresponding relationship between different modes and resolution is as follows: +# • NFOV unbinned: 640 x 576. +# • NFOV binned: 320 x 288. +# • WFOV unbinned: 1024 x 1024. +# • WFOV binned: 512 x 512. +# +--- +orbbec_ros: + camera_parameters: + general: + # Camera model. upport product models by referencing config/*.yaml + camera_model: "femtobolt" + # Path to the configuration file. If empty, default parameters will be used + config_file_path: "femtobolt.yaml" + + 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 + # The delay time for reopening the device, in milliseconds. Usually, there is no need to modify by default. + connection_delay: 100 + + color: + # If true, the color image will be enabled + enable_color: true + # Width of the color image. If 0, the default width will be used + color_width: 1280 + # Height of the color image. If 0, the default height will be used + color_height: 720 + # If 0, the default FPS will be used + color_fps: 30 + # Format of the color image. + color_format: "MJPG" + + depth: + # If true, the depth image will be enabled + enable_depth: true + # Width of the depth image. If 0, the default width will be used + depth_width: 640 + # Height of the depth image. If 0, the default height will be used + depth_height: 576 + # If 0, the default FPS will be used + depth_fps: 30 + # Format of the depth image. + depth_format: "Y16" + # If false, the depth scale will not be enabled + enable_depth_scale: true + # Depth registration mode. + depth_registration: false + # The alignment mode to be used. Options are "HW" for hardware alignment and "SW" for software alignment + align_mode: "SW" + filter: + 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 + + ir: + # If false, the left IR image will not be enabled + enable_ir: true + # Width of the left IR image. If 0, the default width will be used + ir_width: 640 + # Height of the left IR image. If 0, the default height will be used + ir_height: 576 + # If 0, the default FPS will be used + ir_fps: 30 + # Format of the left IR image. Supported formats are 'Y8' + ir_format: "Y16" + + imu: + # If true, the IMU accelerometer data will be enabled + enable_accel: false + # Rate of the + accel_rate: "200hz" + # Range of the accelerometer. + accel_range: "4g" + # If true, the IMU gyroscope data will be enabled + enable_gyro: false + # Rate of the gyroscope. + gyro_rate: "200hz" + # Range of the gyroscope. + gyro_range: "1000dps" + # enable_sync_output_accel_gyro + enable_sync_output_accel_gyro: true + + 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 + # If true, Overlay display of color image and depth image after D2C processing will be enabled + enable_d2c_viewer: false + # If false, the hardware time will not be used + use_hardware_time: true + # If false, the host time will not be synchronized with the device time + enable_sync_host_time: false + + 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 diff --git a/orbbec_camera/config/femtomega.yaml b/orbbec_camera/config/femtomega.yaml new file mode 100644 index 00000000..da67dc1d --- /dev/null +++ b/orbbec_camera/config/femtomega.yaml @@ -0,0 +1,134 @@ +# config/*.yaml files are used to configure the camera parameters +# +# For Femto Mega and Femto Bolt devices, Configuration of depth NFOV and WFOV modes. +# NFOV and WFOV modes are achieved by configuring the resolution of Depth and IR in the startup file. +# In the startup file, depth_width, depth_height, ir_width, ir_height represent the resolution of depth and the resolution of IR, respectively. +# The frame rate and resolution of IR must be consistent with depth. The corresponding relationship between different modes and resolution is as follows: +# • NFOV unbinned: 640 x 576. +# • NFOV binned: 320 x 288. +# • WFOV unbinned: 1024 x 1024. +# • WFOV binned: 512 x 512. +# +--- +orbbec_ros: + camera_parameters: + general: + # Camera model. upport product models by referencing config/*.yaml + camera_model: "femtomega" + # Path to the configuration file. If empty, default parameters will be used + config_file_path: "femtomega.yaml" + + 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 + # The delay time for reopening the device, in milliseconds. Usually, there is no need to modify by default. + connection_delay: 100 + + 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 + # Width of the color image. If 0, the default width will be used + color_width: 1280 + # Height of the color image. If 0, the default height will be used + color_height: 720 + # If 0, the default FPS will be used + color_fps: 30 + + depth: + # If true, the depth image will be enabled + enable_depth: true + # Width of the depth image. If 0, the default width will be used + depth_width: 640 + # Height of the depth image. If 0, the default height will be used + depth_height: 576 + # If 0, the default FPS will be used + depth_fps: 30 + # Format of the depth image. + depth_format: "Y16" + # If false, the depth scale will not be enabled + enable_depth_scale: true + # Depth registration mode. + depth_registration: false + # The alignment mode to be used. Options are "HW" for hardware alignment and "SW" for software alignment + align_mode: "HW" + + ir: + # If false, the left IR image will not be enabled + enable_ir: true + # Width of the left IR image. If 0, the default width will be used + ir_width: 640 + # Height of the left IR image. If 0, the default height will be used + ir_height: 576 + # If 0, the default FPS will be used + ir_fps: 30 + # Format of the left IR image. Supported formats are 'Y8' + ir_format: "Y16" + + imu: + # If true, the IMU accelerometer data will be enabled + enable_accel: false + # Rate of the + accel_rate: "100hz" + # Range of the accelerometer. + accel_range: "4g" + # If true, the IMU gyroscope data will be enabled + enable_gyro: false + # Rate of the gyroscope. + gyro_rate: "100hz" + # Range of the gyroscope. + gyro_range: "1000dps" + # enable_sync_output_accel_gyro + enable_sync_output_accel_gyro: true + + point_cloud: + # If true, the point cloud will be enabled + enable_point_cloud: true + # enable color point cloud. {fase:disable, true:enable} + enable_colored_point_cloud: false + + 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 + # If false, the hardware time will not be used + use_hardware_time: false + # If false, the host time will not be synchronized with the device time + enable_sync_host_time: false + + 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 diff --git a/orbbec_camera/config/gemini2.yaml b/orbbec_camera/config/gemini2.yaml new file mode 100644 index 00000000..e273c2df --- /dev/null +++ b/orbbec_camera/config/gemini2.yaml @@ -0,0 +1,148 @@ +# 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, 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 + # The delay time for reopening the device, in milliseconds. Usually, there is no need to modify by default. + connection_delay: 100 + # If true, the heartbeat will be enabled + enable_heartbeat: false + # If true, the LDP will be enabled + enable_ldp: true + + 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 + # Width of the color image. If 0, the default width will be used + color_width: 640 + # Height of the color image. If 0, the default height will be used + color_height: 360 + # If 0, the default FPS will be used + color_fps: 15 + # Format of the color image. + color_format: "MJPG" + + depth: + # If true, the depth image will be enabled + enable_depth: true + # Width of the depth image. If 0, the default width will be used + depth_width: 640 + # Height of the depth image. If 0, the default height will be used + depth_height: 400 + # If 0, the default FPS will be used + depth_fps: 15 + # Format of the depth image. + depth_format: "Y14" + # If false, the depth scale will not be enabled + enable_depth_scale: true + + # 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: "HW" + + # 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: "" + + filter: + 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 + + ir: + # enable the ir camera stream + enable_ir: true + # Width of the left IR image. If 0, the default width will be used + ir_width: 640 + # Height of the left IR image. If 0, the default height will be used + ir_height: 400 + # If 0, the default FPS will be used + ir_fps: 15 + # Format of the left IR image. Supported formats are 'Y8' + ir_format: "Y8" + + imu: + # If true, enable the IMU accelerometer data + enable_accel: false + # Rate of the accelerometer + accel_rate: "100hz" + # Range of the accelerometer. + accel_range: "4g" + # If true, enable the IMU gyroscope data + enable_gyro: false + # Rate of the gyroscope. + gyro_rate: "100hz" + # Range of the gyroscope. + gyro_range: "1000dps" + # enable_sync_output_accel_gyro + enable_sync_output_accel_gyro: true + + point_cloud: + # If true, the depth point cloud will be enabled + enable_point_cloud: true + # enable color point cloud. {fase:disable, true:enable} + enable_colored_point_cloud: false + + 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 + # If true, Overlay display of color image and depth image after D2C processing will be enabled + enable_d2c_viewer: false + # If false, the hardware time will not be used + use_hardware_time: true + + 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 diff --git a/orbbec_camera/config/gemini2L.yaml b/orbbec_camera/config/gemini2L.yaml new file mode 100644 index 00000000..f4e1a1b9 --- /dev/null +++ b/orbbec_camera/config/gemini2L.yaml @@ -0,0 +1,121 @@ +# 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, 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 + # The delay time for reopening the device, in milliseconds. Usually, there is no need to modify by default. + connection_delay: 100 + + 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 + # Width of the color image. If 0, the default width will be used + color_width: 1280 + # Height of the color image. If 0, the default height will be used + color_height: 800 + # fps of the color image. If 0, the default FPS will be used + color_fps: 30 + # Format of the color image. + color_format: "MJPG" + + depth: + # If true, the depth image will be enabled + enable_depth: true + # Width of the depth image. If 0, the default width will be used + depth_width: 1280 + # Height of the depth image. If 0, the default height will be used + depth_height: 800 + # If 0, the default FPS will be used + depth_fps: 30 + # Format of the depth image. + depth_format: "Y16" + # If false, the depth scale will not be enabled + enable_depth_scale: true + + # Depth registration mode. + depth_registration: false + # The alignment mode to be used. Options are "HW" for hardware alignment and "SW" for software alignment + align_mode: "HW" + + # 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: "" + + filter: + soft_filter: + # If true, the soft filter will be enabled + enable_soft_filter: true + # soft_filter_max_diff, If -1, the default value will be used + soft_filter_max_diff: -1 + # soft_filter_speckle_size, If -1, the default value will be used + soft_filter_speckle_size: -1 + + noise_removal_filter: + # If true, the noise removal filter will be enabled + enable_noise_removal_filter: true + + ir: + # enable the ir camera stream + enable_ir: true + # Width of the left IR image. If 0, the default width will be used + ir_width: 640 + # Height of the left IR image. If 0, the default height will be used + ir_height: 400 + # If 0, the default FPS will be used + ir_fps: 15 + # Format of the left IR image. + ir_format: "Y8" + + imu: + # If true, enable the IMU accelerometer data will be enabled + enable_accel: false + # Rate of the accelerometer + accel_rate: "100hz" + # Range of the accelerometer. + accel_range: "4g" + # If true, enable the IMU gyroscope data will be enabled + enable_gyro: false + # Rate of the gyroscope. + gyro_rate: "100hz" + # Range of the gyroscope. + gyro_range: "1000dps" + # enable_sync_output_accel_gyro + enable_sync_output_accel_gyro: false + + point_cloud: + # If true, the depth point cloud will be enabled + enable_point_cloud: true + # enable color point cloud. {fase:disable, true:enable} + enable_colored_point_cloud: false + + advanced: + # If false, the hardware time will not be used + use_hardware_time: true diff --git a/orbbec_camera/config/gemini330Lg_series.yaml b/orbbec_camera/config/gemini330Lg_series.yaml new file mode 100644 index 00000000..f743091e --- /dev/null +++ b/orbbec_camera/config/gemini330Lg_series.yaml @@ -0,0 +1,162 @@ +# 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: "gemini330Lg_series" + # Path to the configuration file. If empty, default parameters will be used + config_file_path: "gemini330Lg_series.yaml" + + 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 + # The delay time for reopening the device, in milliseconds. Usually, there is no need to modify by default. + connection_delay: 10 + # 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" + + color: + # If true, the color image will be enabled + enable_color: true + # 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 + # Format of the color image. note: GMSL device dont't support MJPG format. need modify to YUYV format + color_format: "YUYV" + # enable auto exposure for the color image + enable_color_auto_exposure: true + # enable auto white balance for the color image + enable_color_auto_white_balance: true + # If true, the color image will be undistorted + enable_color_undistortion: false + + depth: + # If true, the depth image will be enabled + enable_depth: true + # 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: "Y16" + # If false, the depth scale will not be enabled + enable_depth_scale: true + # 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" + + laser: + # If true, the laser data will be enabled + enable_laser: false + # Laser On/Off mode. + laser_on_off_mode: 0 + + filter: + # -enable_decimation_filter + enable_decimation_filter: false + # -enable_hdr_merge + enable_hdr_merge: false + # -enable_sequence_id_filter + enable_sequence_id_filter: false + # -enable_threshold_filter + enable_threshold_filter: false + # -enable_noise_removal_filter + enable_noise_removal_filter: true + # -enable_spatial_filter + enable_spatial_filter: false + # -enable_temporal_filter + enable_temporal_filter: false + # -enable_hole_filling_filter + enable_hole_filling_filter: false + # -noise_removal_filter_min_diff + noise_removal_filter_min_diff: 256 + # -noise_removal_filter_max_size + noise_removal_filter_max_size: 80 + # -enable_soft_filter + enable_soft_filter: true + + leftir: + # the left IR image will not be enabled + enable_left_ir: true + + rightir: + # the right IR image will not be enabled + enable_right_ir: true + + 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 + + point_cloud: + # enable point cloud. {fase:disable, true:enable} + enable_point_cloud: false + # enable color point cloud. {fase:disable, true:enable} + enable_colored_point_cloud: false + + 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 + # If false, the hardware time will not be used, true:devicetime, false:systemtime + use_hardware_time: true + # the host time will be synchronized with the device time + enable_sync_host_time: true + + 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 diff --git a/orbbec_camera/config/gemini330_series.yaml b/orbbec_camera/config/gemini330_series.yaml new file mode 100644 index 00000000..7a38bd2b --- /dev/null +++ b/orbbec_camera/config/gemini330_series.yaml @@ -0,0 +1,100 @@ +# 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" + vendor_id: "0x2bc5" + product_id: "" + connection_delay: 10 + time_domain: "device" + retry_on_usb3_detection_failure: false + enable_heartbeat: false + enable_hardware_reset: 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 + liner_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 + diff --git a/orbbec_camera/config/multicamera.yaml b/orbbec_camera/config/multicamera.yaml new file mode 100644 index 00000000..4ccaf08f --- /dev/null +++ b/orbbec_camera/config/multicamera.yaml @@ -0,0 +1,22 @@ +# config/*.yaml files are used to configure the camera parameters +--- +orbbec_ros: + multi_camera_parameters: + + launch_device_camera1: + config_file_path: "multicamera_test/gemini330_series_test1.yaml" + # default period 0.0; unit: second + period: 0.0 + camera_name: "camera1" + usb_port: "2-2-4" + device_num: "2" + sync_mode: "standalone" + + launch_device_camera2: + config_file_path: "multicamera_test/gemini330_series_test2.yaml" + # default period 0.0; unit: second + period: 3.0 + camera_name: "camera2" + usb_port: "2-1-2" + device_num: "2" + sync_mode: "standalone" diff --git a/orbbec_camera/config/multicamera_synced.yaml b/orbbec_camera/config/multicamera_synced.yaml new file mode 100644 index 00000000..af5e3a71 --- /dev/null +++ b/orbbec_camera/config/multicamera_synced.yaml @@ -0,0 +1,40 @@ +# config/*.yaml files are used to configure the camera parameters +--- +orbbec_ros: + multi_camera_parameters: + + launch_device_camera1: + config_file_path: "multicamera_test/gemini330_series_sync_front_camera.yaml" + # default period 0.0; unit: second + period: 3.0 + camera_name: "front_camera" + usb_port: "2-5" + device_num: "3" + sync_mode: "hardware_triggering" + + launch_device_camera2: + config_file_path: "multicamera_test/gemini330_series_sync_left_camera.yaml" + # default period 0.0; unit: second + period: 0.0 + camera_name: "left_camera" + usb_port: "2-1" + device_num: "3" + sync_mode: "hardware_triggering" + + launch_device_camera3: + config_file_path: "multicamera_test/gemini330_series_sync_rear_camera.yaml" + # default period 0.0; unit: second + period: 0.0 + camera_name: "rear_camera" + usb_port: "2-3" + device_num: "3" + sync_mode: "hardware_triggering" + + launch_device_camera4: + config_file_path: "multicamera_test/gemini330_series_sync_right_camera.yaml" + # default period 0.0; unit: second + period: 0.0 + camera_name: "right_camera" + usb_port: "2-7" + device_num: "3" + sync_mode: "hardware_triggering" diff --git a/orbbec_camera/config/multicamera_test/gemini330_series_sync_front_camera.yaml b/orbbec_camera/config/multicamera_test/gemini330_series_sync_front_camera.yaml new file mode 100644 index 00000000..79e90e13 --- /dev/null +++ b/orbbec_camera/config/multicamera_test/gemini330_series_sync_front_camera.yaml @@ -0,0 +1,161 @@ +# 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, usually overwritten by launch file + camera_name: "front_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: "2-5" + # Number of devices. If multiple cameras are required, this parameter must be filled in launch file + device_num: 3 + # The delay time for reopening the device, in milliseconds. Usually, there is no need to modify by default. + connection_delay: 10 + # 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" + + color: + # If true, the color image will be enabled + enable_color: true + # 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: "MJPG" + # enable auto exposure for the color image + enable_color_auto_exposure: true + # enable auto white balance for the color image + enable_color_auto_white_balance: true + # If true, the color image will be undistorted + enable_color_undistortion: false + + depth: + # If true, the depth image will be enabled + enable_depth: true + # 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: "Y16" + # If false, the depth scale will not be enabled + enable_depth_scale: true + + # 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" + + laser: + # Whether to enable the laser. Default value is true + enable_laser: false + # Laser Switch Alternate Mode, 0: Off, 1: On-Off Alternate, 2: Off-On Alternate. Default value is 0. + laser_on_off_mode: 0 + + filter: + # -enable_decimation_filter + enable_decimation_filter: false + # -enable_hdr_merge + enable_hdr_merge: false + # -enable_sequence_id_filter + enable_sequence_id_filter: false + # -enable_threshold_filter + enable_threshold_filter: false + # -enable_noise_removal_filter + enable_noise_removal_filter: true + # -enable_spatial_filter + enable_spatial_filter: false + # -enable_temporal_filter + enable_temporal_filter: false + # -enable_hole_filling_filter + enable_hole_filling_filter: false + # -noise_removal_filter_min_diff + noise_removal_filter_min_diff: 256 + # -noise_removal_filter_max_size + noise_removal_filter_max_size: 80 + # -enable_soft_filter + enable_soft_filter: true + + leftir: + # the left IR image will not be enabled + enable_left_ir: true + + rightir: + # the right IR image will not be enabled + enable_right_ir: true + + 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 + + point_cloud: + # enable point cloud. {fase:disable, true:enable} + enable_point_cloud: false + + 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 + # If false, the hardware time will not be used, true:devicetime, false:systemtime + use_hardware_time: true + # the host time will be synchronized with the device time + enable_sync_host_time: true + + 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: "SECONDARY_SYNCED" + # 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 diff --git a/orbbec_camera/config/multicamera_test/gemini330_series_sync_left_camera.yaml b/orbbec_camera/config/multicamera_test/gemini330_series_sync_left_camera.yaml new file mode 100644 index 00000000..58327b1c --- /dev/null +++ b/orbbec_camera/config/multicamera_test/gemini330_series_sync_left_camera.yaml @@ -0,0 +1,161 @@ +# 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, usually overwritten by launch file + camera_name: "left_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: "2-1" + # Number of devices. If multiple cameras are required, this parameter must be filled in launch file + device_num: 3 + # The delay time for reopening the device, in milliseconds. Usually, there is no need to modify by default. + connection_delay: 10 + # 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" + + color: + # If true, the color image will be enabled + enable_color: true + # 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: "MJPG" + # enable auto exposure for the color image + enable_color_auto_exposure: true + # enable auto white balance for the color image + enable_color_auto_white_balance: true + # If true, the color image will be undistorted + enable_color_undistortion: false + + depth: + # If true, the depth image will be enabled + enable_depth: true + # 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: "Y16" + # If false, the depth scale will not be enabled + enable_depth_scale: true + + # 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" + + laser: + # Whether to enable the laser. Default value is true + enable_laser: false + # Laser Switch Alternate Mode, 0: Off, 1: On-Off Alternate, 2: Off-On Alternate. Default value is 0. + laser_on_off_mode: 0 + + filter: + # -enable_decimation_filter + enable_decimation_filter: false + # -enable_hdr_merge + enable_hdr_merge: false + # -enable_sequence_id_filter + enable_sequence_id_filter: false + # -enable_threshold_filter + enable_threshold_filter: false + # -enable_noise_removal_filter + enable_noise_removal_filter: true + # -enable_spatial_filter + enable_spatial_filter: false + # -enable_temporal_filter + enable_temporal_filter: false + # -enable_hole_filling_filter + enable_hole_filling_filter: false + # -noise_removal_filter_min_diff + noise_removal_filter_min_diff: 256 + # -noise_removal_filter_max_size + noise_removal_filter_max_size: 80 + # -enable_soft_filter + enable_soft_filter: true + + leftir: + # the left IR image will not be enabled + enable_left_ir: true + + rightir: + # the right IR image will not be enabled + enable_right_ir: true + + 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 + + point_cloud: + # enable point cloud. {fase:disable, true:enable} + enable_point_cloud: false + + 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 + # If false, the hardware time will not be used, true:devicetime, false:systemtime + use_hardware_time: true + # the host time will be synchronized with the device time + enable_sync_host_time: true + + 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: "SECONDARY_SYNCED" + # 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 diff --git a/orbbec_camera/config/multicamera_test/gemini330_series_sync_rear_camera.yaml b/orbbec_camera/config/multicamera_test/gemini330_series_sync_rear_camera.yaml new file mode 100644 index 00000000..16050920 --- /dev/null +++ b/orbbec_camera/config/multicamera_test/gemini330_series_sync_rear_camera.yaml @@ -0,0 +1,161 @@ +# 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, usually overwritten by launch file + camera_name: "rear_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: "2-3" + # Number of devices. If multiple cameras are required, this parameter must be filled in launch file + device_num: 3 + # The delay time for reopening the device, in milliseconds. Usually, there is no need to modify by default. + connection_delay: 10 + # 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" + + color: + # If true, the color image will be enabled + enable_color: true + # 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: "MJPG" + # enable auto exposure for the color image + enable_color_auto_exposure: true + # enable auto white balance for the color image + enable_color_auto_white_balance: true + # If true, the color image will be undistorted + enable_color_undistortion: false + + depth: + # If true, the depth image will be enabled + enable_depth: true + # 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: "Y16" + # If false, the depth scale will not be enabled + enable_depth_scale: true + + # 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" + + laser: + # Whether to enable the laser. Default value is true + enable_laser: false + # Laser Switch Alternate Mode, 0: Off, 1: On-Off Alternate, 2: Off-On Alternate. Default value is 0. + laser_on_off_mode: 0 + + filter: + # -enable_decimation_filter + enable_decimation_filter: false + # -enable_hdr_merge + enable_hdr_merge: false + # -enable_sequence_id_filter + enable_sequence_id_filter: false + # -enable_threshold_filter + enable_threshold_filter: false + # -enable_noise_removal_filter + enable_noise_removal_filter: true + # -enable_spatial_filter + enable_spatial_filter: false + # -enable_temporal_filter + enable_temporal_filter: false + # -enable_hole_filling_filter + enable_hole_filling_filter: false + # -noise_removal_filter_min_diff + noise_removal_filter_min_diff: 256 + # -noise_removal_filter_max_size + noise_removal_filter_max_size: 80 + # -enable_soft_filter + enable_soft_filter: true + + leftir: + # the left IR image will not be enabled + enable_left_ir: true + + rightir: + # the right IR image will not be enabled + enable_right_ir: true + + 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 + + point_cloud: + # enable point cloud. {fase:disable, true:enable} + enable_point_cloud: false + + 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 + # If false, the hardware time will not be used, true:devicetime, false:systemtime + use_hardware_time: true + # the host time will be synchronized with the device time + enable_sync_host_time: true + + 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: "SECONDARY_SYNCED" + # 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 diff --git a/orbbec_camera/config/multicamera_test/gemini330_series_sync_right_camera.yaml b/orbbec_camera/config/multicamera_test/gemini330_series_sync_right_camera.yaml new file mode 100644 index 00000000..ca6f0844 --- /dev/null +++ b/orbbec_camera/config/multicamera_test/gemini330_series_sync_right_camera.yaml @@ -0,0 +1,161 @@ +# 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, usually overwritten by launch file + camera_name: "right_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: "2-7" + # Number of devices. If multiple cameras are required, this parameter must be filled in launch file + device_num: 3 + # The delay time for reopening the device, in milliseconds. Usually, there is no need to modify by default. + connection_delay: 10 + # 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" + + color: + # If true, the color image will be enabled + enable_color: true + # 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: "MJPG" + # enable auto exposure for the color image + enable_color_auto_exposure: true + # enable auto white balance for the color image + enable_color_auto_white_balance: true + # If true, the color image will be undistorted + enable_color_undistortion: false + + depth: + # If true, the depth image will be enabled + enable_depth: true + # 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: "Y16" + # If false, the depth scale will not be enabled + enable_depth_scale: true + + # 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" + + laser: + # Whether to enable the laser. Default value is true + enable_laser: false + # Laser Switch Alternate Mode, 0: Off, 1: On-Off Alternate, 2: Off-On Alternate. Default value is 0. + laser_on_off_mode: 0 + + filter: + # -enable_decimation_filter + enable_decimation_filter: false + # -enable_hdr_merge + enable_hdr_merge: false + # -enable_sequence_id_filter + enable_sequence_id_filter: false + # -enable_threshold_filter + enable_threshold_filter: false + # -enable_noise_removal_filter + enable_noise_removal_filter: true + # -enable_spatial_filter + enable_spatial_filter: false + # -enable_temporal_filter + enable_temporal_filter: false + # -enable_hole_filling_filter + enable_hole_filling_filter: false + # -noise_removal_filter_min_diff + noise_removal_filter_min_diff: 256 + # -noise_removal_filter_max_size + noise_removal_filter_max_size: 80 + # -enable_soft_filter + enable_soft_filter: true + + leftir: + # the left IR image will not be enabled + enable_left_ir: true + + rightir: + # the right IR image will not be enabled + enable_right_ir: true + + 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 + + point_cloud: + # enable point cloud. {fase:disable, true:enable} + enable_point_cloud: false + + 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 + # If false, the hardware time will not be used, true:devicetime, false:systemtime + use_hardware_time: true + # the host time will be synchronized with the device time + enable_sync_host_time: true + + 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: "SECONDARY_SYNCED" + # 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 diff --git a/orbbec_camera/config/multicamera_test/gemini330_series_test1.yaml b/orbbec_camera/config/multicamera_test/gemini330_series_test1.yaml new file mode 100644 index 00000000..0921d793 --- /dev/null +++ b/orbbec_camera/config/multicamera_test/gemini330_series_test1.yaml @@ -0,0 +1,161 @@ +# 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, usually overwritten by launch file + camera_name: "camera_test1" + # 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: "2-2-3" + # Number of devices. If multiple cameras are required, this parameter must be filled in launch file + device_num: 2 + # The delay time for reopening the device, in milliseconds. Usually, there is no need to modify by default. + connection_delay: 10 + # 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" + + color: + # If true, the color image will be enabled + enable_color: true + # 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: "MJPG" + # enable auto exposure for the color image + enable_color_auto_exposure: true + # enable auto white balance for the color image + enable_color_auto_white_balance: true + # If true, the color image will be undistorted + enable_color_undistortion: false + + depth: + # If true, the depth image will be enabled + enable_depth: true + # 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: "Y16" + # If false, the depth scale will not be enabled + enable_depth_scale: true + + # 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" + + laser: + # Whether to enable the laser. Default value is true + enable_laser: false + # Laser Switch Alternate Mode, 0: Off, 1: On-Off Alternate, 2: Off-On Alternate. Default value is 0. + laser_on_off_mode: 0 + + filter: + # -enable_decimation_filter + enable_decimation_filter: false + # -enable_hdr_merge + enable_hdr_merge: false + # -enable_sequence_id_filter + enable_sequence_id_filter: false + # -enable_threshold_filter + enable_threshold_filter: false + # -enable_noise_removal_filter + enable_noise_removal_filter: true + # -enable_spatial_filter + enable_spatial_filter: false + # -enable_temporal_filter + enable_temporal_filter: false + # -enable_hole_filling_filter + enable_hole_filling_filter: false + # -noise_removal_filter_min_diff + noise_removal_filter_min_diff: 256 + # -noise_removal_filter_max_size + noise_removal_filter_max_size: 80 + # -enable_soft_filter + enable_soft_filter: true + + leftir: + # the left IR image will not be enabled + enable_left_ir: true + + rightir: + # the right IR image will not be enabled + enable_right_ir: true + + 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 + + point_cloud: + # enable point cloud. {fase:disable, true:enable} + enable_point_cloud: false + + 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 + # If false, the hardware time will not be used, true:devicetime, false:systemtime + use_hardware_time: true + # the host time will be synchronized with the device time + enable_sync_host_time: true + + 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 diff --git a/orbbec_camera/config/multicamera_test/gemini330_series_test2.yaml b/orbbec_camera/config/multicamera_test/gemini330_series_test2.yaml new file mode 100644 index 00000000..4e629906 --- /dev/null +++ b/orbbec_camera/config/multicamera_test/gemini330_series_test2.yaml @@ -0,0 +1,161 @@ +# 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, usually overwritten by launch file + camera_name: "camera_test2" + # 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: "2-1-12" + # Number of devices. If multiple cameras are required, this parameter must be filled in launch file + device_num: 2 + # The delay time for reopening the device, in milliseconds. Usually, there is no need to modify by default. + connection_delay: 10 + # 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" + + color: + # If true, the color image will be enabled + enable_color: true + # 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: "MJPG" + # enable auto exposure for the color image + enable_color_auto_exposure: true + # enable auto white balance for the color image + enable_color_auto_white_balance: true + # If true, the color image will be undistorted + enable_color_undistortion: false + + depth: + # If true, the depth image will be enabled + enable_depth: true + # 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: "Y16" + # If false, the depth scale will not be enabled + enable_depth_scale: true + + # 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" + + laser: + # Whether to enable the laser. Default value is true + enable_laser: false + # Laser Switch Alternate Mode, 0: Off, 1: On-Off Alternate, 2: Off-On Alternate. Default value is 0. + laser_on_off_mode: 0 + + filter: + # -enable_decimation_filter + enable_decimation_filter: false + # -enable_hdr_merge + enable_hdr_merge: false + # -enable_sequence_id_filter + enable_sequence_id_filter: false + # -enable_threshold_filter + enable_threshold_filter: false + # -enable_noise_removal_filter + enable_noise_removal_filter: true + # -enable_spatial_filter + enable_spatial_filter: false + # -enable_temporal_filter + enable_temporal_filter: false + # -enable_hole_filling_filter + enable_hole_filling_filter: false + # -noise_removal_filter_min_diff + noise_removal_filter_min_diff: 256 + # -noise_removal_filter_max_size + noise_removal_filter_max_size: 80 + # -enable_soft_filter + enable_soft_filter: true + + leftir: + # the left IR image will not be enabled + enable_left_ir: true + + rightir: + # the right IR image will not be enabled + enable_right_ir: true + + 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 + + point_cloud: + # enable point cloud. {fase:disable, true:enable} + enable_point_cloud: false + + 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 + # If false, the hardware time will not be used, true:devicetime, false:systemtime + use_hardware_time: true + # the host time will be synchronized with the device time + enable_sync_host_time: true + + 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 diff --git a/orbbec_camera/include/orbbec_camera/constants.h b/orbbec_camera/include/orbbec_camera/constants.h index 3577bcc0..9f3354d0 100644 --- a/orbbec_camera/include/orbbec_camera/constants.h +++ b/orbbec_camera/include/orbbec_camera/constants.h @@ -22,8 +22,8 @@ #define THREAD_NUM 4 #define OB_ROS_MAJOR_VERSION 2 -#define OB_ROS_MINOR_VERSION 0 -#define OB_ROS_PATCH_VERSION 9 +#define OB_ROS_MINOR_VERSION 1 +#define OB_ROS_PATCH_VERSION 1 #ifndef STRINGIFY #define STRINGIFY(arg) #arg diff --git a/orbbec_camera/include/orbbec_camera/ob_camera_node.h b/orbbec_camera/include/orbbec_camera/ob_camera_node.h index 64d0dc42..42c0303e 100644 --- a/orbbec_camera/include/orbbec_camera/ob_camera_node.h +++ b/orbbec_camera/include/orbbec_camera/ob_camera_node.h @@ -591,7 +591,6 @@ class OBCameraNode { std::unique_ptr diagnostic_updater_ = nullptr; double diagnostic_period_ = 1.0; bool enable_laser_ = false; - int laser_on_off_mode_ = 0; std::unique_ptr align_filter_ = nullptr; OBStreamType align_target_stream_ = OB_STREAM_COLOR; bool retry_on_usb3_detection_failure_ = false; diff --git a/orbbec_camera/include/orbbec_camera/ob_camera_node_driver.h b/orbbec_camera/include/orbbec_camera/ob_camera_node_driver.h index 05ac4d67..bb99ed49 100644 --- a/orbbec_camera/include/orbbec_camera/ob_camera_node_driver.h +++ b/orbbec_camera/include/orbbec_camera/ob_camera_node_driver.h @@ -83,6 +83,7 @@ class OBCameraNodeDriver : public rclcpp::Node { std::string device_unique_id_; std::string usb_port_; bool enumerate_net_device_ = false; // default false + std::string uvc_backend_; std::shared_ptr parameters_ = nullptr; std::shared_ptr query_thread_ = nullptr; std::shared_ptr device_count_update_thread_ = nullptr; diff --git a/orbbec_camera/launch/gemini_330_series.launch.py b/orbbec_camera/launch/gemini_330_series.launch.py index a9eee35c..e42bfb02 100644 --- a/orbbec_camera/launch/gemini_330_series.launch.py +++ b/orbbec_camera/launch/gemini_330_series.launch.py @@ -56,6 +56,7 @@ def generate_launch_description(): DeclareLaunchArgument('serial_number', default_value=''), DeclareLaunchArgument('usb_port', default_value=''), DeclareLaunchArgument('device_num', default_value='1'), + DeclareLaunchArgument('uvc_backend', default_value='libuvc'),#libuvc or v4l2 DeclareLaunchArgument('point_cloud_qos', default_value='default'), DeclareLaunchArgument('enable_point_cloud', default_value='true'), DeclareLaunchArgument('enable_colored_point_cloud', default_value='false'), @@ -141,7 +142,7 @@ def generate_launch_description(): 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('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'), @@ -163,7 +164,6 @@ def generate_launch_description(): DeclareLaunchArgument('enable_laser', default_value='true'), DeclareLaunchArgument('depth_precision', default_value=''), DeclareLaunchArgument('device_preset', default_value='Default'), - DeclareLaunchArgument('laser_on_off_mode', default_value='0'), DeclareLaunchArgument('retry_on_usb3_detection_failure', default_value='false'), DeclareLaunchArgument('laser_energy_level', default_value='-1'), DeclareLaunchArgument('enable_3d_reconstruction_mode', default_value='false'), diff --git a/orbbec_camera/launch/gemini_330_series_interleave_laser_g335.launch.py b/orbbec_camera/launch/gemini_330_series_interleave_laser_g335.launch.py deleted file mode 100644 index 5d9b38b1..00000000 --- a/orbbec_camera/launch/gemini_330_series_interleave_laser_g335.launch.py +++ /dev/null @@ -1,233 +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 - - -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='true'), - DeclareLaunchArgument('serial_number', default_value=''), - DeclareLaunchArgument('usb_port', default_value=''), - DeclareLaunchArgument('device_num', default_value='1'), - 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='30'), - DeclareLaunchArgument('color_format', default_value='MJPG'), - 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('color_ae_roi_left', default_value='-1'), - DeclareLaunchArgument('color_ae_roi_top', default_value='-1'), - DeclareLaunchArgument('color_ae_roi_right', default_value='-1'), - DeclareLaunchArgument('color_ae_roi_bottom', default_value='-1'), - DeclareLaunchArgument('depth_width', default_value='0'), - DeclareLaunchArgument('depth_height', default_value='0'), - DeclareLaunchArgument('depth_fps', default_value='30'), - DeclareLaunchArgument('depth_format', default_value='Y16'), - DeclareLaunchArgument('enable_depth', default_value='true'), - DeclareLaunchArgument('depth_qos', default_value='default'), - DeclareLaunchArgument('depth_camera_info_qos', default_value='default'), - DeclareLaunchArgument('depth_ae_roi_left', default_value='-1'), - DeclareLaunchArgument('depth_ae_roi_top', default_value='-1'), - DeclareLaunchArgument('depth_ae_roi_right', default_value='-1'), - DeclareLaunchArgument('depth_ae_roi_bottom', default_value='-1'), - DeclareLaunchArgument('left_ir_width', default_value='0'), - DeclareLaunchArgument('left_ir_height', default_value='0'), - DeclareLaunchArgument('left_ir_fps', default_value='30'), - DeclareLaunchArgument('left_ir_format', default_value='Y8'), - DeclareLaunchArgument('enable_left_ir', default_value='true'), - 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='30'), - DeclareLaunchArgument('right_ir_format', default_value='Y8'), - 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('liner_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('enable_publish_extrinsic', default_value='false'), - DeclareLaunchArgument('enable_d2c_viewer', default_value='false'), - DeclareLaunchArgument('enable_ldp', 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('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('use_hardware_time', default_value='true'), - 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_noise_removal_filter', default_value='true'), - 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('laser_on_off_mode', default_value='0'), - DeclareLaunchArgument('retry_on_usb3_detection_failure', default_value='false'), - DeclareLaunchArgument('laser_energy_level', default_value='-1'), - DeclareLaunchArgument('enable_3d_reconstruction_mode', default_value='false'), - DeclareLaunchArgument('enable_sync_host_time', default_value='true'), - DeclareLaunchArgument('time_domain', default_value='device'), - DeclareLaunchArgument('enable_color_undistortion', default_value='false'), - DeclareLaunchArgument('config_file_path', default_value=''), - DeclareLaunchArgument('enable_heartbeat', default_value='false'), - DeclareLaunchArgument('enable_hardware_reset', default_value='false'), - DeclareLaunchArgument('interleave_ae_mode', default_value='laser'), # 'hdr' or 'laser' - DeclareLaunchArgument('interleave_frame_enable', default_value='true'), - DeclareLaunchArgument('interleave_skip_enable', default_value='true'), - DeclareLaunchArgument('interleave_skip_index', default_value='1'), # 0:skip pattern ir 1: skip flood ir - ] - - 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="screen", - ) - ] - else: - return [ - GroupAction([ - PushRosNamespace(LaunchConfiguration("camera_name")), - ComposableNodeContainer( - name="camera_container", - namespace="", - package="rclcpp_components", - executable="component_container", - composable_node_descriptions=[ - ComposableNode( - package="orbbec_camera", - plugin="orbbec_camera::OBCameraNodeDriver", - name=LaunchConfiguration("camera_name"), - parameters=params, - ), - ], - output="screen", - ) - ]) - ] - - return LaunchDescription( - args + [ - OpaqueFunction(function=lambda context: create_node_action(context, args)) - ] - ) diff --git a/orbbec_camera/launch/gemini_330_series_interleave_laser_g335L.launch.py b/orbbec_camera/launch/gemini_330_series_interleave_laser_g335L.launch.py deleted file mode 100644 index 36891fb9..00000000 --- a/orbbec_camera/launch/gemini_330_series_interleave_laser_g335L.launch.py +++ /dev/null @@ -1,270 +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='true'), - DeclareLaunchArgument('serial_number', default_value=''), - DeclareLaunchArgument('usb_port', default_value=''), - DeclareLaunchArgument('device_num', default_value='1'), - 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='30'), - DeclareLaunchArgument('color_format', default_value='YUYV'), - 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('color_ae_roi_left', default_value='-1'), - DeclareLaunchArgument('color_ae_roi_top', default_value='-1'), - DeclareLaunchArgument('color_ae_roi_right', default_value='-1'), - DeclareLaunchArgument('color_ae_roi_bottom', default_value='-1'), - DeclareLaunchArgument('depth_width', default_value='0'), - DeclareLaunchArgument('depth_height', default_value='0'), - DeclareLaunchArgument('depth_fps', default_value='30'), - DeclareLaunchArgument('depth_format', default_value='Y16'), - DeclareLaunchArgument('enable_depth', default_value='true'), - DeclareLaunchArgument('depth_qos', default_value='default'), - DeclareLaunchArgument('depth_camera_info_qos', default_value='default'), - DeclareLaunchArgument('depth_ae_roi_left', default_value='-1'), - DeclareLaunchArgument('depth_ae_roi_top', default_value='-1'), - DeclareLaunchArgument('depth_ae_roi_right', default_value='-1'), - DeclareLaunchArgument('depth_ae_roi_bottom', default_value='-1'), - DeclareLaunchArgument('left_ir_width', default_value='0'), - DeclareLaunchArgument('left_ir_height', default_value='0'), - DeclareLaunchArgument('left_ir_fps', default_value='30'), - DeclareLaunchArgument('left_ir_format', default_value='Y8'), - DeclareLaunchArgument('enable_left_ir', default_value='true'), - 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='30'), - DeclareLaunchArgument('right_ir_format', default_value='Y8'), - 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('liner_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('enable_publish_extrinsic', default_value='false'), - DeclareLaunchArgument('enable_d2c_viewer', default_value='false'), - DeclareLaunchArgument('enable_ldp', 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('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('use_hardware_time', default_value='true'), - 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='true'), - DeclareLaunchArgument('enable_noise_removal_filter', default_value='true'), - 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='6000'), - DeclareLaunchArgument('threshold_filter_min', default_value='100'), - DeclareLaunchArgument('noise_removal_filter_min_diff', default_value='256'), - DeclareLaunchArgument('noise_removal_filter_max_size', default_value='120'), - 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('laser_on_off_mode', default_value='0'), - DeclareLaunchArgument('retry_on_usb3_detection_failure', default_value='false'), - DeclareLaunchArgument('laser_energy_level', default_value='-1'), - DeclareLaunchArgument('enable_3d_reconstruction_mode', default_value='false'), - DeclareLaunchArgument('enable_sync_host_time', default_value='true'), - DeclareLaunchArgument('time_domain', default_value='device'), - DeclareLaunchArgument('enable_color_undistortion', default_value='false'), - DeclareLaunchArgument('config_file_path', default_value=''), - DeclareLaunchArgument('enable_heartbeat', default_value='false'), - DeclareLaunchArgument('enable_hardware_reset', default_value='false'), - DeclareLaunchArgument('interleave_ae_mode', default_value='laser'), # 'hdr' or 'laser' - DeclareLaunchArgument('interleave_frame_enable', default_value='true'), - DeclareLaunchArgument('interleave_skip_enable', default_value='true'), - DeclareLaunchArgument('interleave_skip_index', default_value='0'), # 0:skip pattern ir 1: skip flood ir - - DeclareLaunchArgument('hdr_index1_laser_control', default_value='1'), - DeclareLaunchArgument('hdr_index1_depth_exposure', default_value='1'), - DeclareLaunchArgument('hdr_index1_depth_gain', default_value='16'), - DeclareLaunchArgument('hdr_index1_ir_brightness', default_value='20'), - DeclareLaunchArgument('hdr_index1_ir_ae_max_exposure', default_value='2000'), - 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='60'), - DeclareLaunchArgument('hdr_index0_ir_ae_max_exposure', default_value='10000'), - - DeclareLaunchArgument('laser_index1_laser_control', default_value='0'), - 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='7000'), - 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='5000'), - - DeclareLaunchArgument('use_intra_process_comms', default_value='false'), - DeclareLaunchArgument('attach_to_shared_component_container', default_value='false'), - DeclareLaunchArgument('component_container_name', default_value='shared_orbbec_container'), - DeclareLaunchArgument('delta_duration_us', default_value='1000.0'), - DeclareLaunchArgument('delta_fps', default_value='2'), - DeclareLaunchArgument('gmsl_trigger_fps', default_value='3000'), - DeclareLaunchArgument('enable_gmsl_trigger', default_value='false'), - ] - - 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="screen", - ) - ] - else: - 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='screen', - condition=UnlessCondition(attach_to_shared_component_container_arg) - ) - return [ - shared_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)) - ] - ) diff --git a/orbbec_camera/launch/gemini_330_series_interleave_laser_g335_components.launch.py b/orbbec_camera/launch/gemini_330_series_interleave_laser_g335_components.launch.py deleted file mode 100644 index 94ae454e..00000000 --- a/orbbec_camera/launch/gemini_330_series_interleave_laser_g335_components.launch.py +++ /dev/null @@ -1,245 +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='true'), - DeclareLaunchArgument('serial_number', default_value=''), - DeclareLaunchArgument('usb_port', default_value=''), - DeclareLaunchArgument('device_num', default_value='1'), - 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='30'), - DeclareLaunchArgument('color_format', default_value='MJPG'), - 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('color_ae_roi_left', default_value='-1'), - DeclareLaunchArgument('color_ae_roi_top', default_value='-1'), - DeclareLaunchArgument('color_ae_roi_right', default_value='-1'), - DeclareLaunchArgument('color_ae_roi_bottom', default_value='-1'), - DeclareLaunchArgument('depth_width', default_value='0'), - DeclareLaunchArgument('depth_height', default_value='0'), - DeclareLaunchArgument('depth_fps', default_value='30'), - DeclareLaunchArgument('depth_format', default_value='Y16'), - DeclareLaunchArgument('enable_depth', default_value='true'), - DeclareLaunchArgument('depth_qos', default_value='default'), - DeclareLaunchArgument('depth_camera_info_qos', default_value='default'), - DeclareLaunchArgument('depth_ae_roi_left', default_value='-1'), - DeclareLaunchArgument('depth_ae_roi_top', default_value='-1'), - DeclareLaunchArgument('depth_ae_roi_right', default_value='-1'), - DeclareLaunchArgument('depth_ae_roi_bottom', default_value='-1'), - DeclareLaunchArgument('left_ir_width', default_value='0'), - DeclareLaunchArgument('left_ir_height', default_value='0'), - DeclareLaunchArgument('left_ir_fps', default_value='30'), - DeclareLaunchArgument('left_ir_format', default_value='Y8'), - DeclareLaunchArgument('enable_left_ir', default_value='true'), - 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='30'), - DeclareLaunchArgument('right_ir_format', default_value='Y8'), - 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('liner_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('enable_publish_extrinsic', default_value='false'), - DeclareLaunchArgument('enable_d2c_viewer', default_value='false'), - DeclareLaunchArgument('enable_ldp', 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('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('use_hardware_time', default_value='true'), - 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_noise_removal_filter', default_value='true'), - 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('laser_on_off_mode', default_value='0'), - DeclareLaunchArgument('retry_on_usb3_detection_failure', default_value='false'), - DeclareLaunchArgument('laser_energy_level', default_value='-1'), - DeclareLaunchArgument('enable_3d_reconstruction_mode', default_value='false'), - DeclareLaunchArgument('enable_sync_host_time', default_value='true'), - DeclareLaunchArgument('time_domain', default_value='device'), - DeclareLaunchArgument('enable_color_undistortion', default_value='false'), - DeclareLaunchArgument('config_file_path', default_value=''), - DeclareLaunchArgument('enable_heartbeat', default_value='false'), - DeclareLaunchArgument('enable_hardware_reset', default_value='false'), - DeclareLaunchArgument('interleave_ae_mode', default_value='laser'), # 'hdr' or 'laser' - DeclareLaunchArgument('interleave_frame_enable', default_value='true'), - DeclareLaunchArgument('interleave_skip_enable', default_value='true'), - DeclareLaunchArgument('interleave_skip_index', default_value='1'), # 0:partern ir 1:flood ir - DeclareLaunchArgument('use_intra_process_comms', default_value='false'), - DeclareLaunchArgument('attach_to_shared_component_container', default_value='false'), - DeclareLaunchArgument('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="screen", - ) - ] - 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)) - ] - ) diff --git a/orbbec_camera/launch/gemini_intra_process_demo_launch.py b/orbbec_camera/launch/gemini_intra_process_demo_launch.py index fb478050..9bda0357 100644 --- a/orbbec_camera/launch/gemini_intra_process_demo_launch.py +++ b/orbbec_camera/launch/gemini_intra_process_demo_launch.py @@ -137,7 +137,7 @@ def generate_launch_description(): 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('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'), @@ -159,7 +159,6 @@ def generate_launch_description(): DeclareLaunchArgument('enable_laser', default_value='true'), DeclareLaunchArgument('depth_precision', default_value=''), DeclareLaunchArgument('device_preset', default_value='Default'), - DeclareLaunchArgument('laser_on_off_mode', default_value='0'), DeclareLaunchArgument('retry_on_usb3_detection_failure', default_value='false'), DeclareLaunchArgument('laser_energy_level', default_value='-1'), DeclareLaunchArgument('enable_3d_reconstruction_mode', default_value='false'), diff --git a/orbbec_camera/launch/multi_camera_interleave_larse_test.launch.py b/orbbec_camera/launch/multi_camera_interleave_larse_test.launch.py deleted file mode 100644 index 07dd6e44..00000000 --- a/orbbec_camera/launch/multi_camera_interleave_larse_test.launch.py +++ /dev/null @@ -1,45 +0,0 @@ -from launch import LaunchDescription -from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription, GroupAction, ExecuteProcess -from launch.launch_description_sources import PythonLaunchDescriptionSource -from launch_ros.actions import Node -from ament_index_python.packages import get_package_share_directory -import os - - -def generate_launch_description(): - # Include launch files - package_dir = get_package_share_directory('orbbec_camera') - launch_file_dir = os.path.join(package_dir, 'launch') - launch1_include = IncludeLaunchDescription( - PythonLaunchDescriptionSource( - os.path.join(launch_file_dir, 'gemini_330_series_interleave_laser_g335.launch.py') - ), - launch_arguments={ - 'camera_name': 'camera_01', - 'usb_port': '2-1-2', - 'device_num': '2', - 'sync_mode': 'PRIMARY' - }.items() - ) - - launch2_include = IncludeLaunchDescription( - PythonLaunchDescriptionSource( - os.path.join(launch_file_dir, 'gemini_330_series_interleave_laser_g335L.launch.py') - ), - launch_arguments={ - 'camera_name': 'camera_02', - 'usb_port': '2-2-3', - 'device_num': '2', - 'sync_mode': 'SECONDARY_SYNCED' - }.items() - ) - - # If you need more cameras, just add more launch_include here, and change the usb_port and device_num - - # Launch description - ld = LaunchDescription([ - GroupAction([launch1_include]), - GroupAction([launch2_include]), - ]) - - return ld diff --git a/orbbec_camera/launch/multi_camera_synced.launch.py b/orbbec_camera/launch/multi_camera_synced.launch.py index 12369f4c..2071184b 100644 --- a/orbbec_camera/launch/multi_camera_synced.launch.py +++ b/orbbec_camera/launch/multi_camera_synced.launch.py @@ -41,7 +41,7 @@ def generate_launch_description(): front_camera = IncludeLaunchDescription( PythonLaunchDescriptionSource( - os.path.join(launch_file_dir, "gemini_330_series_interleave_laser_g335L.launch.py") + os.path.join(launch_file_dir, "gemini_330_series.launch.py") ), launch_arguments={ "camera_name": "front_camera", diff --git a/orbbec_camera/launch/multi_camera_synced_components.launch.py b/orbbec_camera/launch/multi_camera_synced_components.launch.py deleted file mode 100644 index 2278b3e5..00000000 --- a/orbbec_camera/launch/multi_camera_synced_components.launch.py +++ /dev/null @@ -1,89 +0,0 @@ -import os -import time -from ament_index_python.packages import get_package_share_directory -from launch import LaunchDescription -from launch_ros.actions import Node -from launch.actions import IncludeLaunchDescription, GroupAction, TimerAction -from launch.event_handlers import OnProcessExit -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 -def generate_launch_description(): - # Include launch files - package_dir = get_package_share_directory("orbbec_camera") - launch_file_dir = os.path.join(package_dir, "launch") - config_file_dir = os.path.join(package_dir, "config") - config_file_335_path = os.path.join(config_file_dir, "camera_335_params.yaml") - config_file_335L_path = os.path.join(config_file_dir, "camera_335L_params.yaml") - - use_intra_process_comms_declare = DeclareLaunchArgument( - 'use_intra_process_comms', default_value='false', - ) - attach_to_shared_component_container_declare = DeclareLaunchArgument( - 'attach_to_shared_component_container', default_value='false', - ) - component_container_name_declare = DeclareLaunchArgument( - 'component_container_name', default_value='shared_orbbec_container' - ) - - 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='screen', - condition=UnlessCondition(attach_to_shared_component_container_arg) - ) - - attach_to_shared_component_container_arg = TextSubstitution(text='true') - - G0_41 = IncludeLaunchDescription( - PythonLaunchDescriptionSource( - os.path.join(launch_file_dir, "gemini_330_series_interleave_laser_g335_components.launch.py") - ), - launch_arguments={ - "camera_name": "G0_41", - "usb_port": "2-7", - "device_num": "2", - "sync_mode": "primary", - 'use_intra_process_comms': LaunchConfiguration("use_intra_process_comms"), - 'attach_to_shared_component_container': attach_to_shared_component_container_arg, - 'component_container_name': component_container_name_arg, - "config_file_path": config_file_335_path, - }.items(), - ) - - G1_50 = IncludeLaunchDescription( - PythonLaunchDescriptionSource( - os.path.join(launch_file_dir, "gemini_330_series_interleave_laser_g335_components.launch.py") - ), - launch_arguments={ - "camera_name": "G1_50", - "usb_port": "2-1", - "device_num": "2", - "sync_mode": "secondary_synced", - 'use_intra_process_comms': LaunchConfiguration("use_intra_process_comms"), - 'attach_to_shared_component_container': attach_to_shared_component_container_arg, - 'component_container_name': component_container_name_arg, - "config_file_path": config_file_335_path, - }.items(), - ) - - - # If you need more cameras, just add more launch_include here, and change the usb_port and device_num - - ld = LaunchDescription([ - use_intra_process_comms_declare, - attach_to_shared_component_container_declare, - component_container_name_declare, - shared_orbbec_container, - G1_50, - TimerAction(period=3.0, actions=[G0_41]), - ]) - - return ld - diff --git a/orbbec_camera/launch/orbbec_camera.launch.py b/orbbec_camera/launch/orbbec_camera.launch.py new file mode 100644 index 00000000..35d917dd --- /dev/null +++ b/orbbec_camera/launch/orbbec_camera.launch.py @@ -0,0 +1,184 @@ +import os +import yaml +import logging +from launch import LaunchDescription +from launch.actions import DeclareLaunchArgument, OpaqueFunction +from launch.substitutions import LaunchConfiguration +from launch_ros.actions import Node +from launch_ros.descriptions import ComposableNode +from launch.conditions import UnlessCondition +from launch_ros.actions import LoadComposableNodes +from ament_index_python.packages import get_package_share_directory +import sys +sys.path.append(os.path.dirname(os.path.realpath(__file__))) +from utils_yaml import * + +logging.basicConfig(level=logging.INFO) +logger = logging.getLogger(__name__) + + +default_package_name = 'orbbec_camera' +default_camera_model = 'gemini330_series' +default_common_yaml = 'common.yaml' +default_component_container_name = 'orbbec_container' + +def generate_launch_arguments(): + launch_arguments = [ + #general config + DeclareLaunchArgument('camera_model', default_value=default_camera_model), + DeclareLaunchArgument('config_file_path', default_value=''), + #multi-device sync param + DeclareLaunchArgument('camera_name', default_value='camera'), + DeclareLaunchArgument('usb_port', default_value=''), + DeclareLaunchArgument('device_num', default_value='1'), + DeclareLaunchArgument('sync_mode', default_value='standalone'), + #instra-process demo set + DeclareLaunchArgument('use_intra_process_comms', default_value='false'), + DeclareLaunchArgument('attach_component_container_enable', default_value='false'), + DeclareLaunchArgument('attach_component_container_name', default_value=default_component_container_name), + ] + return launch_arguments + + +def load_common_yaml_params(): + common_yaml_path = os.path.join( + get_package_share_directory(default_package_name), 'config', default_common_yaml + ) + common_yaml_path = get_absolute_path(common_yaml_path, package_name=default_package_name) + logger.info(f"load convert Absolute path: {common_yaml_path}") + return load_and_parse_yaml(common_yaml_path) + + +def load_config_yaml_params(config_file_path, camera_model): + config_yaml_path = config_file_path or os.path.join( + get_package_share_directory(default_package_name), 'config', f"{camera_model}.yaml" + ) + config_yaml_path = get_absolute_path(config_yaml_path, package_name=default_package_name) + print(f"load convert Absolute config_yaml_path: {config_yaml_path}") + return load_and_parse_yaml(config_yaml_path) + + +def load_parameters(context, args): + camera_model = LaunchConfiguration("camera_model").perform(context) + config_file_path = LaunchConfiguration("config_file_path").perform(context) + usb_port = LaunchConfiguration("usb_port").perform(context) + print(f"camera_model: {camera_model}", f"config_file_path: {config_file_path}", f"usb_port: {usb_port}") + + try: + #1.load ymal params + yaml_common_params = load_common_yaml_params() + yaml_params = load_config_yaml_params(config_file_path,camera_model) + #print_params(yaml_common_params) + #print_params(yaml_params) + yaml_params = update_params(yaml_common_params,yaml_params) + #print_params(yaml_params) + + #2.load args params + args_params = {arg.name: LaunchConfiguration(arg.name).perform(context) for arg in args} + #print_params(args_params) + + #3.meger params args + if usb_port is None or usb_port == "": #meger yaml->args params + print("usb_port param null") + default_params = update_params(args_params, yaml_params) + else: + print("usb_port param not null value:", usb_port) #meger args->yaml params + default_params = update_params(yaml_params, args_params) + #print_params(default_params) + + #4.load cmd params & meger params cmd->yaml + cmd_params = dict([a for a in [a.split(':=') for a in sys.argv] if len(a) == 2]) + default_params = update_params(default_params,cmd_params) + #print_params(args_params) + + except (FileNotFoundError, yaml.YAMLError) as e: + logger.error(f"Error loading YAML file: {e}") + return {} + + #5.Skip conversion for specific parameters + SKIP_CONVERT = {'config_file_path', 'usb_port', 'serial_number', 'attach_component_container_name'} + return { + key: (value if key in SKIP_CONVERT else convert_value(value)) + for key, value in default_params.items() + } + + +def find_camera_name(params): + return find_param(params, 'camera_name', 'camera') + +def find_use_intra_process_comms(params): + return find_param(params, 'use_intra_process_comms', False) + + +def generate_launch_description(): + args = generate_launch_arguments() + def get_params(context, args): + return [load_parameters(context, args)] + + def create_composable_node(camera_name, params, use_intra_process): + common_arguments = [{'use_intra_process_comms': use_intra_process}] + composable_node = ComposableNode( + namespace=camera_name, + name=camera_name, + package=default_package_name, + plugin='orbbec_camera::OBCameraNodeDriver', + parameters=params, + #extra_arguments=[{'use_intra_process_comms': LaunchConfiguration("use_intra_process_comms")}], + extra_arguments=common_arguments, + ) + return composable_node + + + def create_orbbec_container(attach_component_container_name, attach_component_container_enable): + orbbec_container = Node( + name=attach_component_container_name, + package='rclcpp_components', + executable='component_container_mt', + output='screen', + condition=UnlessCondition(attach_component_container_enable) + ) + return orbbec_container + + + def create_node_action(context, args): + params = get_params(context, args) + camera_name = find_camera_name(params) + + use_intra_process = find_use_intra_process_comms(params) + #use_intra_process = LaunchConfiguration("use_intra_process_comms", default=False).perform(context) + print(f"camera_name: {camera_name}", f"use_intra_process: {use_intra_process}") + + attach_enable_condition = LaunchConfiguration("attach_component_container_enable", default=False).perform(context) + attach_component_container_name = LaunchConfiguration("attach_component_container_name", default='orbbec_container').perform(context) + print(f"attach_enable_condition: {attach_enable_condition}", f"attach_component_container_name: {attach_component_container_name}") + + ros_distro = os.environ.get("ROS_DISTRO", "humble") + if ros_distro == "foxy": + return [ + Node( + package=default_package_name, + executable="orbbec_camera_node", + name="ob_camera_node", + namespace=camera_name, + parameters=params, + output="screen", + #condition=UnlessCondition(attach_enable_condition) + #prefix=['xterm -e gdb -ex run --args'], + ), + ] + else: + composable_node = create_composable_node(camera_name, params, use_intra_process) + orbbec_container= create_orbbec_container(attach_component_container_name, attach_enable_condition) + return [ + orbbec_container, + LoadComposableNodes( + target_container=attach_component_container_name, + composable_node_descriptions=[composable_node] + ), + ] + + return LaunchDescription( + args + [ + OpaqueFunction(function=lambda context: create_node_action(context, args)) + ] + ) \ No newline at end of file diff --git a/orbbec_camera/launch/orbbec_multicamera.launch.py b/orbbec_camera/launch/orbbec_multicamera.launch.py new file mode 100644 index 00000000..0541f4a6 --- /dev/null +++ b/orbbec_camera/launch/orbbec_multicamera.launch.py @@ -0,0 +1,112 @@ +import os +import yaml +from launch import LaunchDescription +from launch.actions import IncludeLaunchDescription, TimerAction +from launch.launch_description_sources import PythonLaunchDescriptionSource +from ament_index_python.packages import get_package_share_directory +from launch.substitutions import LaunchConfiguration +from launch.conditions import IfCondition +from launch_ros.actions import Node +from launch.actions import DeclareLaunchArgument +from launch.actions import DeclareLaunchArgument, OpaqueFunction +import sys +sys.path.append(os.path.dirname(os.path.realpath(__file__))) +from utils_yaml import * + + +default_package_name = 'orbbec_camera' +default_launch_file = 'orbbec_camera.launch.py' +default_multi_camera_config_file = 'multicamera.yaml' #'multi_camera_synced.ymal' +default_shared_container_name = 'shared_orbbec_container' + + +def generate_launch_arguments(): + launch_arguments = [ + #general config + DeclareLaunchArgument('config_file_path', default_value=default_multi_camera_config_file), + #instra-process demo set + DeclareLaunchArgument('use_intra_process_comms', default_value='false'), #false + DeclareLaunchArgument('attach_component_container_enable', default_value='false'), #false + DeclareLaunchArgument('attach_component_container_name', default_value=default_shared_container_name), + ] + return launch_arguments + + +def generate_camera_node(args, launch_file_dir, camera_params, launch_file=default_launch_file): + config_params = {key: value for key, value in camera_params.items()} + #load launch_arguments and meger to yaml params + args_params = {arg.name: arg.default_value for arg in args} + #print_params(args_params) + default_params = update_params(args_params, config_params) + #print_params(default_params) + return IncludeLaunchDescription( + PythonLaunchDescriptionSource( + os.path.join(launch_file_dir, launch_file) + ), + launch_arguments=default_params.items() + ) + + +def load_yaml_params(config_file_path): + config_yaml_path = config_file_path or os.path.join(get_package_share_directory(default_package_name), 'config', config_file_path) + config_yaml_path = get_absolute_path(config_yaml_path, package_name=default_package_name) + print(f"load convert Absolute config_yaml_path: {config_yaml_path}") + return load_yaml(config_yaml_path) + + +def generate_launch_description(): + args=generate_launch_arguments() + package_dir = get_package_share_directory(default_package_name) + launch_file_dir = os.path.join(package_dir, "launch") + + + def create_share_container(attach_component_container_name, attach_enable_condition): + shared_container = Node( + name=attach_component_container_name, + package='rclcpp_components', + executable='component_container_mt', + output='screen', + condition=IfCondition(attach_enable_condition) + ) + return shared_container + + + def create_node_action(context, args): + attach_enable_condition = LaunchConfiguration("attach_component_container_enable", default=False).perform(context) + attach_component_container_name = LaunchConfiguration("attach_component_container_name", default=default_shared_container_name).perform(context) + use_intra_process_comms = LaunchConfiguration("use_intra_process_comms", default=False).perform(context) + print(f"attach_enable_condition: {attach_enable_condition}", f"attach_component_container_name: {attach_component_container_name}") + print(f"use_intra_process_comms: {use_intra_process_comms}") + shared_container_node = create_share_container(attach_component_container_name, attach_enable_condition) + + config_file_path = LaunchConfiguration("config_file_path", default=default_multi_camera_config_file).perform(context) + print(f"config_file_path: {config_file_path}") + #camera_config_file = os.path.join(package_dir, "config", config_file_path) + config_params = load_yaml_params(config_file_path) + if not config_params: + raise Exception("Failed to load multi-camera configuration.") + + camera_params = config_params['orbbec_ros']['multi_camera_parameters'] + camera_actions = [] + for camera_key in camera_params: + if camera_key.startswith('launch_device_camera'): + camera_config = camera_params[camera_key] + #print_params(camera_config) + period_value = float(camera_config.pop('period', '0.0')) + print(f"period_value: {period_value}", f"camera_config: {camera_config}") + + camera_node = generate_camera_node(args, launch_file_dir, camera_config) + camera_action = TimerAction(period=period_value, actions=[camera_node]) + camera_actions.append(camera_action) + + nodes = [ + shared_container_node, + *camera_actions, + ] + return nodes + + return LaunchDescription( + args + [ + OpaqueFunction(function=lambda context: create_node_action(context, args)) + ] + ) \ No newline at end of file diff --git a/orbbec_camera/launch/utils_yaml.py b/orbbec_camera/launch/utils_yaml.py new file mode 100644 index 00000000..cbd1a2d1 --- /dev/null +++ b/orbbec_camera/launch/utils_yaml.py @@ -0,0 +1,86 @@ +import os +import yaml +import logging +from ament_index_python.packages import get_package_share_directory + +logging.basicConfig(level=logging.INFO) +logger = logging.getLogger(__name__) + + +def load_yaml(file_path): + try: + with open(file_path, 'r') as f: + return yaml.safe_load(f) + except FileNotFoundError: + logger.error(f"File {file_path} not found.") + return {} + except yaml.YAMLError as e: + logger.error(f"Error parsing YAML file {file_path}: {e}") + return {} + + +def parse_yaml(data, prefix='', params=None): + if params is None: + params = {} + if isinstance(data, dict): + for key, value in data.items(): + new_prefix = f'{key}.' if prefix else key + '.' + params = parse_yaml(value, prefix=new_prefix, params=params) + elif isinstance(data, list): + for index, item in enumerate(data): + params = parse_yaml(item, prefix=f'[{index}].', params=params) + else: + params[prefix[:-1]] = data + #print(f'{prefix}: {data}') + return params + + +def load_and_parse_yaml(file_path): + data = load_yaml(file_path) + return parse_yaml(data) if data else {} + + +def update_params(default_params, yaml_params): + default_params.update(yaml_params) + return default_params + + +def find_param(params, key, default_value=None): + if isinstance(params, dict): + return params.get(key, default_value) + elif isinstance(params, list): + for param_dict in params: + if isinstance(param_dict, dict) and key in param_dict: + return param_dict[key] + return default_value + + +def get_absolute_path(config_file_path, package_name): + if not os.path.isabs(config_file_path): + logger.info(f"not Absolute path: {config_file_path}") + return os.path.join(get_package_share_directory(package_name), 'config', config_file_path) + logger.info(f"Absolute path: {config_file_path}") + return config_file_path + + +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 print_params(default_params): + print(f"\n----------------------------------------") + for key, value in default_params.items(): + print(f"Key: {key}, Value: {value}") + print(f"----------------------------------------\n") \ No newline at end of file diff --git a/orbbec_camera/package.xml b/orbbec_camera/package.xml index 4dd675bf..aa04e8bf 100644 --- a/orbbec_camera/package.xml +++ b/orbbec_camera/package.xml @@ -2,7 +2,7 @@ orbbec_camera - 2.0.9 + 2.1.1 Orbbec Camera package Joe Dong Apache-2.0 diff --git a/orbbec_camera/src/ob_camera_node.cpp b/orbbec_camera/src/ob_camera_node.cpp index b23e121f..24a5337f 100644 --- a/orbbec_camera/src/ob_camera_node.cpp +++ b/orbbec_camera/src/ob_camera_node.cpp @@ -225,10 +225,6 @@ void OBCameraNode::setupDevices() { RCLCPP_INFO_STREAM(logger_, "Setting laser control to " << enable_laser_); TRY_TO_SET_PROPERTY(setIntProperty, OB_PROP_LASER_BOOL, enable_laser_); } - if (device_->isPropertySupported(OB_PROP_LASER_ON_OFF_MODE_INT, OB_PERMISSION_READ_WRITE)) { - RCLCPP_INFO_STREAM(logger_, "Setting laser on off mode to " << laser_on_off_mode_); - TRY_TO_SET_PROPERTY(setIntProperty, OB_PROP_LASER_ON_OFF_MODE_INT, laser_on_off_mode_); - } if (!device_preset_.empty()) { try { RCLCPP_INFO_STREAM(logger_, "Available presets:"); @@ -402,8 +398,6 @@ void OBCameraNode::setupDevices() { if (ir_exposure_ != -1 && device_->isPropertySupported(OB_PROP_IR_EXPOSURE_INT, OB_PERMISSION_WRITE)) { auto range = device_->getIntPropertyRange(OB_PROP_IR_EXPOSURE_INT); - RCLCPP_ERROR(logger_, "ir exposure value is out of range[%d,%d], please check the value", - range.min, range.max); if (ir_exposure_ < range.min || ir_exposure_ > range.max) { RCLCPP_ERROR(logger_, "ir exposure value is out of range[%d,%d], please check the value", range.min, range.max); @@ -414,8 +408,6 @@ void OBCameraNode::setupDevices() { } if (ir_gain_ != -1 && device_->isPropertySupported(OB_PROP_IR_GAIN_INT, OB_PERMISSION_WRITE)) { auto range = device_->getIntPropertyRange(OB_PROP_IR_GAIN_INT); - RCLCPP_ERROR(logger_, "ir gain value is out of range[%d,%d], please check the value", range.min, - range.max); if (ir_gain_ < range.min || ir_gain_ > range.max) { RCLCPP_ERROR(logger_, "ir gain value is out of range[%d,%d], please check the value", range.min, range.max); @@ -469,8 +461,8 @@ void OBCameraNode::setupDepthPostProcessFilter() { auto depth_sensor = device_->getSensor(OB_SENSOR_DEPTH); // set depth sensor to filter filter_list_ = depth_sensor->createRecommendedFilters(); - if (!filter_list_.empty()) { - // RCLCPP_ERROR(logger_, "Failed to get depth sensor filter list"); + if (filter_list_.empty()) { + RCLCPP_ERROR(logger_, "Failed to get depth sensor filter list"); return; } for (size_t i = 0; i < filter_list_.size(); i++) { @@ -829,19 +821,6 @@ void OBCameraNode::startStreams() { try { setupPipelineConfig(); - // set interleave mode - if (interleave_ae_mode_ == "hdr" && interleave_frame_enable_) { - RCLCPP_INFO_STREAM(logger_, "Setting interleave mode to hdr"); - device_->loadFrameInterleave("hdr interleave"); - init_interleave_hdr_param(); - } else if (interleave_ae_mode_ == "laser" && interleave_frame_enable_) { - RCLCPP_INFO_STREAM(logger_, "Setting interleave mode to laser"); - device_->loadFrameInterleave("laser interleave"); - init_interleave_laser_param(); - } else { - RCLCPP_INFO_STREAM(logger_, "Setting interleave mode to nothing"); - } - pipeline_->start(pipeline_config_, [this](const std::shared_ptr &frame_set) { onNewFrameSetCallback(frame_set); }); @@ -860,7 +839,6 @@ void OBCameraNode::startStreams() { if (enable_stream_[COLOR] && !colorFrameThread_) { colorFrameThread_ = std::make_shared([this]() { onNewColorFrameCallback(); }); } - if (enable_frame_sync_) { RCLCPP_INFO_STREAM(logger_, "Enable frame sync"); TRY_EXECUTE_BLOCK(pipeline_->enableFrameSync()); @@ -868,6 +846,19 @@ void OBCameraNode::startStreams() { RCLCPP_INFO_STREAM(logger_, "Disable frame sync"); TRY_EXECUTE_BLOCK(pipeline_->disableFrameSync()); } + std::this_thread::sleep_for(std::chrono::milliseconds(1000)); + // set interleave mode + if (interleave_ae_mode_ == "hdr" && interleave_frame_enable_) { + RCLCPP_INFO_STREAM(logger_, "Setting interleave mode to hdr"); + device_->loadFrameInterleave("Depth From HDR"); + init_interleave_hdr_param(); + } else if (interleave_ae_mode_ == "laser" && interleave_frame_enable_) { + RCLCPP_INFO_STREAM(logger_, "Setting interleave mode to laser"); + device_->loadFrameInterleave("Laser On-Off"); + init_interleave_laser_param(); + } else { + RCLCPP_INFO_STREAM(logger_, "Setting interleave mode to nothing"); + } // enable interleave frame if ((interleave_ae_mode_ == "hdr") || (interleave_ae_mode_ == "laser")) { RCLCPP_INFO_STREAM(logger_, "current interleave_ae_mode_: " << interleave_ae_mode_); @@ -1232,7 +1223,7 @@ void OBCameraNode::getParameters() { setAndGetNodeParameter(enable_spatial_filter_, "enable_spatial_filter", false); setAndGetNodeParameter(enable_temporal_filter_, "enable_temporal_filter", false); setAndGetNodeParameter(enable_hole_filling_filter_, "enable_hole_filling_filter", false); - setAndGetNodeParameter(decimation_filter_scale_, "decimation_filter_scale_", -1); + setAndGetNodeParameter(decimation_filter_scale_, "decimation_filter_scale", -1); setAndGetNodeParameter(sequence_id_filter_id_, "sequence_id_filter_id", -1); setAndGetNodeParameter(threshold_filter_max_, "threshold_filter_max", -1); setAndGetNodeParameter(threshold_filter_min_, "threshold_filter_min", -1); @@ -1253,7 +1244,6 @@ void OBCameraNode::getParameters() { setAndGetNodeParameter(align_mode_, "align_mode", "HW"); setAndGetNodeParameter(diagnostic_period_, "diagnostic_period", 1.0); setAndGetNodeParameter(enable_laser_, "enable_laser", true); - setAndGetNodeParameter(laser_on_off_mode_, "laser_on_off_mode", 0); std::string align_target_stream_str_; setAndGetNodeParameter(align_target_stream_str_, "align_target_stream", "COLOR"); align_target_stream_ = obStreamTypeFromString(align_target_stream_str_); @@ -1266,9 +1256,6 @@ void OBCameraNode::getParameters() { setAndGetNodeParameter(max_depth_limit_, "max_depth_limit", 0); setAndGetNodeParameter(enable_heartbeat_, "enable_heartbeat", false); setAndGetNodeParameter(enable_color_undistortion_, "enable_color_undistortion", false); - if (enable_3d_reconstruction_mode_) { - laser_on_off_mode_ = 1; // 0 off, 1 on-off, 1 off-on - } setAndGetNodeParameter(time_domain_, "time_domain", "device"); auto device_info = device_->getDeviceInfo(); CHECK_NOTNULL(device_info.get()); @@ -1432,6 +1419,17 @@ void OBCameraNode::setupPipelineConfig() { if (enable_stream_[stream_index]) { RCLCPP_INFO_STREAM(logger_, "Enable " << stream_name_[stream_index] << " stream"); auto profile = stream_profile_[stream_index]->as(); + + if (stream_index == COLOR && enable_stream_[COLOR] && align_filter_) { + auto video_profile = profile; + RCLCPP_INFO_STREAM( + logger_, "color video_profile: " << video_profile->getWidth() << "x" + << video_profile->getHeight() << " " + << video_profile->getFps() << "fps " + << magic_enum::enum_name(video_profile->getFormat())); + align_filter_->setAlignToStreamProfile(video_profile); + } + RCLCPP_INFO_STREAM( logger_, "Stream " << stream_name_[stream_index] << " width: " << profile->getWidth() << " height: " << profile->getHeight() << " fps: " << profile->getFps() @@ -1878,22 +1876,16 @@ void OBCameraNode::onNewFrameSetCallback(std::shared_ptr frame_set tf_published_ = true; } auto depth_frame = frame_set->getFrame(OB_FRAME_DEPTH); - bool depth_laser_status = false; - if (depth_frame && depth_frame->hasMetadata(OB_FRAME_METADATA_TYPE_LASER_STATUS)) { - depth_laser_status = depth_frame->getMetadataValue(OB_FRAME_METADATA_TYPE_LASER_STATUS) == 1; - } auto color_frame = frame_set->getFrame(OB_FRAME_COLOR); - depth_frame = processDepthFrameFilter(depth_frame); - bool depth_aligned = false; if (depth_frame) { + depth_frame = processDepthFrameFilter(depth_frame); frame_set->pushFrame(depth_frame); } - if (depth_registration_ && align_filter_ && depth_frame && color_frame) { + if (depth_registration_ && align_filter_ && depth_frame) { if (auto new_frame = align_filter_->process(frame_set)) { auto new_frame_set = new_frame->as(); CHECK_NOTNULL(new_frame_set.get()); frame_set = new_frame_set; - depth_aligned = true; } else { RCLCPP_ERROR(logger_, "Failed to align depth frame to color frame"); return; @@ -1903,16 +1895,11 @@ void OBCameraNode::onNewFrameSetCallback(std::shared_ptr frame_set "Depth registration is disabled or align filter is null or depth frame is " "null or color frame is null"); } - if (depth_registration_ && align_filter_ && !depth_aligned) { - return; - } if (enable_stream_[COLOR] && color_frame) { std::unique_lock lock(color_frame_queue_lock_); - if (!enable_3d_reconstruction_mode_ || depth_laser_status) { - color_frame_queue_.push(frame_set); - color_frame_queue_cv_.notify_all(); - } + color_frame_queue_.push(frame_set); + color_frame_queue_cv_.notify_all(); } else { publishPointCloud(frame_set); } @@ -1927,24 +1914,7 @@ void OBCameraNode::onNewFrameSetCallback(std::shared_ptr frame_set if (frame == nullptr) { continue; } - if (stream_index == DEPTH) { - frame = (enable_3d_reconstruction_mode_ && !depth_laser_status) ? nullptr : frame; - } - auto is_ir_frame = frame_type == OB_FRAME_IR_LEFT || frame_type == OB_FRAME_IR_RIGHT || - frame_type == OB_FRAME_IR; - if (is_ir_frame) { - std::shared_ptr ir_frame = - frame->getFormat() == OB_FORMAT_MJPG ? decodeIRMJPGFrame(frame) : frame; - bool ir_laser_status = false; - if (ir_frame && ir_frame->hasMetadata(OB_FRAME_METADATA_TYPE_LASER_STATUS)) { - ir_laser_status = ir_frame->getMetadataValue(OB_FRAME_METADATA_TYPE_LASER_STATUS) == 1; - } - if (ir_frame && (!enable_3d_reconstruction_mode_ || !ir_laser_status)) { - onNewFrameCallback(ir_frame, stream_index); - } - } else if (frame_type == OB_FRAME_DEPTH) { - onNewFrameCallback(frame, stream_index); - } + onNewFrameCallback(frame, stream_index); } } } catch (const ob::Error &e) { diff --git a/orbbec_camera/src/ob_camera_node_driver.cpp b/orbbec_camera/src/ob_camera_node_driver.cpp index e676ad0e..7c31cf7b 100644 --- a/orbbec_camera/src/ob_camera_node_driver.cpp +++ b/orbbec_camera/src/ob_camera_node_driver.cpp @@ -125,7 +125,6 @@ void OBCameraNodeDriver::init() { } auto log_level_str = declare_parameter("log_level", "none"); - std::cout << "=========log_level_str " << log_level_str << std::endl; auto log_level = obLogSeverityFromString(log_level_str); connection_delay_ = static_cast(declare_parameter("connection_delay", 100)); enable_sync_host_time_ = declare_parameter("enable_sync_host_time", true); @@ -163,6 +162,17 @@ void OBCameraNodeDriver::init() { net_device_ip_ = declare_parameter("net_device_ip", ""); net_device_port_ = static_cast(declare_parameter("net_device_port", 0)); enumerate_net_device_ = declare_parameter("enumerate_net_device", false); + uvc_backend_ = declare_parameter("uvc_backend", "libuvc"); + if (uvc_backend_ == "libuvc") { + ctx_->setUvcBackendType(OB_UVC_BACKEND_TYPE_LIBUVC); + RCLCPP_INFO_STREAM(logger_, "setUvcBackendType:" << uvc_backend_); + } else if (uvc_backend_ == "v4l2") { + ctx_->setUvcBackendType(OB_UVC_BACKEND_TYPE_V4L2); + RCLCPP_INFO_STREAM(logger_, "setUvcBackendType:" << uvc_backend_); + } else { + ctx_->setUvcBackendType(OB_UVC_BACKEND_TYPE_LIBUVC); + RCLCPP_INFO_STREAM(logger_, "setUvcBackendType:" << uvc_backend_); + } ctx_->enableNetDeviceEnumeration(enumerate_net_device_); ctx_->setDeviceChangedCallback([this](const std::shared_ptr &removed_list, const std::shared_ptr &added_list) { diff --git a/orbbec_camera/tools/multi_save_rgbir_node.hpp b/orbbec_camera/tools/multi_save_rgbir_node.hpp index b25283f0..4cdacd7d 100644 --- a/orbbec_camera/tools/multi_save_rgbir_node.hpp +++ b/orbbec_camera/tools/multi_save_rgbir_node.hpp @@ -19,6 +19,18 @@ struct ImageMetadata { class MultiCameraSubscriber : public rclcpp::Node { public: MultiCameraSubscriber() : Node("multi_camera_subscriber") { device_init(); } + ~MultiCameraSubscriber() { + ir_image_buffers_.clear(); + ir_current_timestamp_buffers_.clear(); + ir_timestamp_buffers_.clear(); + color_image_buffers_.clear(); + color_current_timestamp_buffers_.clear(); + color_timestamp_buffers_.clear(); + left_ir_metadata_.exposure_buffs.clear(); + left_ir_metadata_.gain_buffs.clear(); + color_metadata_.exposure_buffs.clear(); + color_metadata_.gain_buffs.clear(); + } void device_init() { try { auto context = std::make_unique(); @@ -33,9 +45,9 @@ class MultiCameraSubscriber : public rclcpp::Node { serial_numbers_[usb_port] = serial; // RCLCPP_INFO_STREAM(rclcpp::get_logger("list_device_node"), ":list->deviceCount(): " << // list->deviceCount()); - color_frame_counters_[count] = 0; - ir_frame_counters_[count] = 0; - count++; + color_frame_counters_[count_] = 0; + ir_frame_counters_[count_] = 0; + count_++; } } catch (ob::Error &e) { RCLCPP_ERROR_STREAM(get_logger(), e.getMessage()); @@ -94,6 +106,17 @@ class MultiCameraSubscriber : public rclcpp::Node { } } void topic_init() { + ir_image_buffers_.resize(left_ir_topics_.size()); + color_image_buffers_.resize(left_ir_topics_.size()); + ir_current_timestamp_buffers_.resize(left_ir_topics_.size()); + color_current_timestamp_buffers_.resize(left_ir_topics_.size()); + ir_timestamp_buffers_.resize(left_ir_topics_.size()); + color_timestamp_buffers_.resize(left_ir_topics_.size()); + left_ir_metadata_.exposure_buffs.resize(left_ir_topics_.size()); + left_ir_metadata_.gain_buffs.resize(left_ir_topics_.size()); + color_metadata_.exposure_buffs.resize(left_ir_topics_.size()); + color_metadata_.gain_buffs.resize(left_ir_topics_.size()); + callback_called_ = std::vector(left_ir_topics_.size(), false); auto custom_qos = rclcpp::QoS(rclcpp::QoSInitialization::from_rmw(rmw_qos_profile_default)); RCLCPP_INFO_STREAM(rclcpp::get_logger("multi_camera_subscriber"), "camera_name_.size(): " << camera_name_.size()); @@ -143,18 +166,6 @@ class MultiCameraSubscriber : public rclcpp::Node { ir_meta_subscribers_.push_back(ir_metadata_sub); color_subscribers_.push_back(color_sub); color_meta_subscribers_.push_back(color_metadata_sub); - - ir_image_buffers_.resize(left_ir_topics_.size()); - color_image_buffers_.resize(left_ir_topics_.size()); - ir_current_timestamp_buffers_.resize(left_ir_topics_.size()); - color_current_timestamp_buffers_.resize(left_ir_topics_.size()); - ir_timestamp_buffers_.resize(left_ir_topics_.size()); - color_timestamp_buffers_.resize(left_ir_topics_.size()); - left_ir_metadata_.exposure_buffs.resize(left_ir_topics_.size()); - left_ir_metadata_.gain_buffs.resize(left_ir_topics_.size()); - color_metadata_.exposure_buffs.resize(left_ir_topics_.size()); - color_metadata_.gain_buffs.resize(left_ir_topics_.size()); - callback_called_ = std::vector(left_ir_topics_.size(), false); } } std::string getCurrentTimes() { @@ -206,8 +217,8 @@ class MultiCameraSubscriber : public rclcpp::Node { auto &color_meta_exposure = color_metadata_.exposure_buffs[index]; auto &color_meta_gain = color_metadata_.gain_buffs[index]; callback_called_[index] = true; - if (ir_images.size() < static_cast(is_saving_images_) || - color_images.size() < static_cast(is_saving_images_)) { + if (ir_images.size() < static_cast(saving_images_number_) || + color_images.size() < static_cast(saving_images_number_)) { return; } RCLCPP_INFO_STREAM(rclcpp::get_logger("multi_camera_subscriber"), "index:" << index); @@ -220,12 +231,12 @@ class MultiCameraSubscriber : public rclcpp::Node { } std::string serial_index = serial_iter->second; - for (size_t i = 0; i < static_cast(is_saving_images_); i++) { + for (size_t i = 0; i < static_cast(saving_images_number_); i++) { std::string folder = generateFolderName(serial_index, usb_index); std::string ir_filename = folder + "/ir#left_SN" + serial_index + "_Index" + std::to_string(usb_index) + time_domain_ + ir_current_timestamps[i] + "_f" + std::to_string(i) + "_s" + - ir_timestamps[i] + "_e" + left_ir_meta_exposure[i] + "_g" + + ir_timestamps[i] + "_e" + left_ir_meta_exposure[i] + "_d" + left_ir_meta_gain[i] + "_.jpg"; if (ir_images[i].empty()) { RCLCPP_INFO_STREAM(rclcpp::get_logger("multi_camera_subscriber"), "over "); @@ -233,17 +244,17 @@ class MultiCameraSubscriber : public rclcpp::Node { } cv::imwrite(ir_filename, ir_images[i]); - std::string color_filename = folder + "/color_SN" + serial_index + "_Index" + std::to_string(usb_index) + time_domain_ + color_current_timestamps[i] + "_f" + std::to_string(i) + "_s" + - color_timestamps[i] + "_e" + color_meta_exposure[i] + "_g" + color_meta_gain[i] + "_.jpg"; + color_timestamps[i] + "_e" + color_meta_exposure[i] + "_d" + color_meta_gain[i] + "_.jpg"; if (color_images[i].empty()) { continue; } cv::imwrite(color_filename, color_images[i]); // RCLCPP_INFO(this->get_logger(), "Saved Color image to: %s", color_filename.c_str()); } + ir_image_buffers_[index].clear(); ir_current_timestamp_buffers_[index].clear(); ir_timestamp_buffers_[index].clear(); @@ -260,26 +271,25 @@ class MultiCameraSubscriber : public rclcpp::Node { std::all_of(callback_called_.begin(), callback_called_.end(), [](bool v) { return v; }); if (all_true) { RCLCPP_INFO_STREAM(rclcpp::get_logger("multi_camera_subscriber"), "over "); - is_saving_images_ = 0; - ir_image_buffers_.clear(); - ir_current_timestamp_buffers_.clear(); - ir_timestamp_buffers_.clear(); - color_image_buffers_.clear(); - color_current_timestamp_buffers_.clear(); - color_timestamp_buffers_.clear(); - // rclcpp::shutdown(); + saving_images_number_ = 0; + callback_called_.clear(); + callback_called_ = std::vector(left_ir_topics_.size(), false); } } void controlCaptureCallback(const std_msgs::msg::Int32::SharedPtr msg) { currenttimes_ = getCurrentTimes(); - is_saving_images_ = msg->data; - topic_init(); - RCLCPP_INFO_STREAM(rclcpp::get_logger("multi_camera_subscriber"), "jjjj " << is_saving_images_); + saving_images_number_ = msg->data; + if (!topic_init_) { + topic_init(); + topic_init_ = true; + } + RCLCPP_INFO_STREAM(rclcpp::get_logger("multi_camera_subscriber"), + "saving_images_number_: " << saving_images_number_); } void irCallback(std::shared_ptr image, size_t index) { std::lock_guard lock(image_mutex_); - if (!callback_called_[index] && static_cast(is_saving_images_)) { + if (!callback_called_[index] && static_cast(saving_images_number_)) { cv::Mat ir_mat = cv_bridge::toCvCopy(image, image->encoding)->image; std::string current_timestamp_ir = getCurrentTimestamp(image); std::string timestamp_ir = getTimestamp(); @@ -289,15 +299,19 @@ class MultiCameraSubscriber : public rclcpp::Node { ir_resolution_ = std::to_string(image->width) + "x" + std::to_string(image->height); RCLCPP_INFO_STREAM(rclcpp::get_logger("multi_camera_subscriber"), ":ir: " << index << ":" << ir_image_buffers_[index].size()); - if (ir_image_buffers_[index].size() >= static_cast(is_saving_images_) && - color_image_buffers_[index].size() >= static_cast(is_saving_images_)) { + if (ir_image_buffers_[index].size() >= static_cast(saving_images_number_) && + color_image_buffers_[index].size() >= static_cast(saving_images_number_) && + color_metadata_.exposure_buffs[index].size() >= + static_cast(saving_images_number_) && + left_ir_metadata_.exposure_buffs[index].size() >= + static_cast(saving_images_number_)) { saveAlignedImages(index); } } } void colorCallback(std::shared_ptr image, size_t index) { std::lock_guard lock(image_mutex_); - if (!callback_called_[index] && static_cast(is_saving_images_)) { + if (!callback_called_[index] && static_cast(saving_images_number_)) { cv::Mat color_mat = cv_bridge::toCvCopy(image, image->encoding)->image; cv::Mat corrected_image; cv::cvtColor(color_mat, corrected_image, cv::COLOR_RGB2BGR); @@ -309,8 +323,12 @@ class MultiCameraSubscriber : public rclcpp::Node { color_resolution_ = std::to_string(image->width) + "x" + std::to_string(image->height); RCLCPP_INFO_STREAM(rclcpp::get_logger("multi_camera_subscriber"), ":color: " << index << ":" << color_image_buffers_[index].size()); - if (ir_image_buffers_[index].size() >= static_cast(is_saving_images_) && - color_image_buffers_[index].size() >= static_cast(is_saving_images_)) { + if (ir_image_buffers_[index].size() >= static_cast(saving_images_number_) && + color_image_buffers_[index].size() >= static_cast(saving_images_number_) && + color_metadata_.exposure_buffs[index].size() >= + static_cast(saving_images_number_) && + left_ir_metadata_.exposure_buffs[index].size() >= + static_cast(saving_images_number_)) { saveAlignedImages(index); } } @@ -319,16 +337,20 @@ class MultiCameraSubscriber : public rclcpp::Node { void ir_meta_Callback(std::shared_ptr msg, size_t index) { std::lock_guard lock(meta_mutex_); - nlohmann::json json_data = nlohmann::json::parse(msg->json_data); - left_ir_metadata_.exposure_buffs[index].push_back(json_data["exposure"].dump()); - left_ir_metadata_.gain_buffs[index].push_back(json_data["gain"].dump()); + if (!callback_called_[index] && static_cast(saving_images_number_)) { + nlohmann::json json_data = nlohmann::json::parse(msg->json_data); + left_ir_metadata_.exposure_buffs[index].push_back(json_data["exposure"].dump()); + left_ir_metadata_.gain_buffs[index].push_back(json_data["gain"].dump()); + } } void color_meta_Callback(std::shared_ptr msg, size_t index) { std::lock_guard lock(meta_mutex_); - nlohmann::json json_data = nlohmann::json::parse(msg->json_data); - color_metadata_.exposure_buffs[index].push_back(json_data["exposure"].dump()); - color_metadata_.gain_buffs[index].push_back(json_data["gain"].dump()); + if (!callback_called_[index] && static_cast(saving_images_number_)) { + nlohmann::json json_data = nlohmann::json::parse(msg->json_data); + color_metadata_.exposure_buffs[index].push_back(json_data["exposure"].dump()); + color_metadata_.gain_buffs[index].push_back(json_data["gain"].dump()); + } } rclcpp::CallbackGroup::SharedPtr reentrant_callback_group_; @@ -345,7 +367,6 @@ class MultiCameraSubscriber : public rclcpp::Node { std::array usb_numbers_; std::array color_frame_counters_; std::array ir_frame_counters_; - size_t count = 0; std::vector usb_params_; std::vector camera_name_; @@ -368,10 +389,13 @@ class MultiCameraSubscriber : public rclcpp::Node { std::string ir_resolution_; std::string currenttimes_; - int is_saving_images_ = 0; + size_t count_ = 0; + int saving_images_number_ = 0; + + bool topic_init_ = false; ImageMetadata left_ir_metadata_ = ImageMetadata(); ImageMetadata color_metadata_ = ImageMetadata(); }; } // namespace tools -} // namespace orbbec_camera +} // namespace orbbec_camera \ No newline at end of file