eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.5k stars 1.41k forks source link

Segmentation Fault on Person Crossing a Street #15417

Open LuminousLamp opened 2 weeks ago

LuminousLamp commented 2 weeks ago

Hi SUMO development team, I have a question on a warning I found in the simulation. I am trying to add a person on a particular position at a time, and append a walking stage to it. The person happens to be placed on a crossing. But at the step when the person is about to leave the crossing, Segmentation Fault happens and the simulation fails.

Below is the code snippet I write for adding that person, with all variables replaced by actual values. I attach the road network below. roadnet.zip

walking_edges = [':node-1_c0']

traci.person.add(personID="3937", edgeID=':node-1_c0', pos=0)
traci.person.appendWalkingStage(
    personID="3937",
    edges=[':node-1_c0'],
    speed= 1,
    arrivalPos=-1,
)
traci.person.moveToXY(
    personID=3937,
    edgeID=':node-1_c0',
    x=-4809.88,
    y=3591.02,
    angle=218.6,
    keepRoute=0b110,
)

I wonder what causes the seg fault problem and is there any way to solve? I initially guessed that it might be the problem of misconfiguring the edges attribute in traci.person.appendWalkingStage, so I tried setting the list of edges to be also containing the crossing's incoming and outgoing edge, but an warning occurred: Warning: Person '3937' entered crossing lane ':node-1_c0_0' without registering approach, time=0.00 and the seg fault problem still exists.

Thank you for you help!

SUMO-version: 1_20_0+1629

operating system: Ubuntu 20.04

namdre commented 2 weeks ago

I'm unable to replicate the crash with the given information. Please provide a log of all traci commands as explained here: https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#generating_a_log_of_all_traci_commands

The warning entered ... without registering concerns right-of-way observance by motor vehicles and should not be connected to an application crash.