Hi Ruud,
just in case you would want to return to Simulation::getCollisions(), here
<https://sumo.dlr.de/extractTest.php?path=complex/traci/simulation/collisions>
is an example where it it used within the Python TraCI interface.
Best regards
Mirko
-----Original-Nachricht-----
Betreff: Re: [sumo-user] Get per-vehicle collision using TraCI?
Datum: 2023-07-25T11:19:20+0200
Von: "Ruud van Gaal via sumo-user" <[email protected]>
An: "Sumo project User discussions" <[email protected]>
Hi Mirko,
Thanks for the affirmation, I'm now using
Simulation::getCollidingVehicles*(), which is good enough. I didn't get any
return values from my Simulation::getCollisions() calls, but at this point
I don't need to investigate further.
Kind regards,
Ruud
On Mon, Jul 24, 2023 at 2:36 PM Mirko Barthauer <[email protected]
<mailto:[email protected]> > wrote:
Hi Ruud,
as you have noticed yourself, it is currently not possible to query
collisions using vehicle context subscription.
Simulation::getCollisions() returns compound objects with more
information for each collision (participants, respective types and
speeds, location). See the Python TraCI reference
<https://sumo.dlr.de/pydoc/traci._simulation.html#Collision> for the
correct order and compound size.
Best regards
Mirko
-----Original-Nachricht-----
Betreff: [sumo-user] Get per-vehicle collision using TraCI?
Datum: 2023-07-24T11:07:44+0200
Von: "Ruud van Gaal via sumo-user" <[email protected]
<mailto:[email protected]> >
An: "Sumo project User discussions" <[email protected]
<mailto:[email protected]> >
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
_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user