Function select_starting_cones_indices
Defined in File calculate_configurations.hpp
Function Documentation
-
std::array<int, 2> select_starting_cones_indices(const std::array<float, 2> car_position, const std::array<float, 2> car_direction, std::vector<std::array<float, 3>> cones, ConeType cone_type, const float distance_threshold, const float angle_threshold)
Select the first two cones indices to the car.
This function selects the first two cones indices to the car, front one first.
- Parameters:
car_position – Position of the car (x, y).
car_direction – Direction of the car (x, y).
cones – Vector of cones represented as arrays of three floats [x, y, type].
cone_type – Type of cones to select.
distance_threshold – Threshold for distance to the car.
angle_threshold – Threshold for angle to the car.
- Returns:
Array of two integers representing the indices of the first but ordered cones.