Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] Get per-vehicle collision using TraCI?

Hi all,

I'm looking into detecting collisions for a specific (ego) vehicle using TraCI.
I found VAR_COLLIDING_VEHICLES_NUMBER and VAR_COLLIDING_VEHICLES_IDS, but those need to be fetched independently of a context subscription using the Simulation class. That could give me a lot of collision information I'm not interested in.

1. Can I get collision information using the vehicle context subscription method somehow? (I tried subscribing on VAR_COLLIDING_VEHICLES_NUMBER but that gives a not-supported error)
2. I also see Simulation::getCollisions(); is that a newer way of getting the collisions using getCollidingVehiclesIDList() and getCollidingVehiclesNumber()? What is the difference?

Thanks,
Ruud



Back to the top