BSpline
Functions
-
void interpolate(InputDataSet Input, int Num, int P, OutputDataSet *Output)
This function takes the Input structure, performs the BSpline interpolation and outputs the result into Output structure
-
void approximate(InputDataSet Input, int Num, int Q, int P, OutputDataSet *Output)
This function takes the Input structure, performs the BSpline LS approximation and outputs the result into Output structure
-
class InputDataSet
- #include <BSpline.h>
The InputDataSet class contains the information about the points that must be interpolated. It is used as a data structure to intialize the inputs that are passed to the interpolating function.
Public Functions
-
InputDataSet()
This constructor initializes an Input structure for BSpline interpolation
-
InputDataSet(Eigen::VectorXd X1, Eigen::VectorXd X2, Eigen::VectorXd X3)
The constructor requires 3 N-dimensional vectors containing the coordinates of the waypoints
-
~InputDataSet()
Generic destructor
-
void setXDDot_0(Eigen::Vector3d XDDot_0)
Set the second derivative of the starting point (optional)
-
void setT(Eigen::VectorXd T)
Set the time tags for each waypoint (optional). Cannot be imposed together with avg velocity norm below
-
void setW(Eigen::VectorXd W)
Set the weights for each waypoint. Weights are used in the LS approximation
-
void setAvgXDot(double AvgXDot)
Set the average velocity norm (optional). Cannot be imposed together with time tag vector above
Public Members
-
double AvgXDot
desired average velocity norm
-
bool T_flag
indicates that time tags have been specified; if true, AvgXDot_flag is false
-
bool AvgXDot_flag
indicates that avg velocity norm has been specified; if true, T_flag is false
-
bool W_flag
indicates that weight vector has been specified
-
bool XDot_0_flag
indicates that first derivative at starting point has been specified
-
bool XDot_N_flag
indicates that first derivative at final point has been specified
-
bool XDDot_0_flag
indicates that second derivative at starting point has been specified
-
bool XDDot_N_flag
indicates that second derivative at final point has been specified
-
InputDataSet()
-
class OutputDataSet
- #include <BSpline.h>
The OutputDataSet class is used as a data structure to contain the interpolated function and its first- and second-order derivatives, together with the time-tag vector T.
Public Functions
-
OutputDataSet()
This constructor initializes an Output structure for BSpline interpolation
-
~OutputDataSet()
Generic destructor
-
void getData(double t, double x[3], double xDot[3], double xDDot[3])
This method returns x, xDot and xDDot at the desired input time T
-
double getStates(double t, int derivative, int index)
This method returns single coordinates of x, xDot and xDDot at the desired input time T.
It is designed to be accessible from Python
Public Members
-
int P
polynomial degree of the BSpline
-
OutputDataSet()