Function filter_in_between_cones

Function Documentation

void filter_in_between_cones(std::vector<std::array<float, 3>> cones, std::vector<int> current_attempt, int position_in_stack, std::vector<int> neighbors, std::vector<bool> &mask, int i, int candidate_neighbor, const float max_dist_to_neighbor, const float threshold_filter_angle)

Check if neighbor lies between last in attempt and candidate.

This function find if there is a cone that is between the last cone in the attempt and the candidate neighbor, if so we do not want to pursue this path, because it will skip one cone

Parameters:
  • cones – Vector of cones.

  • current_attempt – The vector of current attempt.

  • position_in_stack – The current position in the stack.

  • neighbors – The vector of neighbors points(cones).

  • mask – The boolean mask.

  • i – Current index in the mask.

  • candidate_neighbor – The index of the candidate neighbor.

  • max_dist_to_neighbor – Maximum distance to the neighbor cone.

  • threshold_filter_angle – Threshold for filtering cones in between.

Returns:

std::vector<bool>