-
Hi, I get confused when trying to get an instance for TraCI and if it is wise to implement a new instance or how to get the currently running one for the Vehicle. I would like to know the requirements and how to initialize them for the TraCI API. If anyone has experience in using it please do let me know. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The |
Beta Was this translation helpful? Give feedback.
There is only a single API instance shared among all modules. This API object is a sub-class of the official SUMO
TraCIAPI
class, i.e. everything supported by SUMO is available. Vehicles are identified by unique IDs in SUMO and these string parameters are usually calledvehicleID
in the SUMO API. You can get the very same ID fromVehicleController::getVehicleId
.