## Appendix A Cooperative Pilot
### Evaluation and Selection of Trajectories for ADS  
As we have seen previously, the decision module directly integrates most of the legal and regulatory safety aspects in the generation of the ego-vehicle speed profiles and the ego-vehicle trajectories. The speed profiles, respecting the safety constraints, are obtained by taking the minimum of the speed profiles with respect to the constraints applied in the computation of the prediction of speed profiles and trajectories for the ego-vehicle. The legal safety trajectories are found by taking the maximum (absolute values) of the trajectories relative to the following constraints: comfort, the maximum slope of the trajectories, target speed profiles, and accelerations. This gives seven speed profiles and seven trajectories for the ego-vehicle: 0A, 0B and 0C for normal system operation, FA, FB, FC and JB for operation in \"emergency\" mode (including \"collision mitigation\" and \"emergency braking\"). The objective of the evaluation stage will be to evaluate these seven trajectories on the aspects which were not taken into account in the previous stage of trajectories generation.  
A performance cost is assigned to each of the remaining safety aspects. The cost of performance is binary (for instance, non-physical trajectories are immediately rejected), except for collisions with obstacles. In this case, the cost is proportional to the impact speed of the collision. This allows choosing the trajectory with a minimal impact in situations where an accident cannot be avoided. In the trajectory generation step, only \"ghost\" vehicles and frontal objects were taken into account. The trajectory assessment stage also considers the prediction of both the \"ghosts\" and \"vehicles\" trajectories present at the rear of the ego vehicle and on the adjacent lanes. This assessment step verifies that the speed and speed profile of the ego-vehicle allow \"ghost\" vehicles to brake until the ego-vehicle speed with a reasonable deceleration. The assessment stage also checks that the vehicles at the rear and on the sides do not need to brake during an ego-vehicle maneuver. The evaluation only applies to lane change trajectories 0A, 0C, FA and FC, and not to lane-keeping trajectories 0B, FB and JB. In the current lane of the ego-vehicle, it stays the priority vehicle on the \"ghosts\" and \"obstacles\" vehicles in both rear and adjacent lanes.  
The evaluation step also takes into account the type of target lane and the associated road markings to validate or not the lane change trajectories 0A, 0C, FA and FC. Moreover,in normal driving, the 0A and 0C trajectories should only target accessible lanes that do not have continuous lane markings. On the other hand, the \"emergency\" trajectories (FA and FC) can operate on an emergency stop lane or on a normal lane, and the ego vehicle can then cross continuous lane markings. Indeed, a lane change towards an emergency stop lane is preferable to a collision with another vehicle. This maneuver is a priority safety maneuver.  
The application of each rule greatly reduces the trajectory solutions space. For instance, the \"traffic\" rules may exclude the possibility of lane changing, the \"human\" rules limit the ego-vehicle speed, and the \"system\" rules limit the deceleration and acceleration capabilities of the ego-vehicle. However, after this evaluation stage, a minimum of at least one trajectory must exist to allow the safe evolution of the ego vehicle. In the worst case, an emergency trajectory is generated.