mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-04 03:57:46 +08:00
fix: update launch file to change device preset to depth work mode and enhance depth mode logging
This commit is contained in:
@@ -230,7 +230,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('diagnostic_period', default_value='1.0'), # seconds
|
||||
DeclareLaunchArgument('enable_laser', default_value='true'),
|
||||
DeclareLaunchArgument('depth_precision', default_value=''),
|
||||
DeclareLaunchArgument('device_preset', default_value='Default'),
|
||||
DeclareLaunchArgument('depth_work_mode', default_value='AMR Perception'),
|
||||
DeclareLaunchArgument('retry_on_usb3_detection_failure', default_value='false'),
|
||||
DeclareLaunchArgument('laser_energy_level', default_value='-1'),
|
||||
DeclareLaunchArgument('enable_sync_host_time', default_value='true'),
|
||||
|
||||
@@ -345,9 +345,14 @@ void OBCameraNode::setupDevices() {
|
||||
RCLCPP_ERROR_STREAM(logger_, "Failed to load device preset");
|
||||
}
|
||||
}
|
||||
if (!depth_work_mode_.empty()) {
|
||||
RCLCPP_INFO_STREAM(logger_, "Set depth work mode: " << depth_work_mode_);
|
||||
if (!depth_work_mode_.empty() &&
|
||||
device_->isPropertySupported(OB_STRUCT_CURRENT_DEPTH_ALG_MODE, OB_PERMISSION_READ_WRITE)) {
|
||||
auto depthModeList = device_->getDepthWorkModeList();
|
||||
for (uint32_t i = 0; i < depthModeList->getCount(); i++) {
|
||||
RCLCPP_INFO_STREAM(logger_, "depthModeList[" << i << "]: " << (*depthModeList)[i].name);
|
||||
}
|
||||
TRY_EXECUTE_BLOCK(device_->switchDepthWorkMode(depth_work_mode_.c_str()));
|
||||
RCLCPP_INFO_STREAM(logger_, "Set depth work mode: " << depth_work_mode_);
|
||||
}
|
||||
if (!sync_mode_str_.empty()) {
|
||||
auto sync_config = device_->getMultiDeviceSyncConfig();
|
||||
|
||||
Reference in New Issue
Block a user