From d38936674f112116ad4c2c236f4281f941e26c9b Mon Sep 17 00:00:00 2001 From: Keisuke Shima Date: Wed, 17 Mar 2021 19:39:54 +0900 Subject: [PATCH] fix build error --- .../obstacle_stop_planner/adaptive_cruise_control.hpp | 5 +++++ obstacle_stop_planner_refine/src/adaptive_cruise_control.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/obstacle_stop_planner_refine/include/obstacle_stop_planner/adaptive_cruise_control.hpp b/obstacle_stop_planner_refine/include/obstacle_stop_planner/adaptive_cruise_control.hpp index e8dd747c..8d93f517 100644 --- a/obstacle_stop_planner_refine/include/obstacle_stop_planner/adaptive_cruise_control.hpp +++ b/obstacle_stop_planner_refine/include/obstacle_stop_planner/adaptive_cruise_control.hpp @@ -29,6 +29,11 @@ namespace obstacle_stop_planner { +using autoware_utils::Point2d; +using autoware_utils::Point3d; +using autoware_utils::Polygon2d; +using autoware_utils::Polygon3d; + class AdaptiveCruiseController { public: diff --git a/obstacle_stop_planner_refine/src/adaptive_cruise_control.cpp b/obstacle_stop_planner_refine/src/adaptive_cruise_control.cpp index 72f48712..0b47e746 100644 --- a/obstacle_stop_planner_refine/src/adaptive_cruise_control.cpp +++ b/obstacle_stop_planner_refine/src/adaptive_cruise_control.cpp @@ -298,7 +298,7 @@ std::tuple AdaptiveCruiseController::estimatePointVelocityFromPcl( prev_collision_point_valid_ = true; return std::forward_as_tuple(false, old_velocity); } - const double p_dist = autoware_utils::calcDistance2d(nearest_collision_point, prev_collision_point_); + const double p_dist = boost::geometry::distance(nearest_collision_point, prev_collision_point_); const auto p_diff = nearest_collision_point - prev_collision_point_; const double p_yaw = std::atan2(p_diff.x(), p_diff.y()); const double p_vel = p_dist / p_dt;