1#ifndef SRC_PLANNING_INCLUDE_PLANNING_COLORPOINT_HPP_
2#define SRC_PLANNING_INCLUDE_PLANNING_COLORPOINT_HPP_
4#include <CGAL/Delaunay_triangulation_2.h>
5#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
8#include <rclcpp/rclcpp.hpp>
14using K = CGAL::Exact_predicates_inexact_constructions_kernel;
51 static void extract_cones(std::vector<Colorpoint>& colorpoints,
52 std::vector<PathPoint>& yellow_cones,
53 std::vector<PathPoint>& blue_cones);
69 std::vector<PathPoint>& yellow_cones, std::vector<PathPoint>& blue_cones);
79 std::vector<PathPoint>& yellow_cones,
80 std::vector<PathPoint>& blue_cones);
92 Cone& other_cone, std::vector<PathPoint>& yellow_cones,
93 std::vector<PathPoint>& blue_cones);
103 std::vector<PathPoint>& yellow_cones,
104 std::vector<PathPoint>& blue_cones);
Path point with two boundary cones, provides cone classification into left/right boundaries.
Point point
The path point (midpoint between cones).
static void color_pair_of_cones(Cone &yellow_cone, Cone &blue_cone, std::vector< PathPoint > &yellow_cones, std::vector< PathPoint > &blue_cones)
Assigns colors to a cone pair and appends them to the output vectors.
static void add_cones_by_reference(const Cone &reference_cone, Cone &matching_cone, Cone &other_cone, std::vector< PathPoint > &yellow_cones, std::vector< PathPoint > &blue_cones)
Classifies a cone pair using a reference cone whose color is already known.
Colorpoint(const Point &pt, Cone c1, Cone c2)
Constructs a Colorpoint with a Point and two boundary cones.
static void extract_cones(std::vector< Colorpoint > &colorpoints, std::vector< PathPoint > &yellow_cones, std::vector< PathPoint > &blue_cones)
Extracts and classifies all cones from a sequence of colorpoints.
Cone cone2
Second cone associated with this path point.
static void color_last_point(std::vector< Colorpoint > &colorpoints, std::vector< PathPoint > &yellow_cones, std::vector< PathPoint > &blue_cones)
Classifies the cones of the last colorpoint using a shared cone from the previous one.
Cone cone1
First cone associated with this path point.
Colorpoint()=default
Default constructor.
static void color_cones(Colorpoint &colorpoint, const Colorpoint &next_colorpoint, std::vector< PathPoint > &yellow_cones, std::vector< PathPoint > &blue_cones)
Classifies the cones of a single colorpoint using the direction to the next point.
CGAL::Exact_predicates_inexact_constructions_kernel K