diff --git a/orbbec_camera/src/d2c_viewer.cpp b/orbbec_camera/src/d2c_viewer.cpp index 2cbc262a..86d86457 100644 --- a/orbbec_camera/src/d2c_viewer.cpp +++ b/orbbec_camera/src/d2c_viewer.cpp @@ -30,9 +30,7 @@ D2CViewer::D2CViewer(rclcpp::Node* const node, rmw_qos_profile_t rgb_qos, node_, "depth/image_raw", depth_qos); sync_ = std::make_shared>(MySyncPolicy(10), *rgb_sub_, *depth_sub_); - // set 2ms as the max interval duration - int64_t max_interval_duration_ns = 2000000; - sync_->setMaxIntervalDuration(rclcpp::Duration::from_nanoseconds(max_interval_duration_ns)); + sync_->setMaxIntervalDuration(rclcpp::Duration::from_seconds(0.002)); // 2ms using std::placeholders::_1; using std::placeholders::_2;