Skip to main content

AVxcelerate Simulation Framework 2025 R1

simulation_framework::evaluator::PredictiveTimeToCollisionCalculator Class Reference

Last update: 16.07.2025

class PredictiveTimeToCollisionCalculator More...

#include <predictive_ttc_calculator.h>

Public Member Functions

std::chrono::milliseconds Calculate (const avx_osi3::GroundTruth &ground_truth) const
 

Detailed Description

class PredictiveTimeToCollisionCalculator

PredictiveTimeToCollisionCalculator class to calculate the time of Ego to collision with other traffic car based on osi GroundTruth Internal Variables: uint64_t predictive_ttc_precision_{100} : step in time space to estimate the collision between 2 objects uint64_t predictive_ttc_max_{20000}: maximum time span from current timestamp for collision evaluation. If the predictive_min_ttc value calculated is very large. We assume that the vehicle will never collide. In such cases, we have decided to use a considerably large value of time to collision as predictive_ttc_max_{20000} and mark it as a max value of predictive_min_ttc.

Algorithm explaination:

  1. read Ego vehicle position and speed vectors, as well as its bounding box size from GroundTruth and compute the BoundingBox
  2. loop through all existing objects within MovingObject list from GroundTruth and compute the BoundingBox.
  3. check if there is any collision between ego vehicle and traffic objects 3.1 if so return 0 indicating that there is collision 3.2 if there is no collision in current frame, estimate if there will be a collision in near future (dt) under condition that 2 vehicles keeping their current speed vector. If so, return this std::chrono::milliseconds(dt) as predictive time to collision.

The documentation for this class was generated from the following files:

Connect with Ansys