Function calc_change_of_direction_cost

Function Documentation

arma::fvec calc_change_of_direction_cost(const arma::mat &points_xy, const arma::imat &configurations, const arma::fvec &vehicle_direction)

Calculates the cost based on the number of changes in direction along a configuration.

Parameters:
  • points_xy – Matrix of cone 2D coordinates.

  • configurations – Matrix of cone index configurations.

  • vehicle_direction – Initial direction of the car vector.

Returns:

Vector of change of direction costs for each configuration.