//construct a bounding box according to obstacle's length and width got from Perception module Box2d obstacle_box = obstacle->GetBoundingBox(obtacle_point); //if there is overlap between obstacle and ego vehicle, return if (ego_rlap(obstacle_box)) { return true; } } } return false;} /** * @brief Check if there are overlaps between obstacles and ego vehicle according to the predicted obstacles environment * @pre BuildPredictedEnvironment() is called before this, so that predicted_bounding_rectangles_ is ready * @param discretized_trajectory ego vehicle's trajectory sampling points * @return true if collision */bool CollisionChecker::InCollision( const DiscretizedTrajectory& discretized_trajectory) { CHECK_LE(discretized_oints(), predicted_bounding_rectangles_.size()); const auto& vehicle_config = common::VehicleConfigHelper::Instance()->GetConfig(); double ego_length = vehicle_e_param().length(); double ego_width = vehicle_e_param().width(); //traverse every point on ego vehicle's trajectory for (size_t i = 0; i < discretized_oints(); ++i) { const auto& trajectory_point = discretized_toryPointAt(static_cast
本文发布于:2024-09-22 21:17:31,感谢您对本站的认可!
本文链接:https://www.17tex.com/fanyi/5383.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |