【问题标题】:Getting error "Could not start SUMO" while following Veins tutorial遵循 Veins 教程时出现错误“无法启动 SUMO”
【发布时间】:2023-03-17 20:55:01
【问题描述】:

我对 Omnet++ 还很陌生,我正在尝试按照教程 (https://veins.car2x.org/tutorial/) 来设置 Veins。我在最后一步“运行 Veins 演示场景”时遇到了错误。使用 SUMO 1.2.0 和 Veins 4.7.1

我确保为 SUMO 正确添加了 Path 变量,并通过检查 cmd 中的 SUMO 版本来测试它是否正常工作。 我还通过运行其他项目(例如 tictoc 示例)确保 omnet++ 本身正常工作。 然而,在教程的最后一步,当我尝试启动配置时,它开始按预期监听端口 9999,但它从未启动 SUMO,我收到以下错误:

Could not start SUMO (C:/Users/user/Downloads/Sumo/bin/sumo-gui.exe -c erlangen.sumo.cfg): [Error 2] The system cannot find the file specified

我确保从 erlangen.sumo.cfg 文件所在的正确上下文运行命令。

我还运行了 erlangen.sumo.cfg,它已正确加载。

我在这里缺少什么?感谢您的帮助。

/c/Users/maria/Downloads/veins-4.7.1/veins-veins-4.7.1/examples/veins$ sumo -c erlangen.sumo.cfg
Loading configuration... done.
/c/Users/maria/Downloads/veins-4.7.1/veins-veins-4.7.1/examples/veins$ /c/Users/maria/Downloads/veins-4.7.1/veins-veins-4.7.1/sumo-launchd.py -vv -c /c/Users/user/Downloads/Sumo/bin/sumo-gui.exe
Logging to c:/users/maria/appdata/local/temp/sumo-launchd.log
Listening on port 9999
Connection from 127.0.0.1 on port 64943
Handling connection from 127.0.0.1 on port 64943
Got TraCI message of length 2
Got TraCI command of length 1
Got TraCI command 0x0
Got CMD_GETVERSION
Got TraCI message of length 319
Got TraCI command of length 314
Got TraCI command 0x75
Got CMD_FILE_SEND for "sumo-launchd.launch.xml"
Got CMD_FILE_SEND with data "<launch>
  <copy file="erlangen.net.xml"/>
  <copy file="erlangen.rou.xml"/>
  <copy file="erlangen.poly.xml"/>
  <copy file="erlangen.sumo.cfg" type="config"/>
  <basedir path="C:/Users/maria/Downloads/veins-4.7.1/veins-veins-4.7.1/examples/veins/"/>
  <seed value="0"/>
</launch>
"
Creating temporary directory...
Temporary dir is c:/users/maria/appdata/local/temp/sumo-launchd-tmp-9wfgio
Base dir is C:/Users/maria/Downloads/veins-4.7.1/veins-veins-4.7.1/examples/veins/
Seed is 0
Finding free port number...
Claiming lock on port
...found port 64944
Starting SUMO (C:/Users/user/Downloads/Sumo/bin/sumo-gui.exe -c erlangen.sumo.cfg) on port 64944, seed 0
Releasing lock on port
Cleaning up
Result: "<?xml version="1.0"?>
<status>
        <exit-code>-1</exit-code>
        <start>1564500716</start>
        <end>1564500716</end>
        <status>Could not start SUMO (C:/Users/user/Downloads/Sumo/bin/sumo-gui.exe -c erlangen.sumo.cfg): [Error 2] The system cannot find the file specified</status>
        <stdout><![CDATA[]]></stdout>
        <stderr><![CDATA[]]></stderr>
</status>
"
Closing connection from 127.0.0.1 on port 64943

【问题讨论】:

    标签: omnet++ veins sumo


    【解决方案1】:

    静脉 4.7。与较新版本的 SUMO 不兼容。要运行 Veins 示例,请安装 SUMO 0.32。

    如果您需要更新的 SUMO,可以尝试 SUMO 1.1 和 Veins 5.1a。请注意,这是 alpha 版本,可能不稳定。

    【讨论】:

    • 我已经安装了 SUMO 0.32 并尝试重新运行模拟,但仍然出现同样的错误。
    • 我认为您遇到了同样的错误,因为 Veins 仍在尝试运行 SUMO 1.2。我从您的其他答案中看到,您通过正确设置支持版本的路径解决了这个问题。
    【解决方案2】:

    您已要求sumo-launchd.pySumo/bin/sumo.exe 运行SUMO,但您的系统找不到指定的文件。最有可能的是,您需要更像这样/c/Users/user/src/sumo-0.25.0/bin/sumo.exe 运行 SUMO(取决于您放置 sumo.exe 的位置)

    【讨论】:

    • 是的,就是这样。我不得不使用路径/c/Users/user/src/sumo-0.25.0/bin/sumo.exe。谢谢!
    • 你能把它作为回答吗!
    【解决方案3】:

    当我在 C:\Users\user\src\sumo-0.32.0 以外的任何其他路径中设置 SUMO 时,它不起作用。

    因此,当我删除 SUMO 并将其下载到该路径时,它解决了问题。

    【讨论】:

      猜你喜欢
      • 2014-12-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-05
      • 1970-01-01
      • 2012-09-24
      • 2011-09-03
      相关资源
      最近更新 更多