ros-navigation / navigation2

ROS 2 Navigation Framework and System
https://nav2.org/
Other
2.31k stars 1.2k forks source link

completely shutdown dyn_params_handler_ (s) #4521

Open GoesM opened 3 days ago

GoesM commented 3 days ago

Basic Info

Info Please fill out this column
Ticket(s) this addresses #4496
Primary OS tested on (Ubuntu, MacOS, Windows)
Robotic platform tested on (Steve's Robot, gazebo simulation of Tally, hardware turtlebot)
Does this PR contain AI generated software? (No; Yes and it is marked inline in the code)

Description of contribution in a few bullet points

result from experiments In amcl node, the following code could completely shutdown the callback threads properly:

  // shutdown and reset dynamic parameter handler
  remove_on_set_parameters_callback(dyn_params_handler_.get());
  dyn_params_handler_.reset();

Future work that may be required in bullet points

Here's a todo list for my future work, I think I'd check out package by package:

This PR is opened as a demo. If there are no issues here, I will quickly check and correct all remaining packages, and then update this PR in one go.

codecov[bot] commented 3 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Files Coverage Δ
nav2_amcl/src/amcl_node.cpp 70.65% <100.00%> (+0.03%) :arrow_up:

... and 1 file with indirect coverage changes