@@ -1079,7 +1079,11 @@ ObstacleCruisePlannerNode::createCollisionPointsForInsideCruiseObstacle(
1079
1079
std::vector<size_t > collision_index;
1080
1080
const auto collision_points = polygon_utils::getCollisionPoints (
1081
1081
traj_points, traj_polys, obstacle.stamp , resampled_predicted_path, obstacle.shape , now (),
1082
- is_driving_forward_, collision_index);
1082
+ is_driving_forward_, collision_index,
1083
+ calcObstacleMaxLength (obstacle.shape ) + p.decimate_trajectory_step_length +
1084
+ std::hypot (
1085
+ vehicle_info_.vehicle_length_m ,
1086
+ vehicle_info_.vehicle_width_m * 0.5 + p.max_lat_margin_for_cruise ));
1083
1087
return collision_points;
1084
1088
}
1085
1089
@@ -1119,7 +1123,10 @@ ObstacleCruisePlannerNode::createCollisionPointsForOutsideCruiseObstacle(
1119
1123
const auto collision_points = polygon_utils::getCollisionPoints (
1120
1124
traj_points, traj_polys, obstacle.stamp , resampled_predicted_path, obstacle.shape , now (),
1121
1125
is_driving_forward_, collision_index,
1122
- vehicle_info_.vehicle_width_m + p.max_lat_margin_for_cruise ,
1126
+ calcObstacleMaxLength (obstacle.shape ) + p.decimate_trajectory_step_length +
1127
+ std::hypot (
1128
+ vehicle_info_.vehicle_length_m ,
1129
+ vehicle_info_.vehicle_width_m * 0.5 + p.max_lat_margin_for_cruise ),
1123
1130
p.max_prediction_time_for_collision_check );
1124
1131
if (collision_points.empty ()) {
1125
1132
// Ignore vehicle obstacles outside the trajectory without collision
@@ -1196,7 +1203,11 @@ std::optional<StopObstacle> ObstacleCruisePlannerNode::createStopObstacle(
1196
1203
std::vector<size_t > collision_index;
1197
1204
const auto collision_points = polygon_utils::getCollisionPoints (
1198
1205
traj_points, traj_polys, obstacle.stamp , resampled_predicted_path, obstacle.shape , now (),
1199
- is_driving_forward_, collision_index);
1206
+ is_driving_forward_, collision_index,
1207
+ calcObstacleMaxLength (obstacle.shape ) + p.decimate_trajectory_step_length +
1208
+ std::hypot (
1209
+ vehicle_info_.vehicle_length_m ,
1210
+ vehicle_info_.vehicle_width_m * 0.5 + p.max_lat_margin_for_stop ));
1200
1211
if (collision_points.empty ()) {
1201
1212
RCLCPP_INFO_EXPRESSION (
1202
1213
get_logger (), enable_debug_info_,
0 commit comments