Function check_imminent_crash

Function Documentation

bool check_imminent_crash(std::vector<float> ranges, float lidar_fov, float angle_increment, float desired_fov, float crash_distance)

Check if the car is too close to the wall/obstacle at the sides of the car. If so, the lidar data processing will be skipped.

Parameters:
  • ranges – the lidar ranges vector

  • lidar_fov – field of view of the lidar [rad]

  • angle_increment – angle increment of the lidar [rad]

  • desired_fov – desired field of view for processing [rad]

  • crash_distance – distance threshold to consider a crash [m]

Returns:

true if the car is not too close to the wall/obstacle at the sides of the car; false otherwise