mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-04 12:07:46 +08:00
modify rclcpp::Duration to be compatible with both Humble and Foxy
This commit is contained in:
@@ -133,7 +133,7 @@ class MetadataSaveFiles : public rclcpp::Node {
|
||||
|
||||
left_ir_sync_ = std::make_shared<message_filters::Synchronizer<MySyncPolicy>>(
|
||||
MySyncPolicy(10), *left_ir_image_sub_, *left_ir_metadata_sub_);
|
||||
left_ir_sync_->setMaxIntervalDuration(rclcpp::Duration(100000000LL)); // 100 ms
|
||||
left_ir_sync_->setMaxIntervalDuration(rclcpp::Duration(0, 100 * 1000000)); // 100 ms
|
||||
|
||||
left_ir_sync_->registerCallback(
|
||||
std::bind(&MetadataSaveFiles::left_ir_metadata_sync_callback, this, _1, _2));
|
||||
@@ -146,7 +146,7 @@ class MetadataSaveFiles : public rclcpp::Node {
|
||||
|
||||
right_ir_sync_ = std::make_shared<message_filters::Synchronizer<MySyncPolicy>>(
|
||||
MySyncPolicy(10), *right_ir_image_sub_, *right_ir_metadata_sub_);
|
||||
right_ir_sync_->setMaxIntervalDuration(rclcpp::Duration(100000000LL)); // 100 ms
|
||||
right_ir_sync_->setMaxIntervalDuration(rclcpp::Duration(0, 100 * 1000000)); // 100 ms
|
||||
|
||||
right_ir_sync_->registerCallback(
|
||||
std::bind(&MetadataSaveFiles::right_ir_metadata_sync_callback, this, _1, _2));
|
||||
@@ -159,7 +159,7 @@ class MetadataSaveFiles : public rclcpp::Node {
|
||||
|
||||
depth_sync_ = std::make_shared<message_filters::Synchronizer<MySyncPolicy>>(
|
||||
MySyncPolicy(10), *depth_image_sub_, *depth_metadata_sub_);
|
||||
depth_sync_->setMaxIntervalDuration(rclcpp::Duration(100000000LL)); // 100 ms
|
||||
depth_sync_->setMaxIntervalDuration(rclcpp::Duration(0, 100 * 1000000)); // 100 ms
|
||||
|
||||
depth_sync_->registerCallback(
|
||||
std::bind(&MetadataSaveFiles::depth_metadata_sync_callback, this, _1, _2));
|
||||
|
||||
Reference in New Issue
Block a user