TrafficSignalController
We're currently working on the implementation of TrafficSignal related actions and conditions within the openSCENARIO-Engine. In order to implement the TrafficSignalControllerAction, which refers to specific phases of a traffic signal controller, the MantleAPI needs to be enhanced.
Currently, we're thinking about introducing a controller repository for traffic signals, which can be used in a two stage process:
-
Inform a potential simulator about traffic controllers and the corresponding phases.
Pseudocode:
auto repo = environment->GetTrafficSignalControllerRepository(); auto traffic_signal_controller = repo->Create([[std::string]] traffic_signal_controller_name, [[std::vector<mantleAPI::Phase>]] phases);
This also means, that we need to define a new mantleAPI::Phase datatype, similar to the definition in openSCENARIO (see here)
-
Use the same repository for implementing actions and conditions
Pseudocode:
auto repo = environment->GetTrafficSignalControllerRepository(); auto traffic_signal_controller = repo->Get([[std::string]] traffic_signal_controller_name); auto traffic_signal_phase = traffic_signal_controller->GetPhase();
We'll perpare an MR, but it would be great to have discussion beforehand, e.g. on how to properly define the Phase
datatype.