diff --git a/nav2_controller/src/controller_server.cpp b/nav2_controller/src/controller_server.cpp index ee3aa673f1c..74b3f3707b3 100644 --- a/nav2_controller/src/controller_server.cpp +++ b/nav2_controller/src/controller_server.cpp @@ -300,7 +300,10 @@ ControllerServer::on_deactivate(const rclcpp_lifecycle::State & /*state*/) */ costmap_ros_->deactivate(); - onGoalExit(); + publishZeroVelocity(); + for (auto & controller : controllers_) { + controller.second->reset(); + } vel_publisher_->on_deactivate(); remove_on_set_parameters_callback(dyn_params_handler_.get());