mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-05 20:47: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:
@@ -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