3

I'm using Webots to simulate an autonomous vehicle. I created the net files and sumo.rou.xml, but after starting the simulation, all ego vehicles will keep their right lane. I want to have traffic in all lanes. Is there anybody here to tell me how can I force the ego vehicles to change their lane during the simulation?

Best, MZ

Mojmal
  • 33
  • 5

2 Answers2

2

This is most probably because their models are too close, ideally if you want some vehicles to overtake you should define some of the vehicles slower than the other. This can be set with the 'maxSpeed' parameter of the vehicle type. You may also want to change the Car-following model (https://sumo.dlr.de/wiki/Definition_of_Vehicles,_Vehicle_Types,_and_Routes#Car-Following_Models) and its parameters ('sigma' and 'tau').

You can find all the parameters of the vehicle type here: https://sumo.dlr.de/wiki/Definition_of_Vehicles,_Vehicle_Types,_and_Routes#Vehicle_Types

Note also that by default vehicles in SUMO will not use the opposite lane to overtake, please refer to the SUMO documentation to enable opposite direction driving: https://sumo.dlr.de/wiki/Simulation/OppositeDirectionDriving

David Mansolino
  • 1,713
  • 7
  • 13
  • Thanks for your reply. I solve the previous problem but now, the ego vehicles will not avoid the car under my control! I change the values like taa and sigma to boost their imperfection but, I have this problem! would you please tell me which value should be considered? – Mojmal Mar 08 '19 at 22:10
  • Actually changing minGap has no effect on the simulation and SUMO vehicles will colid the WEBOTs vehicles! – Mojmal Mar 08 '19 at 23:56
  • In the SUMO window (make sure to set the 'gui' field of the sumoInterface to TRUE), can you see the vehicle you are controlling at the expected location and displayed in green? – David Mansolino Mar 11 '19 at 16:46
0

To interact with SUMO during simulation, you can use the TraCI Link. Information can be found here. You can use the TraCI package for Python, and then change the lanes of any vehicle using the command changeLane

FrainBr33z3
  • 1,085
  • 1
  • 6
  • 12