From 4cd538e24c2ef39de0f7156936b45db5400fd925 Mon Sep 17 00:00:00 2001
From: Sergi Hernandez Juan <shernand@iri.upc.edu>
Date: Mon, 17 Oct 2022 08:26:25 +0200
Subject: [PATCH] Solved a bug when generating a constant velocity spline: some
 of the parameters where not computed properly.

---
 src/vel_spline.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/vel_spline.cpp b/src/vel_spline.cpp
index 1f91e56..76d833c 100644
--- a/src/vel_spline.cpp
+++ b/src/vel_spline.cpp
@@ -181,7 +181,10 @@ bool CVelSpline::generate_max_length(double &max_len)
   if(fabs(this->start_acc-this->end_acc)<0.001)
   {
     if(fabs(this->end_vel-this->start_vel)<0.001)
+    {
       this->generate_constant_vel(this->start_vel,max_len);
+      return true;
+    }
     else
     {
       this->time=(2.0*max_len)/(this->end_vel+this->start_vel);
-- 
GitLab