Merge with OrbbecSDK_ROS2 v2.1.1

This commit is contained in:
datean
2024-12-24 10:19:36 +08:00
parent 629849a345
commit df7ac2381c
58 changed files with 3280 additions and 2683 deletions
+7 -7
View File
@@ -142,8 +142,8 @@ dist/
downloads/ downloads/
eggs/ eggs/
.eggs/ .eggs/
lib/ # lib/
lib64/ # lib64/
parts/ parts/
sdist/ sdist/
var/ var/
@@ -400,11 +400,11 @@ mono_crash.*
[Dd]ebugPublic/ [Dd]ebugPublic/
[Rr]elease/ [Rr]elease/
[Rr]eleases/ [Rr]eleases/
x64/ # x64/
x86/ # x86/
[Ww][Ii][Nn]32/ # [Ww][Ii][Nn]32/
[Aa][Rr][Mm]/ # [Aa][Rr][Mm]/
[Aa][Rr][Mm]64/ # [Aa][Rr][Mm]64/
bld/ bld/
[Bb]in/ [Bb]in/
[Oo]bj/ [Oo]bj/
@@ -746,6 +746,11 @@ typedef enum {
*/ */
OB_PROP_SDK_IR_RIGHT_FRAME_UNPACK_BOOL = 3012, 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) * @brief Calibration JSON file read from device (Femto Mega, read only)
*/ */
@@ -503,7 +503,7 @@ private:
std::map<float, std::string> sequenceIdList_{ { 0.f, "all" }, { 1.f, "1" } }; std::map<float, std::string> sequenceIdList_{ { 0.f, "all" }, { 1.f, "1" } };
OBSequenceIdItem *outputSequenceIdList_ = nullptr; OBSequenceIdItem *outputSequenceIdList_ = nullptr;
void initSeqenceIdList() { void initSequenceIdList() {
outputSequenceIdList_ = new OBSequenceIdItem[sequenceIdList_.size()]; outputSequenceIdList_ = new OBSequenceIdItem[sequenceIdList_.size()];
int i = 0; int i = 0;
@@ -521,7 +521,7 @@ public:
auto impl = ob_create_filter("SequenceIdFilter", &error); auto impl = ob_create_filter("SequenceIdFilter", &error);
Error::handle(&error); Error::handle(&error);
init(impl); init(impl);
initSeqenceIdList(); initSequenceIdList();
} }
virtual ~SequenceIdFilter() noexcept { virtual ~SequenceIdFilter() noexcept {
@@ -387,7 +387,7 @@ public:
/** /**
* @brief Get the stream profile list of supported depth-to-color alignments * @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. * @param alignMode The alignment mode.
* *
* @attention Currently, only ALIGN_D2C_HW_MODE supported. For other align modes, please using the AlignFilter interface. * @attention Currently, only ALIGN_D2C_HW_MODE supported. For other align modes, please using the AlignFilter interface.
@@ -449,4 +449,3 @@ public:
}; };
} // namespace ob } // namespace ob
@@ -8,12 +8,12 @@ set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "ob::OrbbecSDK" for configuration "Release" # Import target "ob::OrbbecSDK" for configuration "Release"
set_property(TARGET ob::OrbbecSDK APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) set_property(TARGET ob::OrbbecSDK APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(ob::OrbbecSDK PROPERTIES set_target_properties(ob::OrbbecSDK PROPERTIES
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so" IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.1.1"
IMPORTED_SONAME_RELEASE "libOrbbecSDK.so" IMPORTED_SONAME_RELEASE "libOrbbecSDK.so.2"
) )
list(APPEND _cmake_import_check_targets ob::OrbbecSDK ) 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. # Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION) set(CMAKE_IMPORT_FILE_VERSION)
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
libOrbbecSDK.so.2
+1
View File
@@ -0,0 +1 @@
libOrbbecSDK.so.2.1.1
Binary file not shown.
@@ -8,12 +8,12 @@ set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "ob::OrbbecSDK" for configuration "Release" # Import target "ob::OrbbecSDK" for configuration "Release"
set_property(TARGET ob::OrbbecSDK APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) set_property(TARGET ob::OrbbecSDK APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(ob::OrbbecSDK PROPERTIES set_target_properties(ob::OrbbecSDK PROPERTIES
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so" IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.1.1"
IMPORTED_SONAME_RELEASE "libOrbbecSDK.so" IMPORTED_SONAME_RELEASE "libOrbbecSDK.so.2"
) )
list(APPEND _cmake_import_check_targets ob::OrbbecSDK ) 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. # Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION) set(CMAKE_IMPORT_FILE_VERSION)
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
libOrbbecSDK.so.2
+1
View File
@@ -0,0 +1 @@
libOrbbecSDK.so.2.1.1
Binary file not shown.
File diff suppressed because it is too large Load Diff
+254 -11
View File
@@ -8,9 +8,9 @@
<!-- Log output level, int type, optional values: 0-DEBUG, 1-INFO, 2-WARN, 3-ERROR, 4-FATAL, <!-- Log output level, int type, optional values: 0-DEBUG, 1-INFO, 2-WARN, 3-ERROR, 4-FATAL,
5-OFF --> 5-OFF -->
<!-- File log output level --> <!-- File log output level -->
<FileLogLevel>0</FileLogLevel> <FileLogLevel>5</FileLogLevel>
<!-- Console log output level --> <!-- Console log output level -->
<ConsoleLogLevel>0</ConsoleLogLevel> <ConsoleLogLevel>3</ConsoleLogLevel>
<!-- Default log output file path, string type. If this item is not configured, the default <!-- Default log output file path, string type. If this item is not configured, the default
path will be used: Win/Linux: "./Log"; Android: "/sdcard/orbbec/Log" --> path will be used: Win/Linux: "./Log"; Android: "/sdcard/orbbec/Log" -->
<!-- <OutputDir>./log</OutputDir> --> <!-- <OutputDir>./log</OutputDir> -->
@@ -36,15 +36,6 @@
<FrameProcessingBlockQueueSize>10</FrameProcessingBlockQueueSize> <FrameProcessingBlockQueueSize>10</FrameProcessingBlockQueueSize>
</Memory> </Memory>
<Misc>
<GlobalTimestampFitterEnable>false</GlobalTimestampFitterEnable>
<!-- Global timestamp fitter refresh interval, unit: milliseconds, default value: 1000,
minimum value: 100, it is recommended not to be greater than 1000 -->
<GlobalTimestampFitterInterval>1000</GlobalTimestampFitterInterval>
<!-- Global timestamp fitter queue size, default value: 100, minimum value: 20 -->
<GlobalTimestampFitterQueueSize>100</GlobalTimestampFitterQueueSize>
</Misc>
<!-- Default working configuration of pipeline --> <!-- Default working configuration of pipeline -->
<Pipeline> <Pipeline>
<Stream> <Stream>
@@ -92,6 +83,15 @@
<!-- For Femto-Mega devices, it must be set to V4L2, LibUVC is not supported --> <!-- For Femto-Mega devices, it must be set to V4L2, LibUVC is not supported -->
<LinuxUVCDefaultBackend>V4L2</LinuxUVCDefaultBackend> <LinuxUVCDefaultBackend>V4L2</LinuxUVCDefaultBackend>
<Misc>
<GlobalTimestampFitterEnable>false</GlobalTimestampFitterEnable>
<!-- Global timestamp fitter refresh interval, unit: milliseconds, default value: 1000,
minimum value: 100, it is recommended not to be greater than 1000 -->
<GlobalTimestampFitterInterval>1000</GlobalTimestampFitterInterval>
<!-- Global timestamp fitter queue size, default value: 100, minimum value: 20 -->
<GlobalTimestampFitterQueueSize>100</GlobalTimestampFitterQueueSize>
</Misc>
<Depth> <Depth>
<!-- The width of the default resolution, int type --> <!-- The width of the default resolution, int type -->
<Width>640</Width> <Width>640</Width>
@@ -166,6 +166,15 @@
</FemtoMega> </FemtoMega>
<FemtoMegai> <FemtoMegai>
<Misc>
<GlobalTimestampFitterEnable>false</GlobalTimestampFitterEnable>
<!-- Global timestamp fitter refresh interval, unit: milliseconds, default value: 1000,
minimum value: 100, it is recommended not to be greater than 1000 -->
<GlobalTimestampFitterInterval>1000</GlobalTimestampFitterInterval>
<!-- Global timestamp fitter queue size, default value: 100, minimum value: 20 -->
<GlobalTimestampFitterQueueSize>100</GlobalTimestampFitterQueueSize>
</Misc>
<Depth> <Depth>
<!-- The width of the default resolution, int type --> <!-- The width of the default resolution, int type -->
<Width>640</Width> <Width>640</Width>
@@ -244,6 +253,15 @@
will determine the device's speciality. Optional values: V4L2, LibUVC --> will determine the device's speciality. Optional values: V4L2, LibUVC -->
<LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend> <LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend>
<Misc>
<GlobalTimestampFitterEnable>false</GlobalTimestampFitterEnable>
<!-- Global timestamp fitter refresh interval, unit: milliseconds, default value: 1000,
minimum value: 100, it is recommended not to be greater than 1000 -->
<GlobalTimestampFitterInterval>1000</GlobalTimestampFitterInterval>
<!-- Global timestamp fitter queue size, default value: 100, minimum value: 20 -->
<GlobalTimestampFitterQueueSize>100</GlobalTimestampFitterQueueSize>
</Misc>
<Depth> <Depth>
<!-- The width of the default resolution, int type --> <!-- The width of the default resolution, int type -->
<Width>640</Width> <Width>640</Width>
@@ -323,6 +341,15 @@
will determine the device's speciality. Optional values: V4L2, LibUVC --> will determine the device's speciality. Optional values: V4L2, LibUVC -->
<LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend> <LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend>
<Misc>
<GlobalTimestampFitterEnable>false</GlobalTimestampFitterEnable>
<!-- Global timestamp fitter refresh interval, unit: milliseconds, default value: 1000,
minimum value: 100, it is recommended not to be greater than 1000 -->
<GlobalTimestampFitterInterval>1000</GlobalTimestampFitterInterval>
<!-- Global timestamp fitter queue size, default value: 100, minimum value: 20 -->
<GlobalTimestampFitterQueueSize>100</GlobalTimestampFitterQueueSize>
</Misc>
<!-- Whether to enable heartbeat by default --> <!-- Whether to enable heartbeat by default -->
<DefaultHeartBeat>0</DefaultHeartBeat> <DefaultHeartBeat>0</DefaultHeartBeat>
<Depth> <Depth>
@@ -497,6 +524,15 @@
will determine the device's speciality. Optional values: V4L2, LibUVC --> will determine the device's speciality. Optional values: V4L2, LibUVC -->
<LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend> <LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend>
<Misc>
<GlobalTimestampFitterEnable>false</GlobalTimestampFitterEnable>
<!-- Global timestamp fitter refresh interval, unit: milliseconds, default value: 1000,
minimum value: 100, it is recommended not to be greater than 1000 -->
<GlobalTimestampFitterInterval>1000</GlobalTimestampFitterInterval>
<!-- Global timestamp fitter queue size, default value: 100, minimum value: 20 -->
<GlobalTimestampFitterQueueSize>100</GlobalTimestampFitterQueueSize>
</Misc>
<!-- Whether to enable heartbeat by default --> <!-- Whether to enable heartbeat by default -->
<DefaulHeartBeat>0</DefaulHeartBeat> <DefaulHeartBeat>0</DefaulHeartBeat>
@@ -671,6 +707,15 @@
will determine the device's speciality. Optional values: V4L2, LibUVC --> will determine the device's speciality. Optional values: V4L2, LibUVC -->
<LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend> <LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend>
<Misc>
<GlobalTimestampFitterEnable>false</GlobalTimestampFitterEnable>
<!-- Global timestamp fitter refresh interval, unit: milliseconds, default value: 1000,
minimum value: 100, it is recommended not to be greater than 1000 -->
<GlobalTimestampFitterInterval>1000</GlobalTimestampFitterInterval>
<!-- Global timestamp fitter queue size, default value: 100, minimum value: 20 -->
<GlobalTimestampFitterQueueSize>100</GlobalTimestampFitterQueueSize>
</Misc>
<!-- Whether to enable heartbeat by default --> <!-- Whether to enable heartbeat by default -->
<DefaulHeartBeat>0</DefaulHeartBeat> <DefaulHeartBeat>0</DefaulHeartBeat>
@@ -783,6 +828,15 @@
will determine the device's speciality. Optional values: V4L2, LibUVC --> will determine the device's speciality. Optional values: V4L2, LibUVC -->
<LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend> <LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend>
<Misc>
<GlobalTimestampFitterEnable>false</GlobalTimestampFitterEnable>
<!-- Global timestamp fitter refresh interval, unit: milliseconds, default value: 1000,
minimum value: 100, it is recommended not to be greater than 1000 -->
<GlobalTimestampFitterInterval>1000</GlobalTimestampFitterInterval>
<!-- Global timestamp fitter queue size, default value: 100, minimum value: 20 -->
<GlobalTimestampFitterQueueSize>100</GlobalTimestampFitterQueueSize>
</Misc>
<!-- Whether to enable heartbeat by default --> <!-- Whether to enable heartbeat by default -->
<DefaulHeartBeat>0</DefaulHeartBeat> <DefaulHeartBeat>0</DefaulHeartBeat>
@@ -1059,6 +1113,15 @@
this item will determine the device's speciality. Optional values: V4L2, LibUVC --> this item will determine the device's speciality. Optional values: V4L2, LibUVC -->
<LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend> <LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend>
<Misc>
<GlobalTimestampFitterEnable>true</GlobalTimestampFitterEnable>
<!-- Global timestamp fitter refresh interval, unit: milliseconds, default value: 1000,
minimum value: 100, it is recommended not to be greater than 1000 -->
<GlobalTimestampFitterInterval>1000</GlobalTimestampFitterInterval>
<!-- Global timestamp fitter queue size, default value: 100, minimum value: 20 -->
<GlobalTimestampFitterQueueSize>100</GlobalTimestampFitterQueueSize>
</Misc>
<!-- Whether to enable heartbeat by default --> <!-- Whether to enable heartbeat by default -->
<DefaultHeartBeat>0</DefaultHeartBeat> <DefaultHeartBeat>0</DefaultHeartBeat>
<!-- Whether to enable firmware upgrade foolproof by default, only internal version <!-- Whether to enable firmware upgrade foolproof by default, only internal version
@@ -1133,6 +1196,15 @@
will determine the device's speciality. Optional values: V4L2, LibUVC --> will determine the device's speciality. Optional values: V4L2, LibUVC -->
<LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend> <LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend>
<Misc>
<GlobalTimestampFitterEnable>true</GlobalTimestampFitterEnable>
<!-- Global timestamp fitter refresh interval, unit: milliseconds, default value: 1000,
minimum value: 100, it is recommended not to be greater than 1000 -->
<GlobalTimestampFitterInterval>1000</GlobalTimestampFitterInterval>
<!-- Global timestamp fitter queue size, default value: 100, minimum value: 20 -->
<GlobalTimestampFitterQueueSize>100</GlobalTimestampFitterQueueSize>
</Misc>
<!-- Whether to enable heartbeat by default --> <!-- Whether to enable heartbeat by default -->
<DefaultHeartBeat>0</DefaultHeartBeat> <DefaultHeartBeat>0</DefaultHeartBeat>
<!-- Whether to enable firmware upgrade foolproof by default, only internal version <!-- Whether to enable firmware upgrade foolproof by default, only internal version
@@ -1207,6 +1279,15 @@
will determine the device's speciality. Optional values: V4L2, LibUVC --> will determine the device's speciality. Optional values: V4L2, LibUVC -->
<LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend> <LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend>
<Misc>
<GlobalTimestampFitterEnable>true</GlobalTimestampFitterEnable>
<!-- Global timestamp fitter refresh interval, unit: milliseconds, default value: 1000,
minimum value: 100, it is recommended not to be greater than 1000 -->
<GlobalTimestampFitterInterval>1000</GlobalTimestampFitterInterval>
<!-- Global timestamp fitter queue size, default value: 100, minimum value: 20 -->
<GlobalTimestampFitterQueueSize>100</GlobalTimestampFitterQueueSize>
</Misc>
<!-- Whether to enable heartbeat by default --> <!-- Whether to enable heartbeat by default -->
<DefaultHeartBeat>0</DefaultHeartBeat> <DefaultHeartBeat>0</DefaultHeartBeat>
<!-- Whether to enable firmware upgrade foolproof by default, only internal version <!-- Whether to enable firmware upgrade foolproof by default, only internal version
@@ -1276,6 +1357,15 @@
will determine the device's speciality. Optional values: V4L2, LibUVC --> will determine the device's speciality. Optional values: V4L2, LibUVC -->
<LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend> <LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend>
<Misc>
<GlobalTimestampFitterEnable>true</GlobalTimestampFitterEnable>
<!-- Global timestamp fitter refresh interval, unit: milliseconds, default value: 1000,
minimum value: 100, it is recommended not to be greater than 1000 -->
<GlobalTimestampFitterInterval>1000</GlobalTimestampFitterInterval>
<!-- Global timestamp fitter queue size, default value: 100, minimum value: 20 -->
<GlobalTimestampFitterQueueSize>100</GlobalTimestampFitterQueueSize>
</Misc>
<!-- Whether to enable heartbeat by default --> <!-- Whether to enable heartbeat by default -->
<DefaultHeartBeat>0</DefaultHeartBeat> <DefaultHeartBeat>0</DefaultHeartBeat>
<!-- Whether to enable firmware upgrade foolproof by default, only internal version <!-- Whether to enable firmware upgrade foolproof by default, only internal version
@@ -1350,6 +1440,15 @@
will determine the device's speciality. Optional values: V4L2, LibUVC --> will determine the device's speciality. Optional values: V4L2, LibUVC -->
<LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend> <LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend>
<Misc>
<GlobalTimestampFitterEnable>true</GlobalTimestampFitterEnable>
<!-- Global timestamp fitter refresh interval, unit: milliseconds, default value: 1000,
minimum value: 100, it is recommended not to be greater than 1000 -->
<GlobalTimestampFitterInterval>1000</GlobalTimestampFitterInterval>
<!-- Global timestamp fitter queue size, default value: 100, minimum value: 20 -->
<GlobalTimestampFitterQueueSize>100</GlobalTimestampFitterQueueSize>
</Misc>
<!-- Whether to enable heartbeat by default --> <!-- Whether to enable heartbeat by default -->
<DefaultHeartBeat>0</DefaultHeartBeat> <DefaultHeartBeat>0</DefaultHeartBeat>
<!-- Whether to enable firmware upgrade foolproof by default, only internal version <!-- Whether to enable firmware upgrade foolproof by default, only internal version
@@ -1425,6 +1524,15 @@
will determine the device's speciality. Optional values: V4L2, LibUVC --> will determine the device's speciality. Optional values: V4L2, LibUVC -->
<LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend> <LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend>
<Misc>
<GlobalTimestampFitterEnable>true</GlobalTimestampFitterEnable>
<!-- Global timestamp fitter refresh interval, unit: milliseconds, default value: 1000,
minimum value: 100, it is recommended not to be greater than 1000 -->
<GlobalTimestampFitterInterval>1000</GlobalTimestampFitterInterval>
<!-- Global timestamp fitter queue size, default value: 100, minimum value: 20 -->
<GlobalTimestampFitterQueueSize>100</GlobalTimestampFitterQueueSize>
</Misc>
<!--Whether <!--Whether
to enable heartbeat by default--> to enable heartbeat by default-->
<DefaultHeartBeat>0</DefaultHeartBeat> <DefaultHeartBeat>0</DefaultHeartBeat>
@@ -1517,6 +1625,15 @@
will determine the device's speciality. Optional values: V4L2, LibUVC --> will determine the device's speciality. Optional values: V4L2, LibUVC -->
<LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend> <LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend>
<Misc>
<GlobalTimestampFitterEnable>true</GlobalTimestampFitterEnable>
<!-- Global timestamp fitter refresh interval, unit: milliseconds, default value: 1000,
minimum value: 100, it is recommended not to be greater than 1000 -->
<GlobalTimestampFitterInterval>1000</GlobalTimestampFitterInterval>
<!-- Global timestamp fitter queue size, default value: 100, minimum value: 20 -->
<GlobalTimestampFitterQueueSize>100</GlobalTimestampFitterQueueSize>
</Misc>
<!--Whether <!--Whether
to enable heartbeat by default--> to enable heartbeat by default-->
<DefaultHeartBeat>0</DefaultHeartBeat> <DefaultHeartBeat>0</DefaultHeartBeat>
@@ -1601,5 +1718,131 @@
<Format>Y8</Format> <Format>Y8</Format>
</IR_RIGHT> </IR_RIGHT>
</DaBaiAL> </DaBaiAL>
<!-- Gemini210 config -->
<Gemini210>
<!-- The default Linux UVC backend. If the LinuxUVCBackend is set to "Auto," this item
will determine the device's speciality. Optional values: V4L2, LibUVC -->
<LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend>
<Misc>
<GlobalTimestampFitterEnable>false</GlobalTimestampFitterEnable>
<!-- Global timestamp fitter refresh interval, unit: milliseconds, default value: 1000,
minimum value: 100, it is recommended not to be greater than 1000 -->
<GlobalTimestampFitterInterval>1000</GlobalTimestampFitterInterval>
<!-- Global timestamp fitter queue size, default value: 100, minimum value: 20 -->
<GlobalTimestampFitterQueueSize>100</GlobalTimestampFitterQueueSize>
</Misc>
<!-- Whether to enable heartbeat by default -->
<DefaulHeartBeat>0</DefaulHeartBeat>
<Depth>
<!-- Number of retries for open stream failures, 0 means no retries -->
<StreamFailedRetry>0</StreamFailedRetry>
<!-- Open flow waits for the timeout period of the first frame of data, after which
the open flow will fail -->
<MaxStartStreamDelayMs>5000</MaxStartStreamDelayMs>
<!-- The number of data stream restarts due to abnormal interruption, 0 means no
restart -->
<StreamInterruptedRestart>0</StreamInterruptedRestart>
<!-- The maximum frame interval time, if this value is exceeded, it will be judged
that the stream is interrupted -->
<MaxFrameIntervalMs>2000</MaxFrameIntervalMs>
<!-- The resolution width is enabled by default, int type -->
<Width>1280</Width>
<!-- High resolution is enabled by default, int type -->
<Height>800</Height>
<!-- The frame rate of the resolution enabled by default, int type -->
<FPS>15</FPS>
<Format>Y16</Format>
</Depth>
<Color>
<!-- The resolution width is enabled by default, int type -->
<Width>1280</Width>
<!-- High resolution is enabled by default, int type -->
<Height>720</Height>
<!-- The frame rate of the resolution enabled by default, int type -->
<FPS>15</FPS>
<!-- The frame rate of the resolution enabled by default, int type -->
<Format>MJPG</Format>
<!-- Number of retries for open stream failures, 0 means no retries -->
<StreamFailedRetry>0</StreamFailedRetry>
</Color>
<IR>
<!-- The resolution width is enabled by default, int type -->
<Width>1280</Width>
<!-- High resolution is enabled by default, int type -->
<Height>800</Height>
<!-- The frame rate of the resolution enabled by default, int type -->
<FPS>15</FPS>
<!-- The frame rate of the resolution enabled by default, int type -->
<Format>Y8</Format>
<!-- Number of retries for open stream failures, 0 means no retries -->
<StreamFailedRetry>0</StreamFailedRetry>
</IR>
</Gemini210>
<!-- Gemini215 config -->
<Gemini215>
<!-- The default Linux UVC backend. If the LinuxUVCBackend is set to "Auto," this item
will determine the device's speciality. Optional values: V4L2, LibUVC -->
<LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend>
<Misc>
<GlobalTimestampFitterEnable>false</GlobalTimestampFitterEnable>
<!-- Global timestamp fitter refresh interval, unit: milliseconds, default value: 1000,
minimum value: 100, it is recommended not to be greater than 1000 -->
<GlobalTimestampFitterInterval>1000</GlobalTimestampFitterInterval>
<!-- Global timestamp fitter queue size, default value: 100, minimum value: 20 -->
<GlobalTimestampFitterQueueSize>100</GlobalTimestampFitterQueueSize>
</Misc>
<!-- Whether to enable heartbeat by default -->
<DefaulHeartBeat>0</DefaulHeartBeat>
<Depth>
<!-- Number of retries for open stream failures, 0 means no retries -->
<StreamFailedRetry>0</StreamFailedRetry>
<!-- Open flow waits for the timeout period of the first frame of data, after which
the open flow will fail -->
<MaxStartStreamDelayMs>5000</MaxStartStreamDelayMs>
<!-- The number of data stream restarts due to abnormal interruption, 0 means no
restart -->
<StreamInterruptedRestart>0</StreamInterruptedRestart>
<!-- The maximum frame interval time, if this value is exceeded, it will be judged
that the stream is interrupted -->
<MaxFrameIntervalMs>2000</MaxFrameIntervalMs>
<!-- The resolution width is enabled by default, int type -->
<Width>1280</Width>
<!-- High resolution is enabled by default, int type -->
<Height>800</Height>
<!-- The frame rate of the resolution enabled by default, int type -->
<FPS>15</FPS>
<Format>Y16</Format>
</Depth>
<Color>
<!-- The resolution width is enabled by default, int type -->
<Width>1280</Width>
<!-- High resolution is enabled by default, int type -->
<Height>720</Height>
<!-- The frame rate of the resolution enabled by default, int type -->
<FPS>15</FPS>
<!-- The frame rate of the resolution enabled by default, int type -->
<Format>MJPG</Format>
<!-- Number of retries for open stream failures, 0 means no retries -->
<StreamFailedRetry>0</StreamFailedRetry>
</Color>
<IR>
<!-- The resolution width is enabled by default, int type -->
<Width>1280</Width>
<!-- High resolution is enabled by default, int type -->
<Height>800</Height>
<!-- The frame rate of the resolution enabled by default, int type -->
<FPS>15</FPS>
<!-- The frame rate of the resolution enabled by default, int type -->
<Format>Y8</Format>
<!-- Number of retries for open stream failures, 0 means no retries -->
<StreamFailedRetry>0</StreamFailedRetry>
</IR>
</Gemini215>
</Device> </Device>
</Config> </Config>
+111
View File
@@ -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
@@ -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"
+437
View File
@@ -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
+129
View File
@@ -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
+129
View File
@@ -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
+134
View File
@@ -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
+148
View File
@@ -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
+121
View File
@@ -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
@@ -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
+100
View File
@@ -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
+22
View File
@@ -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"
@@ -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"
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -22,8 +22,8 @@
#define THREAD_NUM 4 #define THREAD_NUM 4
#define OB_ROS_MAJOR_VERSION 2 #define OB_ROS_MAJOR_VERSION 2
#define OB_ROS_MINOR_VERSION 0 #define OB_ROS_MINOR_VERSION 1
#define OB_ROS_PATCH_VERSION 9 #define OB_ROS_PATCH_VERSION 1
#ifndef STRINGIFY #ifndef STRINGIFY
#define STRINGIFY(arg) #arg #define STRINGIFY(arg) #arg
@@ -591,7 +591,6 @@ class OBCameraNode {
std::unique_ptr<diagnostic_updater::Updater> diagnostic_updater_ = nullptr; std::unique_ptr<diagnostic_updater::Updater> diagnostic_updater_ = nullptr;
double diagnostic_period_ = 1.0; double diagnostic_period_ = 1.0;
bool enable_laser_ = false; bool enable_laser_ = false;
int laser_on_off_mode_ = 0;
std::unique_ptr<ob::Align> align_filter_ = nullptr; std::unique_ptr<ob::Align> align_filter_ = nullptr;
OBStreamType align_target_stream_ = OB_STREAM_COLOR; OBStreamType align_target_stream_ = OB_STREAM_COLOR;
bool retry_on_usb3_detection_failure_ = false; bool retry_on_usb3_detection_failure_ = false;
@@ -83,6 +83,7 @@ class OBCameraNodeDriver : public rclcpp::Node {
std::string device_unique_id_; std::string device_unique_id_;
std::string usb_port_; std::string usb_port_;
bool enumerate_net_device_ = false; // default false bool enumerate_net_device_ = false; // default false
std::string uvc_backend_;
std::shared_ptr<Parameters> parameters_ = nullptr; std::shared_ptr<Parameters> parameters_ = nullptr;
std::shared_ptr<std::thread> query_thread_ = nullptr; std::shared_ptr<std::thread> query_thread_ = nullptr;
std::shared_ptr<std::thread> device_count_update_thread_ = nullptr; std::shared_ptr<std::thread> device_count_update_thread_ = nullptr;
@@ -56,6 +56,7 @@ def generate_launch_description():
DeclareLaunchArgument('serial_number', default_value=''), DeclareLaunchArgument('serial_number', default_value=''),
DeclareLaunchArgument('usb_port', default_value=''), DeclareLaunchArgument('usb_port', default_value=''),
DeclareLaunchArgument('device_num', default_value='1'), DeclareLaunchArgument('device_num', default_value='1'),
DeclareLaunchArgument('uvc_backend', default_value='libuvc'),#libuvc or v4l2
DeclareLaunchArgument('point_cloud_qos', default_value='default'), DeclareLaunchArgument('point_cloud_qos', default_value='default'),
DeclareLaunchArgument('enable_point_cloud', default_value='true'), DeclareLaunchArgument('enable_point_cloud', default_value='true'),
DeclareLaunchArgument('enable_colored_point_cloud', default_value='false'), 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_spatial_filter', default_value='false'),
DeclareLaunchArgument('enable_temporal_filter', default_value='false'), DeclareLaunchArgument('enable_temporal_filter', default_value='false'),
DeclareLaunchArgument('enable_hole_filling_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('sequence_id_filter_id', default_value='-1'),
DeclareLaunchArgument('threshold_filter_max', default_value='-1'), DeclareLaunchArgument('threshold_filter_max', default_value='-1'),
DeclareLaunchArgument('threshold_filter_min', 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('enable_laser', default_value='true'),
DeclareLaunchArgument('depth_precision', default_value=''), DeclareLaunchArgument('depth_precision', default_value=''),
DeclareLaunchArgument('device_preset', default_value='Default'), DeclareLaunchArgument('device_preset', default_value='Default'),
DeclareLaunchArgument('laser_on_off_mode', default_value='0'),
DeclareLaunchArgument('retry_on_usb3_detection_failure', default_value='false'), DeclareLaunchArgument('retry_on_usb3_detection_failure', default_value='false'),
DeclareLaunchArgument('laser_energy_level', default_value='-1'), DeclareLaunchArgument('laser_energy_level', default_value='-1'),
DeclareLaunchArgument('enable_3d_reconstruction_mode', default_value='false'), DeclareLaunchArgument('enable_3d_reconstruction_mode', default_value='false'),
@@ -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))
]
)
@@ -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))
]
)
@@ -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))
]
)
@@ -137,7 +137,7 @@ def generate_launch_description():
DeclareLaunchArgument('enable_spatial_filter', default_value='false'), DeclareLaunchArgument('enable_spatial_filter', default_value='false'),
DeclareLaunchArgument('enable_temporal_filter', default_value='false'), DeclareLaunchArgument('enable_temporal_filter', default_value='false'),
DeclareLaunchArgument('enable_hole_filling_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('sequence_id_filter_id', default_value='-1'),
DeclareLaunchArgument('threshold_filter_max', default_value='-1'), DeclareLaunchArgument('threshold_filter_max', default_value='-1'),
DeclareLaunchArgument('threshold_filter_min', 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('enable_laser', default_value='true'),
DeclareLaunchArgument('depth_precision', default_value=''), DeclareLaunchArgument('depth_precision', default_value=''),
DeclareLaunchArgument('device_preset', default_value='Default'), DeclareLaunchArgument('device_preset', default_value='Default'),
DeclareLaunchArgument('laser_on_off_mode', default_value='0'),
DeclareLaunchArgument('retry_on_usb3_detection_failure', default_value='false'), DeclareLaunchArgument('retry_on_usb3_detection_failure', default_value='false'),
DeclareLaunchArgument('laser_energy_level', default_value='-1'), DeclareLaunchArgument('laser_energy_level', default_value='-1'),
DeclareLaunchArgument('enable_3d_reconstruction_mode', default_value='false'), DeclareLaunchArgument('enable_3d_reconstruction_mode', default_value='false'),
@@ -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
@@ -41,7 +41,7 @@ def generate_launch_description():
front_camera = IncludeLaunchDescription( front_camera = IncludeLaunchDescription(
PythonLaunchDescriptionSource( 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={ launch_arguments={
"camera_name": "front_camera", "camera_name": "front_camera",
@@ -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
@@ -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))
]
)
@@ -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))
]
)
+86
View File
@@ -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")
+1 -1
View File
@@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> <?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3"> <package format="3">
<name>orbbec_camera</name> <name>orbbec_camera</name>
<version>2.0.9</version> <version>2.1.1</version>
<description>Orbbec Camera package</description> <description>Orbbec Camera package</description>
<maintainer email="[email protected]">Joe Dong</maintainer> <maintainer email="[email protected]">Joe Dong</maintainer>
<license>Apache-2.0</license> <license>Apache-2.0</license>
+32 -62
View File
@@ -225,10 +225,6 @@ void OBCameraNode::setupDevices() {
RCLCPP_INFO_STREAM(logger_, "Setting laser control to " << enable_laser_); RCLCPP_INFO_STREAM(logger_, "Setting laser control to " << enable_laser_);
TRY_TO_SET_PROPERTY(setIntProperty, OB_PROP_LASER_BOOL, 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()) { if (!device_preset_.empty()) {
try { try {
RCLCPP_INFO_STREAM(logger_, "Available presets:"); RCLCPP_INFO_STREAM(logger_, "Available presets:");
@@ -402,8 +398,6 @@ void OBCameraNode::setupDevices() {
if (ir_exposure_ != -1 && if (ir_exposure_ != -1 &&
device_->isPropertySupported(OB_PROP_IR_EXPOSURE_INT, OB_PERMISSION_WRITE)) { device_->isPropertySupported(OB_PROP_IR_EXPOSURE_INT, OB_PERMISSION_WRITE)) {
auto range = device_->getIntPropertyRange(OB_PROP_IR_EXPOSURE_INT); 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) { 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", RCLCPP_ERROR(logger_, "ir exposure value is out of range[%d,%d], please check the value",
range.min, range.max); 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)) { if (ir_gain_ != -1 && device_->isPropertySupported(OB_PROP_IR_GAIN_INT, OB_PERMISSION_WRITE)) {
auto range = device_->getIntPropertyRange(OB_PROP_IR_GAIN_INT); 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) { 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", RCLCPP_ERROR(logger_, "ir gain value is out of range[%d,%d], please check the value",
range.min, range.max); range.min, range.max);
@@ -469,8 +461,8 @@ void OBCameraNode::setupDepthPostProcessFilter() {
auto depth_sensor = device_->getSensor(OB_SENSOR_DEPTH); auto depth_sensor = device_->getSensor(OB_SENSOR_DEPTH);
// set depth sensor to filter // set depth sensor to filter
filter_list_ = depth_sensor->createRecommendedFilters(); filter_list_ = depth_sensor->createRecommendedFilters();
if (!filter_list_.empty()) { if (filter_list_.empty()) {
// RCLCPP_ERROR(logger_, "Failed to get depth sensor filter list"); RCLCPP_ERROR(logger_, "Failed to get depth sensor filter list");
return; return;
} }
for (size_t i = 0; i < filter_list_.size(); i++) { for (size_t i = 0; i < filter_list_.size(); i++) {
@@ -829,19 +821,6 @@ void OBCameraNode::startStreams() {
try { try {
setupPipelineConfig(); 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<ob::FrameSet> &frame_set) { pipeline_->start(pipeline_config_, [this](const std::shared_ptr<ob::FrameSet> &frame_set) {
onNewFrameSetCallback(frame_set); onNewFrameSetCallback(frame_set);
}); });
@@ -860,7 +839,6 @@ void OBCameraNode::startStreams() {
if (enable_stream_[COLOR] && !colorFrameThread_) { if (enable_stream_[COLOR] && !colorFrameThread_) {
colorFrameThread_ = std::make_shared<std::thread>([this]() { onNewColorFrameCallback(); }); colorFrameThread_ = std::make_shared<std::thread>([this]() { onNewColorFrameCallback(); });
} }
if (enable_frame_sync_) { if (enable_frame_sync_) {
RCLCPP_INFO_STREAM(logger_, "Enable frame sync"); RCLCPP_INFO_STREAM(logger_, "Enable frame sync");
TRY_EXECUTE_BLOCK(pipeline_->enableFrameSync()); TRY_EXECUTE_BLOCK(pipeline_->enableFrameSync());
@@ -868,6 +846,19 @@ void OBCameraNode::startStreams() {
RCLCPP_INFO_STREAM(logger_, "Disable frame sync"); RCLCPP_INFO_STREAM(logger_, "Disable frame sync");
TRY_EXECUTE_BLOCK(pipeline_->disableFrameSync()); 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 // enable interleave frame
if ((interleave_ae_mode_ == "hdr") || (interleave_ae_mode_ == "laser")) { if ((interleave_ae_mode_ == "hdr") || (interleave_ae_mode_ == "laser")) {
RCLCPP_INFO_STREAM(logger_, "current interleave_ae_mode_: " << interleave_ae_mode_); RCLCPP_INFO_STREAM(logger_, "current interleave_ae_mode_: " << interleave_ae_mode_);
@@ -1232,7 +1223,7 @@ void OBCameraNode::getParameters() {
setAndGetNodeParameter<bool>(enable_spatial_filter_, "enable_spatial_filter", false); setAndGetNodeParameter<bool>(enable_spatial_filter_, "enable_spatial_filter", false);
setAndGetNodeParameter<bool>(enable_temporal_filter_, "enable_temporal_filter", false); setAndGetNodeParameter<bool>(enable_temporal_filter_, "enable_temporal_filter", false);
setAndGetNodeParameter<bool>(enable_hole_filling_filter_, "enable_hole_filling_filter", false); setAndGetNodeParameter<bool>(enable_hole_filling_filter_, "enable_hole_filling_filter", false);
setAndGetNodeParameter<int>(decimation_filter_scale_, "decimation_filter_scale_", -1); setAndGetNodeParameter<int>(decimation_filter_scale_, "decimation_filter_scale", -1);
setAndGetNodeParameter<int>(sequence_id_filter_id_, "sequence_id_filter_id", -1); setAndGetNodeParameter<int>(sequence_id_filter_id_, "sequence_id_filter_id", -1);
setAndGetNodeParameter<int>(threshold_filter_max_, "threshold_filter_max", -1); setAndGetNodeParameter<int>(threshold_filter_max_, "threshold_filter_max", -1);
setAndGetNodeParameter<int>(threshold_filter_min_, "threshold_filter_min", -1); setAndGetNodeParameter<int>(threshold_filter_min_, "threshold_filter_min", -1);
@@ -1253,7 +1244,6 @@ void OBCameraNode::getParameters() {
setAndGetNodeParameter<std::string>(align_mode_, "align_mode", "HW"); setAndGetNodeParameter<std::string>(align_mode_, "align_mode", "HW");
setAndGetNodeParameter<double>(diagnostic_period_, "diagnostic_period", 1.0); setAndGetNodeParameter<double>(diagnostic_period_, "diagnostic_period", 1.0);
setAndGetNodeParameter<bool>(enable_laser_, "enable_laser", true); setAndGetNodeParameter<bool>(enable_laser_, "enable_laser", true);
setAndGetNodeParameter<int>(laser_on_off_mode_, "laser_on_off_mode", 0);
std::string align_target_stream_str_; std::string align_target_stream_str_;
setAndGetNodeParameter<std::string>(align_target_stream_str_, "align_target_stream", "COLOR"); setAndGetNodeParameter<std::string>(align_target_stream_str_, "align_target_stream", "COLOR");
align_target_stream_ = obStreamTypeFromString(align_target_stream_str_); align_target_stream_ = obStreamTypeFromString(align_target_stream_str_);
@@ -1266,9 +1256,6 @@ void OBCameraNode::getParameters() {
setAndGetNodeParameter<int>(max_depth_limit_, "max_depth_limit", 0); setAndGetNodeParameter<int>(max_depth_limit_, "max_depth_limit", 0);
setAndGetNodeParameter<bool>(enable_heartbeat_, "enable_heartbeat", false); setAndGetNodeParameter<bool>(enable_heartbeat_, "enable_heartbeat", false);
setAndGetNodeParameter<bool>(enable_color_undistortion_, "enable_color_undistortion", false); setAndGetNodeParameter<bool>(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<std::string>(time_domain_, "time_domain", "device"); setAndGetNodeParameter<std::string>(time_domain_, "time_domain", "device");
auto device_info = device_->getDeviceInfo(); auto device_info = device_->getDeviceInfo();
CHECK_NOTNULL(device_info.get()); CHECK_NOTNULL(device_info.get());
@@ -1432,6 +1419,17 @@ void OBCameraNode::setupPipelineConfig() {
if (enable_stream_[stream_index]) { if (enable_stream_[stream_index]) {
RCLCPP_INFO_STREAM(logger_, "Enable " << stream_name_[stream_index] << " stream"); RCLCPP_INFO_STREAM(logger_, "Enable " << stream_name_[stream_index] << " stream");
auto profile = stream_profile_[stream_index]->as<ob::VideoStreamProfile>(); auto profile = stream_profile_[stream_index]->as<ob::VideoStreamProfile>();
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( RCLCPP_INFO_STREAM(
logger_, "Stream " << stream_name_[stream_index] << " width: " << profile->getWidth() logger_, "Stream " << stream_name_[stream_index] << " width: " << profile->getWidth()
<< " height: " << profile->getHeight() << " fps: " << profile->getFps() << " height: " << profile->getHeight() << " fps: " << profile->getFps()
@@ -1878,22 +1876,16 @@ void OBCameraNode::onNewFrameSetCallback(std::shared_ptr<ob::FrameSet> frame_set
tf_published_ = true; tf_published_ = true;
} }
auto depth_frame = frame_set->getFrame(OB_FRAME_DEPTH); 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); auto color_frame = frame_set->getFrame(OB_FRAME_COLOR);
depth_frame = processDepthFrameFilter(depth_frame);
bool depth_aligned = false;
if (depth_frame) { if (depth_frame) {
depth_frame = processDepthFrameFilter(depth_frame);
frame_set->pushFrame(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)) { if (auto new_frame = align_filter_->process(frame_set)) {
auto new_frame_set = new_frame->as<ob::FrameSet>(); auto new_frame_set = new_frame->as<ob::FrameSet>();
CHECK_NOTNULL(new_frame_set.get()); CHECK_NOTNULL(new_frame_set.get());
frame_set = new_frame_set; frame_set = new_frame_set;
depth_aligned = true;
} else { } else {
RCLCPP_ERROR(logger_, "Failed to align depth frame to color frame"); RCLCPP_ERROR(logger_, "Failed to align depth frame to color frame");
return; return;
@@ -1903,16 +1895,11 @@ void OBCameraNode::onNewFrameSetCallback(std::shared_ptr<ob::FrameSet> frame_set
"Depth registration is disabled or align filter is null or depth frame is " "Depth registration is disabled or align filter is null or depth frame is "
"null or color frame is null"); "null or color frame is null");
} }
if (depth_registration_ && align_filter_ && !depth_aligned) {
return;
}
if (enable_stream_[COLOR] && color_frame) { if (enable_stream_[COLOR] && color_frame) {
std::unique_lock<std::mutex> lock(color_frame_queue_lock_); std::unique_lock<std::mutex> lock(color_frame_queue_lock_);
if (!enable_3d_reconstruction_mode_ || depth_laser_status) { color_frame_queue_.push(frame_set);
color_frame_queue_.push(frame_set); color_frame_queue_cv_.notify_all();
color_frame_queue_cv_.notify_all();
}
} else { } else {
publishPointCloud(frame_set); publishPointCloud(frame_set);
} }
@@ -1927,24 +1914,7 @@ void OBCameraNode::onNewFrameSetCallback(std::shared_ptr<ob::FrameSet> frame_set
if (frame == nullptr) { if (frame == nullptr) {
continue; continue;
} }
if (stream_index == DEPTH) { onNewFrameCallback(frame, stream_index);
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<ob::Frame> 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);
}
} }
} }
} catch (const ob::Error &e) { } catch (const ob::Error &e) {
+11 -1
View File
@@ -125,7 +125,6 @@ void OBCameraNodeDriver::init() {
} }
auto log_level_str = declare_parameter<std::string>("log_level", "none"); auto log_level_str = declare_parameter<std::string>("log_level", "none");
std::cout << "=========log_level_str " << log_level_str << std::endl;
auto log_level = obLogSeverityFromString(log_level_str); auto log_level = obLogSeverityFromString(log_level_str);
connection_delay_ = static_cast<int>(declare_parameter<int>("connection_delay", 100)); connection_delay_ = static_cast<int>(declare_parameter<int>("connection_delay", 100));
enable_sync_host_time_ = declare_parameter<bool>("enable_sync_host_time", true); enable_sync_host_time_ = declare_parameter<bool>("enable_sync_host_time", true);
@@ -163,6 +162,17 @@ void OBCameraNodeDriver::init() {
net_device_ip_ = declare_parameter<std::string>("net_device_ip", ""); net_device_ip_ = declare_parameter<std::string>("net_device_ip", "");
net_device_port_ = static_cast<int>(declare_parameter<int>("net_device_port", 0)); net_device_port_ = static_cast<int>(declare_parameter<int>("net_device_port", 0));
enumerate_net_device_ = declare_parameter<bool>("enumerate_net_device", false); enumerate_net_device_ = declare_parameter<bool>("enumerate_net_device", false);
uvc_backend_ = declare_parameter<std::string>("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_->enableNetDeviceEnumeration(enumerate_net_device_);
ctx_->setDeviceChangedCallback([this](const std::shared_ptr<ob::DeviceList> &removed_list, ctx_->setDeviceChangedCallback([this](const std::shared_ptr<ob::DeviceList> &removed_list,
const std::shared_ptr<ob::DeviceList> &added_list) { const std::shared_ptr<ob::DeviceList> &added_list) {
+70 -46
View File
@@ -19,6 +19,18 @@ struct ImageMetadata {
class MultiCameraSubscriber : public rclcpp::Node { class MultiCameraSubscriber : public rclcpp::Node {
public: public:
MultiCameraSubscriber() : Node("multi_camera_subscriber") { device_init(); } 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() { void device_init() {
try { try {
auto context = std::make_unique<ob::Context>(); auto context = std::make_unique<ob::Context>();
@@ -33,9 +45,9 @@ class MultiCameraSubscriber : public rclcpp::Node {
serial_numbers_[usb_port] = serial; serial_numbers_[usb_port] = serial;
// RCLCPP_INFO_STREAM(rclcpp::get_logger("list_device_node"), ":list->deviceCount(): " << // RCLCPP_INFO_STREAM(rclcpp::get_logger("list_device_node"), ":list->deviceCount(): " <<
// list->deviceCount()); // list->deviceCount());
color_frame_counters_[count] = 0; color_frame_counters_[count_] = 0;
ir_frame_counters_[count] = 0; ir_frame_counters_[count_] = 0;
count++; count_++;
} }
} catch (ob::Error &e) { } catch (ob::Error &e) {
RCLCPP_ERROR_STREAM(get_logger(), e.getMessage()); RCLCPP_ERROR_STREAM(get_logger(), e.getMessage());
@@ -94,6 +106,17 @@ class MultiCameraSubscriber : public rclcpp::Node {
} }
} }
void topic_init() { 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<bool>(left_ir_topics_.size(), false);
auto custom_qos = rclcpp::QoS(rclcpp::QoSInitialization::from_rmw(rmw_qos_profile_default)); auto custom_qos = rclcpp::QoS(rclcpp::QoSInitialization::from_rmw(rmw_qos_profile_default));
RCLCPP_INFO_STREAM(rclcpp::get_logger("multi_camera_subscriber"), RCLCPP_INFO_STREAM(rclcpp::get_logger("multi_camera_subscriber"),
"camera_name_.size(): " << camera_name_.size()); "camera_name_.size(): " << camera_name_.size());
@@ -143,18 +166,6 @@ class MultiCameraSubscriber : public rclcpp::Node {
ir_meta_subscribers_.push_back(ir_metadata_sub); ir_meta_subscribers_.push_back(ir_metadata_sub);
color_subscribers_.push_back(color_sub); color_subscribers_.push_back(color_sub);
color_meta_subscribers_.push_back(color_metadata_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<bool>(left_ir_topics_.size(), false);
} }
} }
std::string getCurrentTimes() { std::string getCurrentTimes() {
@@ -206,8 +217,8 @@ class MultiCameraSubscriber : public rclcpp::Node {
auto &color_meta_exposure = color_metadata_.exposure_buffs[index]; auto &color_meta_exposure = color_metadata_.exposure_buffs[index];
auto &color_meta_gain = color_metadata_.gain_buffs[index]; auto &color_meta_gain = color_metadata_.gain_buffs[index];
callback_called_[index] = true; callback_called_[index] = true;
if (ir_images.size() < static_cast<size_t>(is_saving_images_) || if (ir_images.size() < static_cast<size_t>(saving_images_number_) ||
color_images.size() < static_cast<size_t>(is_saving_images_)) { color_images.size() < static_cast<size_t>(saving_images_number_)) {
return; return;
} }
RCLCPP_INFO_STREAM(rclcpp::get_logger("multi_camera_subscriber"), "index:" << index); 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; std::string serial_index = serial_iter->second;
for (size_t i = 0; i < static_cast<size_t>(is_saving_images_); i++) { for (size_t i = 0; i < static_cast<size_t>(saving_images_number_); i++) {
std::string folder = generateFolderName(serial_index, usb_index); std::string folder = generateFolderName(serial_index, usb_index);
std::string ir_filename = folder + "/ir#left_SN" + serial_index + "_Index" + std::string ir_filename = folder + "/ir#left_SN" + serial_index + "_Index" +
std::to_string(usb_index) + time_domain_ + std::to_string(usb_index) + time_domain_ +
ir_current_timestamps[i] + "_f" + std::to_string(i) + "_s" + 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"; left_ir_meta_gain[i] + "_.jpg";
if (ir_images[i].empty()) { if (ir_images[i].empty()) {
RCLCPP_INFO_STREAM(rclcpp::get_logger("multi_camera_subscriber"), "over "); 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]); cv::imwrite(ir_filename, ir_images[i]);
std::string color_filename = std::string color_filename =
folder + "/color_SN" + serial_index + "_Index" + std::to_string(usb_index) + folder + "/color_SN" + serial_index + "_Index" + std::to_string(usb_index) +
time_domain_ + color_current_timestamps[i] + "_f" + std::to_string(i) + "_s" + 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()) { if (color_images[i].empty()) {
continue; continue;
} }
cv::imwrite(color_filename, color_images[i]); cv::imwrite(color_filename, color_images[i]);
// RCLCPP_INFO(this->get_logger(), "Saved Color image to: %s", color_filename.c_str()); // RCLCPP_INFO(this->get_logger(), "Saved Color image to: %s", color_filename.c_str());
} }
ir_image_buffers_[index].clear(); ir_image_buffers_[index].clear();
ir_current_timestamp_buffers_[index].clear(); ir_current_timestamp_buffers_[index].clear();
ir_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; }); std::all_of(callback_called_.begin(), callback_called_.end(), [](bool v) { return v; });
if (all_true) { if (all_true) {
RCLCPP_INFO_STREAM(rclcpp::get_logger("multi_camera_subscriber"), "over "); RCLCPP_INFO_STREAM(rclcpp::get_logger("multi_camera_subscriber"), "over ");
is_saving_images_ = 0; saving_images_number_ = 0;
ir_image_buffers_.clear(); callback_called_.clear();
ir_current_timestamp_buffers_.clear(); callback_called_ = std::vector<bool>(left_ir_topics_.size(), false);
ir_timestamp_buffers_.clear();
color_image_buffers_.clear();
color_current_timestamp_buffers_.clear();
color_timestamp_buffers_.clear();
// rclcpp::shutdown();
} }
} }
void controlCaptureCallback(const std_msgs::msg::Int32::SharedPtr msg) { void controlCaptureCallback(const std_msgs::msg::Int32::SharedPtr msg) {
currenttimes_ = getCurrentTimes(); currenttimes_ = getCurrentTimes();
is_saving_images_ = msg->data; saving_images_number_ = msg->data;
topic_init(); if (!topic_init_) {
RCLCPP_INFO_STREAM(rclcpp::get_logger("multi_camera_subscriber"), "jjjj " << is_saving_images_); 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<const sensor_msgs::msg::Image> image, size_t index) { void irCallback(std::shared_ptr<const sensor_msgs::msg::Image> image, size_t index) {
std::lock_guard<std::mutex> lock(image_mutex_); std::lock_guard<std::mutex> lock(image_mutex_);
if (!callback_called_[index] && static_cast<size_t>(is_saving_images_)) { if (!callback_called_[index] && static_cast<size_t>(saving_images_number_)) {
cv::Mat ir_mat = cv_bridge::toCvCopy(image, image->encoding)->image; cv::Mat ir_mat = cv_bridge::toCvCopy(image, image->encoding)->image;
std::string current_timestamp_ir = getCurrentTimestamp(image); std::string current_timestamp_ir = getCurrentTimestamp(image);
std::string timestamp_ir = getTimestamp(); 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); ir_resolution_ = std::to_string(image->width) + "x" + std::to_string(image->height);
RCLCPP_INFO_STREAM(rclcpp::get_logger("multi_camera_subscriber"), RCLCPP_INFO_STREAM(rclcpp::get_logger("multi_camera_subscriber"),
":ir: " << index << ":" << ir_image_buffers_[index].size()); ":ir: " << index << ":" << ir_image_buffers_[index].size());
if (ir_image_buffers_[index].size() >= static_cast<size_t>(is_saving_images_) && if (ir_image_buffers_[index].size() >= static_cast<size_t>(saving_images_number_) &&
color_image_buffers_[index].size() >= static_cast<size_t>(is_saving_images_)) { color_image_buffers_[index].size() >= static_cast<size_t>(saving_images_number_) &&
color_metadata_.exposure_buffs[index].size() >=
static_cast<size_t>(saving_images_number_) &&
left_ir_metadata_.exposure_buffs[index].size() >=
static_cast<size_t>(saving_images_number_)) {
saveAlignedImages(index); saveAlignedImages(index);
} }
} }
} }
void colorCallback(std::shared_ptr<const sensor_msgs::msg::Image> image, size_t index) { void colorCallback(std::shared_ptr<const sensor_msgs::msg::Image> image, size_t index) {
std::lock_guard<std::mutex> lock(image_mutex_); std::lock_guard<std::mutex> lock(image_mutex_);
if (!callback_called_[index] && static_cast<size_t>(is_saving_images_)) { if (!callback_called_[index] && static_cast<size_t>(saving_images_number_)) {
cv::Mat color_mat = cv_bridge::toCvCopy(image, image->encoding)->image; cv::Mat color_mat = cv_bridge::toCvCopy(image, image->encoding)->image;
cv::Mat corrected_image; cv::Mat corrected_image;
cv::cvtColor(color_mat, corrected_image, cv::COLOR_RGB2BGR); 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); color_resolution_ = std::to_string(image->width) + "x" + std::to_string(image->height);
RCLCPP_INFO_STREAM(rclcpp::get_logger("multi_camera_subscriber"), RCLCPP_INFO_STREAM(rclcpp::get_logger("multi_camera_subscriber"),
":color: " << index << ":" << color_image_buffers_[index].size()); ":color: " << index << ":" << color_image_buffers_[index].size());
if (ir_image_buffers_[index].size() >= static_cast<size_t>(is_saving_images_) && if (ir_image_buffers_[index].size() >= static_cast<size_t>(saving_images_number_) &&
color_image_buffers_[index].size() >= static_cast<size_t>(is_saving_images_)) { color_image_buffers_[index].size() >= static_cast<size_t>(saving_images_number_) &&
color_metadata_.exposure_buffs[index].size() >=
static_cast<size_t>(saving_images_number_) &&
left_ir_metadata_.exposure_buffs[index].size() >=
static_cast<size_t>(saving_images_number_)) {
saveAlignedImages(index); saveAlignedImages(index);
} }
} }
@@ -319,16 +337,20 @@ class MultiCameraSubscriber : public rclcpp::Node {
void ir_meta_Callback(std::shared_ptr<const orbbec_camera_msgs::msg::Metadata> msg, void ir_meta_Callback(std::shared_ptr<const orbbec_camera_msgs::msg::Metadata> msg,
size_t index) { size_t index) {
std::lock_guard<std::mutex> lock(meta_mutex_); std::lock_guard<std::mutex> lock(meta_mutex_);
nlohmann::json json_data = nlohmann::json::parse(msg->json_data); if (!callback_called_[index] && static_cast<size_t>(saving_images_number_)) {
left_ir_metadata_.exposure_buffs[index].push_back(json_data["exposure"].dump()); nlohmann::json json_data = nlohmann::json::parse(msg->json_data);
left_ir_metadata_.gain_buffs[index].push_back(json_data["gain"].dump()); 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<const orbbec_camera_msgs::msg::Metadata> msg, void color_meta_Callback(std::shared_ptr<const orbbec_camera_msgs::msg::Metadata> msg,
size_t index) { size_t index) {
std::lock_guard<std::mutex> lock(meta_mutex_); std::lock_guard<std::mutex> lock(meta_mutex_);
nlohmann::json json_data = nlohmann::json::parse(msg->json_data); if (!callback_called_[index] && static_cast<size_t>(saving_images_number_)) {
color_metadata_.exposure_buffs[index].push_back(json_data["exposure"].dump()); nlohmann::json json_data = nlohmann::json::parse(msg->json_data);
color_metadata_.gain_buffs[index].push_back(json_data["gain"].dump()); 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_; rclcpp::CallbackGroup::SharedPtr reentrant_callback_group_;
@@ -345,7 +367,6 @@ class MultiCameraSubscriber : public rclcpp::Node {
std::array<std::string, 10> usb_numbers_; std::array<std::string, 10> usb_numbers_;
std::array<size_t, 10> color_frame_counters_; std::array<size_t, 10> color_frame_counters_;
std::array<size_t, 10> ir_frame_counters_; std::array<size_t, 10> ir_frame_counters_;
size_t count = 0;
std::vector<std::string> usb_params_; std::vector<std::string> usb_params_;
std::vector<std::string> camera_name_; std::vector<std::string> camera_name_;
@@ -368,7 +389,10 @@ class MultiCameraSubscriber : public rclcpp::Node {
std::string ir_resolution_; std::string ir_resolution_;
std::string currenttimes_; 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 left_ir_metadata_ = ImageMetadata();
ImageMetadata color_metadata_ = ImageMetadata(); ImageMetadata color_metadata_ = ImageMetadata();