Function neighbor_bool_mask_can_be_added_to_attempt

Function Documentation

std::vector<bool> neighbor_bool_mask_can_be_added_to_attempt(const std::array<float, 2> car_position, const std::array<float, 2> car_direction, std::vector<std::array<float, 3>> cones, ConeType cone_type, int position_in_stack, std::vector<int> current_attempt, std::vector<int> neighbors, const float max_dist_to_neighbor, const float threshold_directional_angle, const float threshold_absolute_angle, const float threshold_other_side_angle, const float threshold_filter_angle)

The function returns a boolean mask indicating which cones can be added to the current attempt.

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.

  • position_in_stack – The current position in the stack.

  • current_attempt – The vector of current attempt.

  • neighbors – The vector of neighbors.

  • max_dist_to_neighbor – Maximum distance to the neighbor cone.

  • threshold_directional_angle – Threshold for directional angle.

  • threshold_absolute_angle – Threshold for absolute angle.

  • threshold_other_side_angle – Threshold for the other side angle.

  • threshold_filter_angle – Threshold for filtering cones in between.

Returns:

std::vector<bool> Boolean mask.