Sumoweb3d在3D世界中不显示汽车和路标:如何应用一些解决方案

2024-10-03 09:20:43 发布

您现在位置:Python中文网/ 问答频道 /正文

我刚刚用相扑成功地创建了我的第一个模拟,如您所见:

1

我想创造一个汽车可以行驶的三维环境。我读到sumo-web3d可以做到这一点

C:\Users\virtu\OneDrive\Desktop\SUMO\xml>sumo-web3d -c \users\virtu\onedrive\desktop\sumo\xml\map.sumo.cfg
Listening on:
    127.0.0.1:5000 (HTTP)
    127.0.0.1:5678 (WebSockets)

Switching to map.sumo.cfg
Executing C:\Program Files (x86)\Eclipse\Sumo\bin\sumo -c c:\users\virtu\onedrive\desktop\sumo\xml\map.sumo.cfg
Loading configuration... done.
Step #0.00C:\Program Files (x86)\Eclipse\Sumo\tools\traci\domain.py:113: UserWarning: The domain trafficlights is deprecated, use trafficlight instead.
  self._name, self._deprecatedFor))  # , DeprecationWarning)
Step #1.00000.00*RT, ~0.00UPS, TraCI: 13ms, vehicles TOT 0 ACT 0 BUF

但事情是这样的:

2

如你所见,只有一个光是可见的。我没有看到任何汽车或其他道路信号,我看到相扑。可能的解决方案如下:

https://github.com/sidewalklabs/sumo-web3d/issues/10

例如https://github.com/namdre说:

为了适应traci protocoll的变化,在pip包中安装python traci库的1.0.1版就足够了(或者只需通过SUMO\u HOME变量导入traci,如http://sumo.dlr.de/wiki/TraCI/Interfacing_TraCI_from_Python#importing_traci_in_a_script所述)

或者在ML上,尤金·维尼茨基说:

如果您有任何超过0.32.0的版本,sumo web3d将因订阅调用方式的更改而无法工作。更改相对较小,只需更改订阅呼叫,使其通过车辆/红绿灯ID即可。

因为我不是一个开发人员,我真的不明白我应该怎么做来解决这个问题。有人能一步一步地给我解释清楚吗?我在Windows10上。非常感谢。你知道吗


Tags: mapfilesonedrivexmlprogramcfgusers汽车