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 <xxxxx@xxxxxxx>:
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?
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?