Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] Weird behaviour with lane blocking ghost vehicle


I am using a ghost vehicle to block a part of a lane by setting a custom length. However, at a certain set custom length, there is some weird behaviour by vehicles in the only other lane where they keep starting and stopping in a jerk-like motion. Not sure what exactly is causing this. I have attached a video to explain the problem. Pasting the relevant files here:


  <node id="1" x="-500.0" y="0.0" type="priority"/>
  <node id="2" x="+500.0" y="0.0" type="priority"/>


  <edge id="1f2" from="1" to="2" numLanes="2" />


    <vType id="veh" length="5" />
    <route id="r0" color="1,1,0" edges="1f2" />
    <flow id="f" color="0,1,0"  begin="0" end="300" vehsPerHour="10000" type="veh" route="r0" departLane="random" departSpeed="random" arrivalLane="random" />
</routes> (Python TraCI code):

step = 0
GHOST_POS = 750.0
END = 300.0

traci.vehicle.add(vehID='ghost', routeID='r0', typeID='veh', depart=0, departLane=0, departPos=GHOST_POS, departSpeed='random', arrivalLane='current', arrivalPos=GHOST_POS)
traci.vehicle.setLength(vehID='ghost',length=500) # 300m length has no issues

traci.vehicle.setStop(vehID='ghost', edgeID='1f2', pos=GHOST_POS, duration=10, until=END)

while step < END:


The same simulation for a ghost vehicle of length 300 (m) poses no issues and the vehicles move forward as expected. Is this something to do with the total length of the edge/lane compared to that of the ghost vehicle? 

Any clue/idea as to what may be causing this will really be appreciated!

Thank you.


Attachment: Weird behaviour in SUMO.mp4
Description: video/mp4

Back to the top