Skip to content

Commit

Permalink
change reset-order in nav2_amcl
Browse files Browse the repository at this point in the history
  • Loading branch information
GoesM authored and GoesM committed Jan 25, 2024
1 parent e2781e5 commit 06ce6f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nav2_amcl/src/amcl_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,8 @@ AmclNode::on_cleanup(const rclcpp_lifecycle::State & /*state*/)
nomotion_update_srv_.reset();
initial_pose_sub_.reset();
laser_scan_connection_.disconnect();

tf_listener_.reset(); // tf_listener_ will access laser_scan_filter, so it should be reset earlier
laser_scan_filter_.reset();
laser_scan_sub_.reset();

Expand All @@ -341,7 +343,6 @@ AmclNode::on_cleanup(const rclcpp_lifecycle::State & /*state*/)

// Transforms
tf_broadcaster_.reset();
tf_listener_.reset();
tf_buffer_.reset();

// PubSub
Expand Down

0 comments on commit 06ce6f4

Please sign in to comment.