diff --git a/src/pid_ros.cpp b/src/pid_ros.cpp index 0cdef37..36e18d2 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_;