Versions Compared

Key

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

...

Multimedia
nameRouting.mp4
width100%

Usage

First make sure that the supporting software (LCC, IPS) is running and that the vehicles are online and placed on the map.

...

The list of integers in the run command must be the exact list of vehicle IDs for the active vehicles.

How it works

The program is based on the routing graph for the map layout.

...

The graph edges correspond to center lines, along which a vehicle may drive. Parallel lanes are not modeled, instead extra edges are added for lane changes in discrete locations.

Waiting Mode

The program starts in a waiting mode. It will transition into the running mode, when the following conditions are met.

  • Vehicle IPS observations were received for all expected vehicles.
  • All vehicles could be matched to the graph. All vehicles must be close to a center-line and oriented correctly.

Running Mode

The route planning and collision avoidance runs independently of the vehicle's actual behaviour. It is assumed that the vehicles follow the reference trajectories with sufficient accuracy.

Random Route Selection

For each vehicle a random route is selected. This route is dynamically extended as time progresses. The route is represented as a list of edge indices. Since every edge is part of a cycle, the route can be extended indefinitely.

Source: https://git.rwth-aachen.de/CPM/Project/Lab/software/blob/d48cf9c589cd8375b7ea147d7931ed0f29650278/central_routing_example/src/VehicleTrajectoryPlanningState.cpp#L82

Moving along the Route

The current reference state of a vehicle in the graph is stored as the triple (edge_index, path_index, s_offset [in meters]). It is stored here:

...

The state input is then modified to (42, 1, 0.015).

Speed Profile + Path => Trajectory

The combination of the route and the path nodes define a path which determines where a vehicle should drive, but not when.

...

The direction vector is given for every path node in the graph.

Collision Test

When the program starts, all possible collisions, between all pairs of path nodes are checked. The result (boolean: collision yes/no?) is cached. The collision decision is based on the rectangle-rectange distance between the vehicles.

Sources:
https://git.rwth-aachen.de/CPM/Project/Lab/software/blob/d48cf9c589cd8375b7ea147d7931ed0f29650278/central_routing_example/src/lane_graph_tools.cpp#L72
https://git.rwth-aachen.de/CPM/Project/Lab/software/blob/d48cf9c589cd8375b7ea147d7931ed0f29650278/central_routing_example/src/geometry.hpp

Collision Avoidance

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. 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

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. The purpose of the buffer phase 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.

...