32namespace third_party_perception {
41 std::vector<Vec2d> result;
43 result.emplace_back(vertex.x(), vertex.y());
72 for (
auto& eye_obstacle :
73 *(eye_obstacles_fusion.mutable_perception_obstacle())) {
74 for (
auto& radar_obstacle :
75 *(radar_obstacles_fusion.mutable_perception_obstacle())) {
76 if (
HasOverlap(eye_obstacle, radar_obstacle)) {
77 eye_obstacle.set_confidence(0.99);
78 eye_obstacle.mutable_velocity()->CopyFrom(radar_obstacle.velocity());
84 return eye_obstacles_fusion;
The class of polygon in 2-D.
bool HasOverlap(const LineSegment2d &line_segment) const
Check if a line segment has overlap with this polygon.
Implements a class of 2-dimensional vectors.
PerceptionObstacles EyeRadarFusion(const PerceptionObstacles &eye_obstacles, const PerceptionObstacles &radar_obstacles)
bool HasOverlap(const PerceptionObstacle &obstacle_1, const PerceptionObstacle &obstacle_2)
std::vector< Vec2d > PerceptionObstacleToVectorVec2d(const PerceptionObstacle &obstacle)
Define the Polygon2d class.
repeated apollo::common::Point3D polygon_point
repeated PerceptionObstacle perception_obstacle