mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-04 12:07:46 +08:00
update sync time
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user