From 0d660a29bbdcce7a640583bd61ef29ebf745a356 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Thu, 14 May 2020 11:34:53 +0200 Subject: [PATCH] Set default duration to the logaritm of path distance --- modules/autonavigation/pathsegment.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/autonavigation/pathsegment.cpp b/modules/autonavigation/pathsegment.cpp index 85dec829ab..f0e3ef776d 100644 --- a/modules/autonavigation/pathsegment.cpp +++ b/modules/autonavigation/pathsegment.cpp @@ -48,10 +48,8 @@ PathSegment::PathSegment(Waypoint start, Waypoint end, CurveType type, _duration = duration.value(); } else { - // TODO: compute default duration based on curve length - // Also, when compensatng for simulation time later we need to make a guess for - // the duration, based on the current position of the target. - _duration = 5; + _duration = std::log(pathLength()); + //LINFO(fmt::format("Default duration: {}", _duration)); } }