|
Formula Student Autonomous Systems
The code for the main driverless system
|
#include <gsl/gsl_bspline.h>#include <gsl/gsl_errno.h>#include <gsl/gsl_interp.h>#include <gsl/gsl_multifit.h>#include <gsl/gsl_spline.h>#include <cmath>#include <type_traits>#include <unordered_set>#include <utility>#include <vector>#include "rclcpp/rclcpp.hpp"

Go to the source code of this file.
Functions | |
| template<typename T > | |
| std::vector< T > | fit_spline (const std::vector< T > &path, int precision, int order, float coeffs_ratio) |
| This function takes a sequence of points (T), fits a spline to them using B-spline basis functions, and returns the sequence of points that represent the fitted spline. | |
| template<typename T > | |
| TripleSpline< T > | fit_triple_spline (const std::vector< T > ¢er, const std::vector< T > &left, const std::vector< T > &right, int precision, int order) |
| This function takes three sequences of points (center, left, right), fits splines to them using GSL interpolation methods, and returns three sequences of points representing the fitted splines. | |
| std::vector< T > fit_spline | ( | const std::vector< T > & | path, |
| int | precision, | ||
| int | order, | ||
| float | coeffs_ratio | ||
| ) |
This function takes a sequence of points (T), fits a spline to them using B-spline basis functions, and returns the sequence of points that represent the fitted spline.
| T | Type of the elements in the input and output sequences. T must satisfy several requirements:
|
| path | Sequence of points to fit the spline to. |
| precision | Number of interpolated points between each pair of original points. |
| order | Order of the B-spline. |
| coeffs_ratio | Ratio to determine the number of coefficients for the spline. |
Definition at line 130 of file splines.hpp.

| TripleSpline< T > fit_triple_spline | ( | const std::vector< T > & | center, |
| const std::vector< T > & | left, | ||
| const std::vector< T > & | right, | ||
| int | precision, | ||
| int | order | ||
| ) |
This function takes three sequences of points (center, left, right), fits splines to them using GSL interpolation methods, and returns three sequences of points representing the fitted splines.
All three splines share the same parametric domain based on the center line's arc length.
| T | Type of the elements in the input and output sequences. T must satisfy several requirements:
|
| center | Sequence of points representing the center line. |
| left | Sequence of points representing the left boundary. |
| right | Sequence of points representing the right boundary. |
| precision | Number of interpolated points between each pair of original points. |
| order | Order of the interpolation: 2=linear, 3=cubic spline |
Definition at line 315 of file splines.hpp.
