Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Collision awarness

see https://sumo.dlr.de/pydoc/traci._lane.html
lane.getFoes
lane.getInternalFoes
lane.getLinks

once you have the foe lane ids, you can retrieve the relevant vehicles with lane.getLastStepVehicleIDs


Am Mo., 30. Mai 2022 um 13:13 Uhr schrieb Lu <xxxx@xxxxxxxx>:

Sorry for asking the same question. I can't find the answer I'm looking for with SSM. 

I want to use traci to get whether there will be a collision at intersections and roundabouts. 

I also want to know who I'm going to collide with. 

For example, a car traveling from left to right at an intersection ("vehicle1") and a vehicle traveling from top to bottom ("vehicle2") continue to go on, there is a possibility of a collision. Speed doesn't matter. In other words, it doesn't matter whether or not they collide when driving at the same speed, it is important that the road to the left of the intersection and the road to the top are colliding roads. 

I wonder if it is possible to get the value by traci or other methods. 

 

Regards.

 

-----Original Message-----
From: "Lu"<xxxxx@xxxxxxx>
To: "Sumo project User discussions"<sumo-user@xxxxxxxxxxx>;
Cc:
Sent: 2022-05-30 (월) 19:09:32 (GMT+09:00)
Subject: Re: [sumo-user] Collision awarness
 

Thank you so much for your kind explanation. 

But the situations where I try to recognize the risk of collision are intersections and roundabouts. 

I'm trying to see if I can do it using the SSM you answered first. 

 

Thank you again

-----Original Message-----
From: "Jakob Erdmann"<namdre.sumo@xxxxxxxxx>
To: "Sumo project User discussions"<sumo-user@xxxxxxxxxxx>;
Cc:
Sent: 2022-05-30 (월) 18:50:22 (GMT+09:00)
Subject: Re: [sumo-user] Collision awarness
 

traci.vehicle.getLaneChangeState / getLaneChangeStatePretty returns whether a change in a given direction is unsafe:
- "overlapping" means that a change would directly cause a collision
- "blocked" indicates that the change would violate safe gaps so it could cause a collision in subsequent steps
 
you can also compute these gaps directly with vehicle.getSecureGap 
For speed changes, you can use getFollowSpeed to compute the maximum speed which is considered "safe" by the current carFollowModel. 

Am Mo., 30. Mai 2022 um 08:01 Uhr schrieb Lu <xxx@xxxxxxxx>: 

Thanks Harald

 

I used traci to limit vehicle speed and lane changes. Therefore, speed and lane changes are made by myself using traci. 

So if I don't do anything, they will collide with each other. So I want to know whether to do it or not before crashing. Is there any way to find out using traci in the current version? 

Regards

-----Original Message-----
From: "Harald Schaefer"<fechsaer@xxxxxxxxx>
To: <sumo-user@xxxxxxxxxxx>;
Cc:
Sent: 2022-05-30 (월) 14:56:52 (GMT+09:00)
Subject: Re: [sumo-user] Collision awarness
 

Hi,


in general SUMO tries to avoid collisions. In junctions the cars move according to traffic rules.

See https://sumo.dlr.de/docs/Simulation/Safety.html#collisions for more details.


Harald


Am 30.05.22 um 07:19 schrieb Lu:

Hi!

 

I would like to know whether there will be a collision when two vehicles are traveling in their current direction. 

We plan to use traci, and if there is a risk of collision, i will take appropriate measures to prevent the collision. 

Could it be possible to use traci to get information on whether or not there is a possibility of collision in situations such as intersections or roundabouts? 

Or is there no function available for this in SUMO, and I have no choice but to process data such as coordinates and judge it myself? 

 

Thanks!!


_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
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