Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] Does the command "traci.vehicle.getContextSubscriptionResults()" always lose some vehicles?

Hello:

I tried to get all vehicles' information in my simulation through "traci.vehicle.getContextSubscriptionResults()" command, but things didn't go well.

When the traffic number is large, the subscription command always returns fewer vehicles than the actual number running in sumo-gui.

My codes like that:
"
traci.vehicle.subscribeContext('ego', traci.constants.CMD_GET_VEHICLE_VARIABLE, 900000, [traci.constants.VAR_POSITION], 0, 2147483647)

...

sumo_vehicles = traci.vehicle.getContextSubscriptionResults('ego')
"

I also tried "traci.junction.getContextSubscriptionResults()", but the result is same.

Please help me to solve this problem.

Many thanks.

Back to the top