From 38a705daacd132bb297bee6cb834d0932055dba0 Mon Sep 17 00:00:00 2001 From: Ryuta Kambe Date: Fri, 5 Jul 2024 09:32:53 +0900 Subject: [PATCH] fix(imu_corrector): fix shadowFunction (#7839) Signed-off-by: Ryuta Kambe --- sensing/imu_corrector/src/gyro_bias_estimator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sensing/imu_corrector/src/gyro_bias_estimator.cpp b/sensing/imu_corrector/src/gyro_bias_estimator.cpp index 278d2dfc28e59..6882fbf068fd1 100644 --- a/sensing/imu_corrector/src/gyro_bias_estimator.cpp +++ b/sensing/imu_corrector/src/gyro_bias_estimator.cpp @@ -51,11 +51,11 @@ GyroBiasEstimator::GyroBiasEstimator(const rclcpp::NodeOptions & options) [this](const Odometry::ConstSharedPtr msg) { callback_odom(msg); }); gyro_bias_pub_ = create_publisher("~/output/gyro_bias", rclcpp::SensorDataQoS()); - auto timer_callback = std::bind(&GyroBiasEstimator::timer_callback, this); + auto bound_timer_callback = std::bind(&GyroBiasEstimator::timer_callback, this); auto period_control = std::chrono::duration_cast( std::chrono::duration(timer_callback_interval_sec_)); - timer_ = std::make_shared>( - this->get_clock(), period_control, std::move(timer_callback), + timer_ = std::make_shared>( + this->get_clock(), period_control, std::move(bound_timer_callback), this->get_node_base_interface()->get_context()); this->get_node_timers_interface()->add_timer(timer_, nullptr);