Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The collision avoidance is based on a vehicle reducing its speed before a potential collision. By default, all vehicles plan to drive with a given maximum speed. When a collision is predicted, the vehicle with ther greater ID reduces its planned speed (in the speed profile) a little prior to the collision. This process is repeated until all predicted collisions are resolved. If it is not possible to resolve all collisions, the program stops. The speed is increased and decreased in small increments, to maintain the maximum acceleration. As a result, vehicle 1 never slows down. Vehicle 2 slows to avoid vehicle 1. Vehicle 3 slows to avoid vehicles 1 and 2, and so on. This is a priority based collision avoidance. The speed is increased and decreased in small increments over time, to maintain the maximum acceleration.

Sources:
Priorities https://git.rwth-aachen.de/CPM/Project/Lab/software/blob/d48cf9c589cd8375b7ea147d7931ed0f29650278/central_routing_example/src/MultiVehicleTrajectoryPlanner.cpp#L49
Collision prediction https://git.rwth-aachen.de/CPM/Project/Lab/software/blob/d48cf9c589cd8375b7ea147d7931ed0f29650278/central_routing_example/src/VehicleTrajectoryPlanningState.cpp#L121
Speed reduction https://git.rwth-aachen.de/CPM/Project/Lab/software/blob/d48cf9c589cd8375b7ea147d7931ed0f29650278/central_routing_example/src/VehicleTrajectoryPlanningState.cpp#L162
TODO explain this image

Phases

The program runs in multiple concurrent phases or stages.

Routing Phase

In the routing phase, the route is selected sufficiently far into the future. However the timeline is not precisely defined at this stage.

Planning Phase

In the planning phase, the route and path are fixed. Only the speed profile can be changed to avoid collisions. The planning phase considers a constant (but configurable) time span (currently 48 sec).

Buffer Phase

In the buffer phase, the trajectory is fully defined and committed. Its purpose is to allow for delays, both in sending the commands over the network and in the planning phase. For a particularly difficult collision avoidance, the planning phase may have a long computation time. The buffer phase can "absorb" this delay jitter.

The function VehicleTrajectoryPlanningState::apply_timestep implements the transition from the planning phase to the buffer phase.

The function MultiVehicleTrajectoryPlanner::start implements the trajectory buffer.