resolve the compilation failure issue in Foxy

This commit is contained in:
datean@123
2024-10-23 10:49:41 +08:00
parent dff75426c3
commit 543caa6bcb
3 changed files with 13 additions and 14 deletions
@@ -67,7 +67,9 @@ class MetadataExportFiles : public rclcpp::Node {
}
void load_parameters() {
std::ifstream file("install/orbbec_camera/share/orbbec_camera/config/metadataexport/metadata_export_params.json");
std::ifstream file(
"install/orbbec_camera/share/orbbec_camera/config/metadataexport/"
"metadata_export_params.json");
if (!file.is_open()) {
RCLCPP_ERROR(this->get_logger(), "Failed to open JSON file.");
return;
@@ -106,8 +108,7 @@ class MetadataExportFiles : 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::from_nanoseconds(100000000LL)); // 100 ms
left_ir_sync_->setMaxIntervalDuration(rclcpp::Duration(100000000LL)); // 100 ms
left_ir_sync_->registerCallback(
std::bind(&MetadataExportFiles::left_ir_metadata_sync_callback, this, _1, _2));
@@ -120,8 +121,7 @@ class MetadataExportFiles : 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::from_nanoseconds(100000000LL)); // 100 ms
right_ir_sync_->setMaxIntervalDuration(rclcpp::Duration(100000000LL)); // 100 ms
right_ir_sync_->registerCallback(
std::bind(&MetadataExportFiles::right_ir_metadata_sync_callback, this, _1, _2));
@@ -134,7 +134,7 @@ class MetadataExportFiles : 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::from_nanoseconds(100000000LL)); // 100 ms
depth_sync_->setMaxIntervalDuration(rclcpp::Duration(100000000LL)); // 100 ms
depth_sync_->registerCallback(
std::bind(&MetadataExportFiles::depth_metadata_sync_callback, this, _1, _2));
@@ -147,7 +147,7 @@ class MetadataExportFiles : public rclcpp::Node {
color_sync_ = std::make_shared<message_filters::Synchronizer<MySyncPolicy>>(
MySyncPolicy(10), *color_image_sub_, *color_metadata_sub_);
color_sync_->setMaxIntervalDuration(rclcpp::Duration::from_nanoseconds(100000000LL)); // 100 ms
color_sync_->setMaxIntervalDuration(rclcpp::Duration(100000000LL)); // 100 ms
color_sync_->registerCallback(
std::bind(&MetadataExportFiles::color_metadata_sync_callback, this, _1, _2));