提交 4286eaa6 编写于 作者: Z Zhang Liangliang 提交者: Dong Li

Planning: allow empty st_graph_boundary; do not return error when no mapping...

Planning: allow empty st_graph_boundary; do not return error when no mapping of obstacle. abstract redundant code to seperate function.
上级 a9c0086e
......@@ -69,6 +69,7 @@ class Obstacle {
const common::math::Box2d &PerceptionBoundingBox() const;
const prediction::Trajectory &Trajectory() const;
bool has_trajectory() const { return has_trajectory_; }
const perception::PerceptionObstacle &Perception() const;
......
......@@ -78,6 +78,7 @@ class PathObstacle {
std::vector<ObjectDecisionType> decisions_;
std::vector<std::string> decider_tags_;
SLBoundary sl_boundary_;
StGraphBoundary st_boundary_;
};
} // namespace planning
......
......@@ -57,6 +57,11 @@ class StBoundaryMapper {
double GetArea(const std::vector<STPoint>& boundary_points) const;
bool GetOverlapBoundaryPoints(
const std::vector<apollo::common::PathPoint>& path_points,
const Obstacle& obstacle, std::vector<STPoint>* upper_points,
std::vector<STPoint>* lower_points) const;
apollo::common::Status MapObstacleWithoutDecision(
const PathObstacle& path_obstacle,
std::vector<StGraphBoundary>* const boundary) const;
......
......@@ -55,6 +55,7 @@ class StGraphBoundary : public common::math::Polygon2d {
~StGraphBoundary() = default;
bool IsEmpty() const { return points.empty(); }
bool IsPointInBoundary(const StGraphPoint& st_graph_point) const;
bool IsPointInBoundary(const STPoint& st_point) const;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册