Skip to content

Commit 52a1dd3

Browse files
committed
update docs
Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>
1 parent 0093132 commit 52a1dd3

File tree

1 file changed

+19
-10
lines changed
  • planning/behavior_path_planner/autoware_behavior_path_planner_common/include/autoware/behavior_path_planner_common/utils/path_safety_checker

1 file changed

+19
-10
lines changed

planning/behavior_path_planner/autoware_behavior_path_planner_common/include/autoware/behavior_path_planner_common/utils/path_safety_checker/safety_check.hpp

+19-10
Original file line numberDiff line numberDiff line change
@@ -280,16 +280,25 @@ std::pair<bool, bool> checkObjectsCollisionRough(
280280
const bool use_offset_ego_point);
281281

282282
/**
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
293302
*/
294303
double calculateRoughDistanceToObjects(
295304
const PathWithLaneId & path, const PredictedObjects & objects,

0 commit comments

Comments
 (0)