From 16857f0bbad0c7d44354f0c97e0b2e3b7a622632 Mon Sep 17 00:00:00 2001 From: Kai-Tao Xie Date: Mon, 23 Aug 2021 11:52:17 +0800 Subject: [PATCH] fix possible stackunderflow in CoreWrapper constructed function --- include/rtabmap_ros/CoreWrapper.h | 4 ++++ src/CoreWrapper.cpp | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/rtabmap_ros/CoreWrapper.h b/include/rtabmap_ros/CoreWrapper.h index 321c257a..be520325 100644 --- a/include/rtabmap_ros/CoreWrapper.h +++ b/include/rtabmap_ros/CoreWrapper.h @@ -233,6 +233,10 @@ private: std::string groundTruthBaseFrameId_; std::string configPath_; std::string databasePath_; + + double tfDelay; + double tfTolerance; + double odomDefaultAngVariance_; double odomDefaultLinVariance_; double landmarkDefaultAngVariance_; diff --git a/src/CoreWrapper.cpp b/src/CoreWrapper.cpp index 57ba8455..c01adee3 100644 --- a/src/CoreWrapper.cpp +++ b/src/CoreWrapper.cpp @@ -138,8 +138,8 @@ CoreWrapper::CoreWrapper(const rclcpp::NodeOptions & options) : tfBroadcaster_ = std::make_shared(this); bool publishTf = true; - double tfDelay = 0.05; // 20 Hz - double tfTolerance = 0.1; // 100 ms + tfDelay = 0.05; // 20 Hz + tfTolerance = 0.1; // 100 ms configPath_ = this->declare_parameter("config_path", configPath_); databasePath_ = this->declare_parameter("database_path", databasePath_);