]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/blobdiff - vehicle_platform/cost.cc
Fix `std::abs`
[hubacji1/iamcar.git] / 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);