]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/commitdiff
Fix `std::abs`
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Fri, 5 Apr 2019 06:52:30 +0000 (08:52 +0200)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Fri, 5 Apr 2019 06:52:30 +0000 (08:52 +0200)
vehicle_platform/cost.cc

index 6187cd826d7440fe2d24ed872ebc438f246754f3..793cb0a25bb9299d36c66dfc25c2747aaefb841a 100644 (file)
@@ -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);