From: Jiri Vlasak Date: Fri, 5 Apr 2019 06:52:30 +0000 (+0200) Subject: Fix `std::abs` X-Git-Tag: v0.6.0~6 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/hubacji1/iamcar.git/commitdiff_plain/8837a217cfc9ac196cacb8a32f3efd1cd10c7d1a Fix `std::abs` --- diff --git a/vehicle_platform/cost.cc b/vehicle_platform/cost.cc index 6187cd8..793cb0a 100644 --- a/vehicle_platform/cost.cc +++ b/vehicle_platform/cost.cc @@ -105,7 +105,7 @@ float co4(RRTNode *init, RRTNode *goal) float dy = goal->y() - init->y(); float edist = pow(pow(dx, 2) + pow(dy, 2), 0.5); float heur = BCAR_TURNING_RADIUS * MIN( - abs(goal->h() - init->h()), + std::abs(goal->h() - init->h()), 2 * M_PI - abs(goal->h() - init->h()) ); return MAX(edist, heur);