Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Error caused by Traci.junction.subscribeContext

Hello,
there is currently no know issue that would cause your subscription to fail, hence I'd like to investigate this as a possible bug.
Could you provide a small example (scenario files + traci script) to replicate your problem?
Instead of your traci script you can also provide a traceFile: https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#generating_a_log_of_all_traci_commands

regards,
Jakob

Am Do., 30. Juni 2022 um 17:01 Uhr schrieb George Li <wzhli2020@xxxxxxxxxxx>:
Hello,

I am writing this email to ask about an error I encountered in using traci. I developed on Ubuntu 20.0 with SUMO 1.8.0. 

In one of my projects, I intended to develop an adaptive traffic signal controller and use traci.junction.subscribeContext as below:

traci.junction.subscribeContext(tlid, traci.constants.CMD_GET_VEHICLE_VARIABLE, self.detect_radius,
                                [traci.constants.VAR_LANEPOSITION,
                                traci.constants.VAR_SPEED,
                                traci.constants.VAR_LANE_ID,
                                traci.constants.VAR_ROAD_ID])
When I run the whole project and the program executes the traci.simulationStep() later, the sumo would encounter an error "Error: tcpip::Socket::recvAndCheck @ recv: peer shutdown". But if I comment out the traci.junction.subscribeContext, the traci.simulationStep() can be executed properly.

Also, if I run a separate python file to solely run sumo simulation with traci.junction.subcribeContext and traci.simulationStep under the same sumo configure file and the same environment, the code can be executed without any errors.

In this case, I am wondering if there were any possible causes that can influence traci.junction.subscribeConext and traci.simulationStep() under a certain condition? Or under what circumstances can traci.simulationStep() be interrupted by traci.junction.subscribeConext?

I really appreciate your help. Thank you for your time.

Best regards,
George

_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top