sumoBinary = "/usr/bin/sumo-gui"
sumoCmd = [sumoBinary, "-c", "map.sumo.cfg"]
import traci
traci.start(sumoCmd)
When I use the traci.start(sumoCmd)
I get the following error:
AtributeError: 'module' object has no attribute 'start'
What is logical because if I search for the traci module, and use the dir command to analyze there is no start function at all:
['FatalTraCIError', 'Message', 'Storage', 'SubscriptionResults', 'TraCIException', '_DEBUG', '_RESULTS', '_STEPS2TIME', '_TIME2STEPS', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', '_beginMessage', '_checkResult', '_connections', '_embedded', '_message', '_modules', '_readSubscription', '_recvExact', '_sendByteCmd', '_sendDoubleCmd', '_sendExact', '_sendIntCmd', '_sendReadOneStringCmd', '_sendStringCmd', '_subscribe', '_subscribeContext', 'areal', 'close', 'constants', 'edge', 'getParameterAccessors', 'getVersion', 'gui', 'inductionloop', 'init', 'isEmbedded', 'junction', 'lane', 'multientryexit', 'person', 'poi', 'polygon', 'print_function', 'route', 'simulation', 'simulationStep', 'socket', 'struct', 'switch', 'time', 'trafficlights', 'vehicle', 'vehicletype']
This function is well used and I thought it was included in the traci module.
As it can be seen: http://www.sumo.dlr.de/wiki/TraCI/Interfacing_TraCI_from_Python
Can anyone explain how can I locate it? Thanks
Also because of omnet++ I am using sumo-0.25.0 , was traci.start included in a later version?
Updated sumo traci module to a newer one (0.29) and it worked out.
Unfortunately, sumo-0.25 traci module doesn't have traci.start(sumoCmd) function