mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-09 14:27:02 +08:00
fix: sync camera time once on startup
This commit is contained in:
@@ -1232,10 +1232,9 @@ void OBCameraNodeDriver::initializeDevice(const std::shared_ptr<ob::Device> &dev
|
||||
CHECK_NOTNULL(device_info_.get());
|
||||
device_unique_id_ = device_info_->getUid();
|
||||
|
||||
if (enable_sync_host_time_ && !isOpenNIDevice(device_info_->pid()) && device_type_ == "camera" &&
|
||||
!playback_device_) {
|
||||
if (!isOpenNIDevice(device_info_->pid()) && device_type_ == "camera" && !playback_device_) {
|
||||
TRY_EXECUTE_BLOCK(device_->timerSyncWithHost());
|
||||
if (g_time_domain != "global") {
|
||||
if (enable_sync_host_time_ && g_time_domain != "global") {
|
||||
device_->enableGlobalTimestamp(false);
|
||||
sync_host_time_timer_ = this->create_wall_timer(time_sync_period_, [this]() {
|
||||
// Multiple safety checks before attempting time sync
|
||||
|
||||
Reference in New Issue
Block a user