|
| 1 | +# Predicted Path Checker |
| 2 | + |
| 3 | +## Purpose |
| 4 | + |
| 5 | +The Predicted Path Checker package is designed for autonomous vehicles to check the predicted path generated by control |
| 6 | +modules. It handles potential collisions that the planning module might not be able to handle and that in the brake |
| 7 | +distance. In case of collision in brake distance, the package will send a diagnostic message labeled "ERROR" to alert |
| 8 | +the system to send emergency and in the case of collisions in outside reference trajectory, it sends pause request to |
| 9 | +pause interface to make the vehicle stop. |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +## Algorithm |
| 14 | + |
| 15 | +The package algorithm evaluates the predicted trajectory against the reference trajectory and the predicted objects in |
| 16 | +the environment. It checks for potential collisions and, if necessary, generates an appropriate response to avoid them ( |
| 17 | +emergency or pause request). |
| 18 | + |
| 19 | +### Inner Algorithm |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | +**cutTrajectory() ->** It cuts the predicted trajectory with input length. Length is calculated by multiplying the |
| 24 | +velocity |
| 25 | +of ego vehicle with "trajectory_check_time" parameter and "min_trajectory_length". |
| 26 | + |
| 27 | +**filterObstacles() ->** It filters the predicted objects in the environment. It filters the objects which are not in |
| 28 | +front of the vehicle and far away from predicted trajectory. |
| 29 | + |
| 30 | +**checkTrajectoryForCollision() ->** It checks the predicted trajectory for collision with the predicted objects. It |
| 31 | +calculates both polygon of trajectory points and predicted objects and checks intersection of both polygons. If there is |
| 32 | +an intersection, it calculates the nearest collision point. It returns the nearest collision point of polygon and the |
| 33 | +predicted object. It also checks predicted objects history which are intersect with the footprint before to avoid |
| 34 | +unexpected behaviors. Predicted objects history stores the objects if it was detected below the "chattering_threshold" |
| 35 | +seconds ago. |
| 36 | + |
| 37 | +If the "enable_z_axis_obstacle_filtering" parameter is set to true, it filters the predicted objects in the Z-axis by |
| 38 | +using "z_axis_filtering_buffer". If the object does not intersect with the Z-axis, it is filtered out. |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | +**calculateProjectedVelAndAcc() ->** It calculates the projected velocity and acceleration of the predicted object on |
| 43 | +predicted trajectory's collision point's axes. |
| 44 | + |
| 45 | +**isInBrakeDistance() ->** It checks if the stop point is in brake distance. It gets relative velocity and |
| 46 | +acceleration of ego vehicle with respect to the predicted object. It calculates the brake distance, if the point in |
| 47 | +brake distance, it returns true. |
| 48 | + |
| 49 | +**isItDiscretePoint() ->** It checks if the stop point on predicted trajectory is discrete point or not. If it is not |
| 50 | +discrete point, planning should handle the stop. |
| 51 | + |
| 52 | +**isThereStopPointOnRefTrajectory() ->** It checks if there is a stop point on reference trajectory. If there is a stop |
| 53 | +point before the stop index, it returns true. Otherwise, it returns false, and node is going to call pause interface to |
| 54 | +make the vehicle stop. |
| 55 | + |
| 56 | +## Inputs |
| 57 | + |
| 58 | +| Name | Type | Description | |
| 59 | +| ------------------------------------- | ----------------------------------------------------- | --------------------------------------------------- | |
| 60 | +| `~/input/reference_trajectory` | `autoware_auto_planning_msgs::msg::Trajectory` | Reference trajectory | |
| 61 | +| `~/input/predicted_trajectory` | `autoware_auto_planning_msgs::msg::Trajectory` | Predicted trajectory | |
| 62 | +| `~/input/objects` | `autoware_auto_perception_msgs::msg::PredictedObject` | Dynamic objects in the environment | |
| 63 | +| `~/input/odometry` | `nav_msgs::msg::Odometry` | Odometry message of vehicle to get current velocity | |
| 64 | +| `~/input/current_accel` | `geometry_msgs::msg::AccelWithCovarianceStamped` | Current acceleration | |
| 65 | +| `/control/vehicle_cmd_gate/is_paused` | `tier4_control_msgs::msg::IsPaused` | Current pause state of the vehicle | |
| 66 | + |
| 67 | +## Outputs |
| 68 | + |
| 69 | +| Name | Type | Description | |
| 70 | +| ------------------------------------- | ---------------------------------------- | -------------------------------------- | |
| 71 | +| `~/debug/marker` | `visualization_msgs::msg::MarkerArray` | Marker for visualization | |
| 72 | +| `~/debug/virtual_wall` | `visualization_msgs::msg::MarkerArray` | Virtual wall marker for visualization | |
| 73 | +| `/control/vehicle_cmd_gate/set_pause` | `tier4_control_msgs::srv::SetPause` | Pause service to make the vehicle stop | |
| 74 | +| `/diagnostics` | `diagnostic_msgs::msg::DiagnosticStatus` | Diagnostic status of vehicle | |
| 75 | + |
| 76 | +## Parameters |
| 77 | + |
| 78 | +### Node Parameters |
| 79 | + |
| 80 | +| Name | Type | Description | Default value | |
| 81 | +| :---------------------------------- | :------- | :-------------------------------------------------------------------- | :------------ | |
| 82 | +| `update_rate` | `double` | The update rate [Hz] | 10.0 | |
| 83 | +| `delay_time` | `double` | he time delay considered for the emergency response [s] | 0.17 | |
| 84 | +| `max_deceleration` | `double` | Max deceleration for ego vehicle to stop [m/s^2] | 1.5 | |
| 85 | +| `resample_interval` | `double` | Interval for resampling trajectory [m] | 0.5 | |
| 86 | +| `stop_margin` | `double` | The stopping margin [m] | 0.5 | |
| 87 | +| `ego_nearest_dist_threshold` | `double` | The nearest distance threshold for ego vehicle [m] | 3.0 | |
| 88 | +| `ego_nearest_yaw_threshold` | `double` | The nearest yaw threshold for ego vehicle [rad] | 1.046 | |
| 89 | +| `min_trajectory_check_length` | `double` | The minimum trajectory check length in meters [m] | 1.5 | |
| 90 | +| `trajectory_check_time` | `double` | The trajectory check time in seconds. [s] | 3.0 | |
| 91 | +| `distinct_point_distance_threshold` | `double` | The distinct point distance threshold [m] | 0.3 | |
| 92 | +| `distinct_point_yaw_threshold` | `double` | The distinct point yaw threshold [deg] | 5.0 | |
| 93 | +| `filtering_distance_threshold` | `double` | It ignores the objects if distance is higher than this [m] | 1.5 | |
| 94 | +| `use_object_prediction` | `bool` | If true, node predicts current pose of the objects wrt delta time [-] | true | |
| 95 | + |
| 96 | +### Collision Checker Parameters |
| 97 | + |
| 98 | +| Name | Type | Description | Default value | |
| 99 | +| :--------------------------------- | :------- | :---------------------------------------------------------------- | :------------ | |
| 100 | +| `width_margin` | `double` | The width margin for collision checking [Hz] | 0.2 | |
| 101 | +| `chattering_threshold` | `double` | The chattering threshold for collision detection [s] | 0.2 | |
| 102 | +| `z_axis_filtering_buffer` | `double` | The Z-axis filtering buffer [m] | 0.3 | |
| 103 | +| `enable_z_axis_obstacle_filtering` | `bool` | A boolean flag indicating if Z-axis obstacle filtering is enabled | false | |
0 commit comments