From ff17e8ab3a4c3386eebda86f5280bebe1a772fc3 Mon Sep 17 00:00:00 2001 From: "Dr. Denis" Date: Mon, 19 Jun 2023 18:30:04 +0200 Subject: [PATCH] Don't reset commands in `on_deactivate`. --- pid_controller/src/pid_controller.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pid_controller/src/pid_controller.cpp b/pid_controller/src/pid_controller.cpp index d7ac7fb5ee..0a90db18c9 100644 --- a/pid_controller/src/pid_controller.cpp +++ b/pid_controller/src/pid_controller.cpp @@ -357,11 +357,6 @@ controller_interface::CallbackReturn PidController::on_activate( controller_interface::CallbackReturn PidController::on_deactivate( const rclcpp_lifecycle::State & /*previous_state*/) { - // instead of a loop - for (size_t i = 0; i < dof_; ++i) - { - command_interfaces_[i].set_value(std::numeric_limits::quiet_NaN()); - } return controller_interface::CallbackReturn::SUCCESS; }