SUMO ego 车辆在一段时间后保持右车道

SUMO ego vehicles keep right lane after a while

我正在使用 Webots 来模拟自动驾驶汽车。我创建了网络文件和 sumo.rou.xml,但在开始模拟后,所有自我车辆将保持其正确的车道。我想在所有车道上都有交通。这里有没有人告诉我如何在模拟过程中强制自我车辆改变车道?

最好的, MZ

这很可能是因为他们的模型太接近了,理想情况下,如果你想让一些车辆超车,你应该定义一些车辆比其他车辆慢。这可以通过车辆类型的 'maxSpeed' 参数来设置。您可能还想更改跟车模型 (https://sumo.dlr.de/wiki/Definition_of_Vehicles,_Vehicle_Types,_and_Routes#Car-Following_Models) 及其参数('sigma' 和 'tau')。

您可以在这里找到车型的所有参数:https://sumo.dlr.de/wiki/Definition_of_Vehicles,_Vehicle_Types,_and_Routes#Vehicle_Types

另请注意,默认情况下,SUMO 中的车辆不会使用对向车道超车,请参阅 SUMO 文档以启用反向行驶: https://sumo.dlr.de/wiki/Simulation/OppositeDirectionDriving

要在模拟过程中与 SUMO 交互,您可以使用 TraCI Link。可以查到资料here. You can use the TraCI package for Python, and then change the lanes of any vehicle using the command changeLane