update sync time

This commit is contained in:
Joe Dong
2024-03-26 11:44:09 +08:00
parent 2a666ea345
commit 9a5122b92b
+1 -3
View File
@@ -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<message_filters::Synchronizer<MySyncPolicy>>(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;