@@ -316,7 +316,8 @@ class ObstacleCruiseModule
316
316
}
317
317
318
318
std::vector<TrajectoryPoint> plan (
319
- const std::vector<TrajectoryPoint> & base_traj_points, const std::vector<Obstacle> & obstacles,
319
+ const std::vector<TrajectoryPoint> & base_traj_points,
320
+ const std::vector<PredictedObjectBasedObstacle> & obstacles,
320
321
const CommonBehaviorDeterminationParam & common_behavior_determination_param,
321
322
const PlannerData & planner_data, const std::vector<TrajectoryPoint> & stop_traj_points)
322
323
{
@@ -359,8 +360,9 @@ class ObstacleCruiseModule
359
360
360
361
std::vector<CruiseObstacle> determineEgoBehaviorAgainstPredictedObjectObstacles (
361
362
const Odometry & odometry, const std::vector<TrajectoryPoint> & decimated_traj_points,
362
- const std::vector<Polygon2d> & decimated_traj_polys, const std::vector<Obstacle> & obstacles,
363
- const bool is_driving_forward, const VehicleInfo & vehicle_info)
363
+ const std::vector<Polygon2d> & decimated_traj_polys,
364
+ const std::vector<PredictedObjectBasedObstacle> & obstacles, const bool is_driving_forward,
365
+ const VehicleInfo & vehicle_info)
364
366
{
365
367
// cruise
366
368
std::vector<CruiseObstacle> cruise_obstacles;
@@ -558,15 +560,15 @@ class ObstacleCruiseModule
558
560
struct DebugData
559
561
{
560
562
DebugData () = default ;
561
- std::vector<Obstacle > intentionally_ignored_obstacles;
563
+ std::vector<PredictedObjectBasedObstacle > intentionally_ignored_obstacles;
562
564
std::vector<CruiseObstacle> obstacles_to_cruise;
563
565
MarkerArray cruise_wall_marker;
564
566
std::optional<std::vector<Metric>> cruise_metrics{std::nullopt};
565
567
};
566
568
567
569
std::optional<CruiseObstacle> createCruiseObstacle (
568
570
const Odometry & odometry, const std::vector<TrajectoryPoint> & traj_points,
569
- const std::vector<Polygon2d> & traj_polys, const Obstacle & obstacle,
571
+ const std::vector<Polygon2d> & traj_polys, const PredictedObjectBasedObstacle & obstacle,
570
572
const double precise_lat_dist, const bool is_driving_forward, const VehicleInfo & vehicle_info)
571
573
{
572
574
const auto & object_id = obstacle.uuid .substr (0 , 4 );
@@ -633,14 +635,14 @@ class ObstacleCruiseModule
633
635
}
634
636
635
637
std::optional<std::vector<CruiseObstacle>> findYieldCruiseObstacles (
636
- const std::vector<Obstacle > & obstacles, const std::vector<TrajectoryPoint> & traj_points ,
637
- const VehicleInfo & vehicle_info)
638
+ const std::vector<PredictedObjectBasedObstacle > & obstacles,
639
+ const std::vector<TrajectoryPoint> & traj_points, const VehicleInfo & vehicle_info)
638
640
{
639
641
if (obstacles.empty () || traj_points.empty ()) return std::nullopt;
640
642
const auto & p = cruise_behavior_determination_param_;
641
643
642
- std::vector<Obstacle > stopped_obstacles;
643
- std::vector<Obstacle > moving_obstacles;
644
+ std::vector<PredictedObjectBasedObstacle > stopped_obstacles;
645
+ std::vector<PredictedObjectBasedObstacle > moving_obstacles;
644
646
645
647
std::for_each (
646
648
obstacles.begin (), obstacles.end (),
@@ -715,7 +717,7 @@ class ObstacleCruiseModule
715
717
716
718
std::optional<std::vector<PointWithStamp>> createCollisionPointsForInsideCruiseObstacle (
717
719
const std::vector<TrajectoryPoint> & traj_points, const std::vector<Polygon2d> & traj_polys,
718
- const Obstacle & obstacle, const bool is_driving_forward,
720
+ const PredictedObjectBasedObstacle & obstacle, const bool is_driving_forward,
719
721
const VehicleInfo & vehicle_info) const
720
722
{
721
723
const auto & object_id = obstacle.uuid .substr (0 , 4 );
@@ -777,7 +779,7 @@ class ObstacleCruiseModule
777
779
778
780
std::optional<std::vector<PointWithStamp>> createCollisionPointsForOutsideCruiseObstacle (
779
781
const std::vector<TrajectoryPoint> & traj_points, const std::vector<Polygon2d> & traj_polys,
780
- const Obstacle & obstacle, const bool is_driving_forward,
782
+ const PredictedObjectBasedObstacle & obstacle, const bool is_driving_forward,
781
783
const VehicleInfo & vehicle_info) const
782
784
{
783
785
const auto & cp = common_behavior_determination_param_;
@@ -866,7 +868,7 @@ class ObstacleCruiseModule
866
868
}
867
869
868
870
std::optional<CruiseObstacle> createYieldCruiseObstacle (
869
- const Obstacle & obstacle, const std::vector<TrajectoryPoint> & traj_points)
871
+ const PredictedObjectBasedObstacle & obstacle, const std::vector<TrajectoryPoint> & traj_points)
870
872
{
871
873
if (traj_points.empty ()) return std::nullopt;
872
874
// check label
@@ -946,7 +948,7 @@ class ObstacleCruiseModule
946
948
}
947
949
948
950
bool isFrontCollideObstacle (
949
- const std::vector<TrajectoryPoint> & traj_points, const Obstacle & obstacle,
951
+ const std::vector<TrajectoryPoint> & traj_points, const PredictedObjectBasedObstacle & obstacle,
950
952
const size_t first_collision_idx) const
951
953
{
952
954
const auto obstacle_idx =
@@ -961,7 +963,8 @@ class ObstacleCruiseModule
961
963
}
962
964
963
965
bool isObstacleCrossing (
964
- const std::vector<TrajectoryPoint> & traj_points, const Obstacle & obstacle) const
966
+ const std::vector<TrajectoryPoint> & traj_points,
967
+ const PredictedObjectBasedObstacle & obstacle) const
965
968
{
966
969
const double diff_angle = calcDiffAngleAgainstTrajectory (traj_points, obstacle.pose );
967
970
0 commit comments