From f4b65b0e84242606bc75cb0dce861ceba219c8ff Mon Sep 17 00:00:00 2001 From: easylyou <38713965+easylyou@users.noreply.github.com> Date: Tue, 7 Sep 2021 23:47:39 +0800 Subject: [PATCH] fix pf_ use-before-initial in laserReceived() callback (#2550) Co-authored-by: Kai-Tao Xie --- 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 1f82e2c61b..17c8474ba7 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; }