From 915c861993bc177be09ae0b1d0bcd993de2b5084 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Tue, 26 Nov 2024 19:18:00 +0000 Subject: [PATCH] Fix dt --- src/pid_ros.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pid_ros.cpp b/src/pid_ros.cpp index 0cdef37d..36e18d28 100644 --- a/src/pid_ros.cpp +++ b/src/pid_ros.cpp @@ -221,7 +221,7 @@ std::shared_ptr> PidROS::getPidSt double PidROS::computeCommand(double error, rclcpp::Duration dt) { - double cmd_ = pid_.computeCommand(error, static_cast(dt.nanoseconds())); + double cmd_ = pid_.computeCommand(error, static_cast(dt.nanoseconds())); publishPIDState(cmd_, error, dt); return cmd_; @@ -229,7 +229,7 @@ double PidROS::computeCommand(double error, rclcpp::Duration dt) double PidROS::computeCommand(double error, double error_dot, rclcpp::Duration dt) { - double cmd_ = pid_.computeCommand(error, error_dot, static_cast(dt.nanoseconds())); + double cmd_ = pid_.computeCommand(error, error_dot, static_cast(dt.nanoseconds())); publishPIDState(cmd_, error, dt); return cmd_;