From 15349b962f7c2c826820e6ea9179e3b9e8078483 Mon Sep 17 00:00:00 2001 From: Kai-Tao Xie Date: Tue, 7 Sep 2021 11:28:38 +0800 Subject: [PATCH] fix pf_ use-before-initial in laserReceived() callback --- nav2_amcl/src/amcl_node.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nav2_amcl/src/amcl_node.cpp b/nav2_amcl/src/amcl_node.cpp index f1c0a6e556..5a7c7b54e7 100644 --- a/nav2_amcl/src/amcl_node.cpp +++ b/nav2_amcl/src/amcl_node.cpp @@ -234,12 +234,12 @@ AmclNode::on_configure(const rclcpp_lifecycle::State & /*state*/) initParameters(); initTransforms(); + initParticleFilter(); + initLaserScan(); initMessageFilters(); initPubSub(); initServices(); initOdometry(); - initParticleFilter(); - initLaserScan(); return nav2_util::CallbackReturn::SUCCESS; }