@@ -280,16 +280,25 @@ std::pair<bool, bool> checkObjectsCollisionRough(
280
280
const bool use_offset_ego_point);
281
281
282
282
/* *
283
- * @brief Calculate the rough distances between the path and the objects and return the minimum
284
- * @param path The path of the ego vehicle.
285
- * @param objects The predicted objects.
286
- * @param parameters The common parameters used in behavior path planner.
287
- * @param use_offset_ego_point If true, the closest point to the object is calculated by
288
- * interpolating the path points.
289
- * @param distance_type The type of distance to calculate. "min" or "max". Calculate the distance
290
- * when the distance is minimized or maximized when the direction of the ego and the object is
291
- * changed.
292
- * @return The rough distance between the ego vehicle and the objects.
283
+ * @brief Calculate the shortest rough distance between ego vehicle and objects based on specific
284
+ * orientation cases
285
+ * @details
286
+ * This function calculates a rough estimate of the closest distance between the ego vehicle's path
287
+ * and objects by considering two specific orientation cases:
288
+ * - "min": Uses the maximum extents of both ego and object (diagonal orientation case)
289
+ * This calculates the worst-case, shortest possible distance when objects are oriented to
290
+ * minimize the gap between them (when corners face each other)
291
+ * - "max": Uses the minimum extents of both ego and object (parallel orientation case)
292
+ * This calculates the best-case, longest possible distance when objects are oriented to
293
+ * maximize the gap between them (when sides are parallel)
294
+ * @param path The path of the ego vehicle
295
+ * @param objects The predicted objects to calculate distance to
296
+ * @param parameters The common parameters used in behavior path planner
297
+ * @param use_offset_ego_point If true, uses interpolated point on path closest to object for more
298
+ * accurate calculation
299
+ * @param distance_type Either "min" or "max" to specify which orientation case to calculate
300
+ * @return The shortest rough distance between the ego vehicle and any object for the specified
301
+ * orientation case
293
302
*/
294
303
double calculateRoughDistanceToObjects (
295
304
const PathWithLaneId & path, const PredictedObjects & objects,
0 commit comments