From c467026f1773b47f4a0cad0b94d1a66d6d6abfc8 Mon Sep 17 00:00:00 2001 From: Thibault Poignonec Date: Sun, 1 Dec 2024 14:03:45 +0100 Subject: [PATCH] strictly accelerating only --- include/control_toolbox/rate_limiter.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/control_toolbox/rate_limiter.hpp b/include/control_toolbox/rate_limiter.hpp index 47bd9c9..df99c3f 100644 --- a/include/control_toolbox/rate_limiter.hpp +++ b/include/control_toolbox/rate_limiter.hpp @@ -300,7 +300,7 @@ T RateLimiter::limit_second_derivative(T & v, T v0, T v1, T dt) // Only limit jerk when accelerating or reverse_accelerating // Note: this prevents oscillating closed-loop behavior, see discussion // details in https://github.com/ros-controls/control_toolbox/issues/240. - if ((dv - dv0) * (v - v0) >= 0) + if ((dv - dv0) * (v - v0) > 0) { const T dt2 = dt * dt;