3#include <yaml-cpp/yaml.h>
9#include <rclcpp/rclcpp.hpp>
19#include "custom_interfaces/msg/cone_array.hpp"
20#include "custom_interfaces/msg/path_point.hpp"
21#include "custom_interfaces/msg/path_point_array.hpp"
22#include "custom_interfaces/msg/point2d.hpp"
23#include "custom_interfaces/msg/point_array.hpp"
24#include "custom_interfaces/msg/pose.hpp"
29#include "rcl_interfaces/srv/get_parameters.hpp"
30#include "std_msgs/msg/float64.hpp"
31#include "std_srvs/srv/trigger.hpp"
122 rclcpp::Subscription<custom_interfaces::msg::ConeArray>::SharedPtr
track_map_sub_;
127 rclcpp::Publisher<custom_interfaces::msg::PathPointArray>::SharedPtr
path_pub_;
141 rclcpp::Publisher<visualization_msgs::msg::MarkerArray>::SharedPtr
full_path_pub_;
148 rclcpp::Client<rcl_interfaces::srv::GetParameters>::SharedPtr
param_client_;
Adapter class to interface with the EUFS simulator.
Adapter for the PacSim simulator.
Generates optimal local paths.
class that defines the path smoothing algorithm
Responsible for path planning and trajectory generation for the autonomous vehicle.
rclcpp::Publisher< visualization_msgs::msg::Marker >::SharedPtr smoothed_path_pub_
Publisher for velocity hover markers.
PathSmoothing path_smoothing_
void track_map_callback(const custom_interfaces::msg::ConeArray &message)
Callback for track map updates.
void fetch_discipline()
Fetches the current mission/discipline from the pacsim simulation service.
void run_full_map()
Generates and optimizes a closed-loop global track path.
void vehicle_localization_callback(const custom_interfaces::msg::Pose &message)
Callback for vehicle localization pose updates.
rclcpp::Publisher< visualization_msgs::msg::MarkerArray >::SharedPtr velocity_hover_pub_
std::vector< Cone > cone_array_
std::string map_frame_id_
rclcpp::Publisher< visualization_msgs::msg::MarkerArray >::SharedPtr path_to_car_pub_
Publisher for the entire planned path (from start to finish)
rclcpp::Publisher< visualization_msgs::msg::MarkerArray >::SharedPtr yellow_cones_pub_
< Publisher for the yellow cones
void run_acceleration()
Executes planning for the acceleration mission.
PathCalculation path_calculation_
void set_mission(Mission mission)
Sets the mission type for planning execution.
static PlanningParameters load_config(std::string &adapter)
Loads planning configuration from YAML files.
rclcpp::Subscription< custom_interfaces::msg::Pose >::SharedPtr vehicle_localization_sub_
void run_autocross()
Executes planning for the autocross mission.
rclcpp::Publisher< visualization_msgs::msg::MarkerArray >::SharedPtr full_path_pub_
Publisher for the smoothed path.
std::vector< PathPoint > smoothed_path_
double initial_car_orientation_
rclcpp::Publisher< visualization_msgs::msg::Marker >::SharedPtr triangulations_pub_
Publisher for the past portion of the path (from the start to a lookback distance behind the car’s cu...
void compute_path_orientation(std::vector< PathPoint > &path)
Computes and assigns the orientation for each point in the path.
rclcpp::Publisher< visualization_msgs::msg::MarkerArray >::SharedPtr blue_cones_pub_
Publisher for Delaunay triangulations.
rclcpp::Subscription< custom_interfaces::msg::ConeArray >::SharedPtr track_map_sub_
void run_trackdrive()
Executes planning for the trackdrive mission.
std::vector< PathPoint > full_path_
rclcpp::Publisher< std_msgs::msg::Float64 >::SharedPtr planning_execution_time_pub_
PlanningConfig planning_config_
rclcpp::Client< rcl_interfaces::srv::GetParameters >::SharedPtr param_client_
std::chrono::steady_clock::time_point brake_time_
rclcpp::Subscription< std_msgs::msg::Float64 >::SharedPtr lap_counter_sub_
void publish_path_points() const
Publishes the final planned path to the control module.
void publish_execution_time(rclcpp::Time start_time)
Publishes the planning algorithm execution time.
rclcpp::Publisher< custom_interfaces::msg::PathPointArray >::SharedPtr path_pub_
< Publisher of the smoothed path to control
void publish_visualization_msgs() const
Publishes all visualization markers.
void run_planning_algorithms()
Runs the appropriate planning algorithm based on current mission.
virtual void finish()=0
Called when planning mission is completed.
VelocityPlanning velocity_planning_
class that defines the skidpad path algorithm
Adapter for interfacing with the real vehicle hardware.
Computes velocity profiles for a planned path based on curvature and dynamics constraints.
common_lib::competition_logic::Mission Mission
Struct for pose representation.