Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
Skidpad Class Reference

class that defines the skidpad path algorithm More...

#include <skidpad.hpp>

Collaboration diagram for Skidpad:
Collaboration graph

Public Member Functions

 Skidpad ()=default
 
 Skidpad (SkidpadConfig config)
 
std::vector< PathPointskidpad_path (const std::vector< Cone > &cone_array, common_lib::structures::Pose pose)
 Generate a path for skidpad course.
 

Private Member Functions

Eigen::Matrix4f align_cones_with_icp (const std::vector< Cone > &cone_array)
 Aligns detected cones with reference cones using ICP.
 
size_t find_closest_path_index (const std::vector< PathPoint > &path, const common_lib::structures::Pose &pose)
 Finds the closest point index in a path to a given pose.
 

Private Attributes

SkidpadConfig config_
 
bool skidpad_data_loaded_ = false
 
std::vector< std::pair< double, double > > reference_cones_
 
std::vector< PathPointhardcoded_path_
 
std::vector< PathPointpredefined_path_
 

Detailed Description

class that defines the skidpad path algorithm

Definition at line 23 of file skidpad.hpp.

Constructor & Destructor Documentation

◆ Skidpad() [1/2]

Skidpad::Skidpad ( )
default

◆ Skidpad() [2/2]

Skidpad::Skidpad ( SkidpadConfig  config)
inlineexplicit

Definition at line 28 of file skidpad.hpp.

Member Function Documentation

◆ align_cones_with_icp()

Eigen::Matrix4f Skidpad::align_cones_with_icp ( const std::vector< Cone > &  cone_array)
private

Aligns detected cones with reference cones using ICP.

Parameters
cone_arrayDetected cones
Returns
Eigen::Matrix4f Transformation matrix, or identity if ICP fails

Definition at line 18 of file skidpad.cpp.

Here is the caller graph for this function:

◆ find_closest_path_index()

size_t Skidpad::find_closest_path_index ( const std::vector< PathPoint > &  path,
const common_lib::structures::Pose pose 
)
private

Finds the closest point index in a path to a given pose.

Parameters
pathPath to search
poseReference pose
Returns
size_t Index of closest point

Definition at line 60 of file skidpad.cpp.

Here is the caller graph for this function:

◆ skidpad_path()

std::vector< PathPoint > Skidpad::skidpad_path ( const std::vector< Cone > &  cone_array,
common_lib::structures::Pose  pose 
)

Generate a path for skidpad course.

Parameters
cone_arrayThe array of cones representing the track
poseThe current pose of the vehicle
Returns
std::vector<PathPoint> The generated path

Definition at line 85 of file skidpad.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ config_

SkidpadConfig Skidpad::config_
private

Definition at line 41 of file skidpad.hpp.

◆ hardcoded_path_

std::vector<PathPoint> Skidpad::hardcoded_path_
private

Definition at line 45 of file skidpad.hpp.

◆ predefined_path_

std::vector<PathPoint> Skidpad::predefined_path_
private

Definition at line 46 of file skidpad.hpp.

◆ reference_cones_

std::vector<std::pair<double, double> > Skidpad::reference_cones_
private

Definition at line 44 of file skidpad.hpp.

◆ skidpad_data_loaded_

bool Skidpad::skidpad_data_loaded_ = false
private

Definition at line 43 of file skidpad.hpp.


The documentation for this class was generated from the following files: