Merge branch 'fix/main-bug' into merge/sdk_1.10.36

This commit is contained in:
slz
2026-06-18 18:26:01 +08:00
4 changed files with 14 additions and 2 deletions
@@ -151,6 +151,8 @@ rmw_qos_profile_t getRMWQosProfileFromString(const std::string& str_qos);
bool isOpenNIDevice(int pid);
bool isHostTimeSyncSupported(int pid);
OB_DEPTH_PRECISION_LEVEL depthPrecisionLevelFromString(
const std::string& depth_precision_level_str);
+1 -1
View File
@@ -49,7 +49,7 @@ def generate_launch_description():
DeclareLaunchArgument('ir_height', default_value='480'),
DeclareLaunchArgument('ir_fps', default_value='10'),
DeclareLaunchArgument('ir_format', default_value='Y10'),
DeclareLaunchArgument('enable_ir', default_value='true'),
DeclareLaunchArgument('enable_ir', default_value='false'),
DeclareLaunchArgument('flip_ir', default_value='false'),
DeclareLaunchArgument('ir_qos', default_value='default'),
DeclareLaunchArgument('ir_camera_info_qos', default_value='default'),
+1 -1
View File
@@ -435,7 +435,7 @@ void OBCameraNodeDriver::initializeDevice(const std::shared_ptr<ob::Device> &dev
serial_number_ = device_info_->serialNumber();
CHECK_NOTNULL(device_info_.get());
device_unique_id_ = device_info_->uid();
if (enable_sync_host_time_ && !isOpenNIDevice(device_info_->pid())) {
if (enable_sync_host_time_ && isHostTimeSyncSupported(device_info_->pid())) {
TRY_EXECUTE_BLOCK(device_->timerSyncWithHost());
sync_host_time_timer_ = this->create_wall_timer(std::chrono::milliseconds(30000), [this]() {
if (device_) {
+10
View File
@@ -471,6 +471,16 @@ bool isOpenNIDevice(int pid) {
[pid](int pid_openni) { return pid == pid_openni; });
}
bool isHostTimeSyncSupported(int pid) {
static const std::vector<int> UNSUPPORTED_DEVICE_PIDS = {0x069d};
if (isOpenNIDevice(pid)) {
return false;
}
return std::none_of(UNSUPPORTED_DEVICE_PIDS.begin(), UNSUPPORTED_DEVICE_PIDS.end(),
[pid](int unsupported_pid) { return pid == unsupported_pid; });
}
OB_DEPTH_PRECISION_LEVEL depthPrecisionLevelFromString(
const std::string &depth_precision_level_str) {
if (depth_precision_level_str == "1mm") {