mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-09-14 20:10:19 +08:00
enable periodic host time sync logging in OBCameraNodeDriver
This commit is contained in:
@@ -981,6 +981,8 @@ void OBCameraNodeDriver::initializeDevice(const std::shared_ptr<ob::Device> &dev
|
||||
if (enable_sync_host_time_ && !isOpenNIDevice(device_info_->pid()) && device_type_ == "camera") {
|
||||
TRY_EXECUTE_BLOCK(device_->timerSyncWithHost());
|
||||
if (g_time_domain != "global") {
|
||||
RCLCPP_INFO_STREAM(logger_, "Enable periodic host time sync with device");
|
||||
device_->enableGlobalTimestamp(false);
|
||||
sync_host_time_timer_ = this->create_wall_timer(time_sync_period_, [this]() {
|
||||
// Multiple safety checks before attempting time sync
|
||||
if (!device_) {
|
||||
|
||||
Reference in New Issue
Block a user