TraCI 模块 - 问题 运行 traci.start(sumoCmd)
TraCI Module - Problems running traci.start(sumoCmd)
sumoBinary = "/usr/bin/sumo-gui"
sumoCmd = [sumoBinary, "-c", "map.sumo.cfg"]
import traci
traci.start(sumoCmd)
当我使用 traci.start(sumoCmd)
时,出现以下错误:
AtributeError: 'module' object has no attribute 'start'
合乎逻辑的,因为如果我搜索traci模块,并使用dir命令分析根本没有启动功能:
['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']
这个功能很好用,我还以为是traci模块里的呢。
可以看出:http://www.sumo.dlr.de/wiki/TraCI/Interfacing_TraCI_from_Python
任何人都可以解释一下如何找到它吗?谢谢
也因为 omnet++ 我使用的是 sumo-0.25.0 ,traci.start 是否包含在更高版本中?
已将 sumo traci 模块更新为较新的模块 (0.29),并且成功了。
不幸的是,sumo-0.25 traci 模块没有 traci.start(sumoCmd) 功能
sumoBinary = "/usr/bin/sumo-gui"
sumoCmd = [sumoBinary, "-c", "map.sumo.cfg"]
import traci
traci.start(sumoCmd)
当我使用 traci.start(sumoCmd)
时,出现以下错误:
AtributeError: 'module' object has no attribute 'start'
合乎逻辑的,因为如果我搜索traci模块,并使用dir命令分析根本没有启动功能:
['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']
这个功能很好用,我还以为是traci模块里的呢。
可以看出:http://www.sumo.dlr.de/wiki/TraCI/Interfacing_TraCI_from_Python
任何人都可以解释一下如何找到它吗?谢谢
也因为 omnet++ 我使用的是 sumo-0.25.0 ,traci.start 是否包含在更高版本中?
已将 sumo traci 模块更新为较新的模块 (0.29),并且成功了。
不幸的是,sumo-0.25 traci 模块没有 traci.start(sumoCmd) 功能