Function calculate_obstacle_parameters

Function Documentation

void calculate_obstacle_parameters(const std::vector<float> &ranges, Obstacle &obstacle, float inverse_res, float car_width)

Calculate the parameters of an obstacle based on range data.

This function computes various parameters of an obstacle detected by find_obstacles function. These parameters include the angular width, central angular position, average distance, Gaussian spread parameter (sigma), adjusted distance (distance_tilda), and amplitude coefficient (coeff_a).

Parameters:
  • ranges – A vector of float values representing the range data from the sensor.

  • obstacle – A reference to an Obstacle object where the calculated parameters will be stored.

  • inverse_res – A float value representing the inverse of the sensor’s angular resolution [1/deg].

  • car_width – A float value representing the width of the car.