Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Calculating time-to-collision

minTTC returns the *minimum* TTC observed for all ongoing encounters of the ego vehicle (during the whole time of the encounter thus far) instead of the current TTC which you are calculating.

Am Fr., 13. Mai 2022 um 02:43 Uhr schrieb Mariam Wessam Hassan Mohamed Nour <mariam.nour@xxxxxxxxxxxxxxx>:

Hi all,


I’m trying to calculate time to collision at every time step for each vehicle in sumo.


I’m getting the spacing between each two vehicles as well as the speed of the leader using the getLeader function. Then I use the equation ((spacing+minGap)/difference in speed) to get ttc.

The gap calculation was based on this (


On the other hand, every vehicle is equipped with an SSM device to calculate ttc. So I’m also able to directly get ttc values for each vehicle using traci.vehicle.getParameter(veh, "device.ssm.minTTC"). However, this ttc value and the one I calculate above don’t match.


Am I calculating ttc using wrong values in the first approach? If not, then what could be the problem?





sumo-user mailing list
To unsubscribe from this list, visit

Back to the top