Bsplines used for Z trajectory of stair steps. More...
#include <Mathematics/Bsplines.hh>
Public Member Functions | |
BSplinesFoot (double FT=1.0, double IP=0.0, double FP=0.0, std::vector< double >ToMP=std::vector< double >(), std::vector< double > MP=std::vector< double >(), double IS=0.0, double IA=0.0, double FS=0.0, double FA=0.0) | |
Constructor: FT: Final time FP: Final position ToMP : Time of Max Position MP : Max Position. | |
~BSplinesFoot () | |
Detructor. | |
void | SetParameters (double FT, double IP, double FP, std::vector< double >ToMP, std::vector< double > MP, double IS=0.0, double IA=0.0, double FS=0.0, double FA=0.0) |
int | Compute (double t, double &x, double &dx, double &ddx) |
void | ComputeControlPointFrom2DataPoint () |
void | ComputeControlPointFrom3DataPoint () |
void | ComputeControlPointFrom4DataPoint () |
void | GetParameters (double &FT, double &IP, double &FP, std::vector< double > &ToMP, std::vector< double > &MP) |
std::vector< double > | MP () |
std::vector< double > | ToMP () |
double | FT () |
double | IP () |
double | FP () |
Bsplines used for Z trajectory of stair steps.
BSplinesFoot::BSplinesFoot | ( | double | FT = 1.0 , |
double | IP = 0.0 , |
||
double | FP = 0.0 , |
||
std::vector< double > | ToMP = std::vector<double>() , |
||
std::vector< double > | MP = std::vector<double>() , |
||
double | IS = 0.0 , |
||
double | IA = 0.0 , |
||
double | FS = 0.0 , |
||
double | FA = 0.0 |
||
) |
Constructor: FT: Final time FP: Final position ToMP : Time of Max Position MP : Max Position.
References SetParameters().
BSplinesFoot::~BSplinesFoot | ( | ) |
Detructor.
int PatternGeneratorJRL::BSplinesFoot::Compute | ( | double | t, |
double & | x, | ||
double & | dx, | ||
double & | ddx | ||
) |
Compute Position at time t
void BSplinesFoot::ComputeControlPointFrom2DataPoint | ( | void | ) |
Compute the control point position for an order 5 Bsplines. It also computes the control point of the derivative and the second derivatice of the BSplines.
References PatternGeneratorJRL::Bsplines::ComputeBasisFunctions(), FP(), IP(), PatternGeneratorJRL::Bsplines::m_basis_functions_derivative, PatternGeneratorJRL::Bsplines::m_basis_functions_sec_derivative, and PatternGeneratorJRL::Bsplines::m_control_points.
Referenced by PatternGeneratorJRL::StepOverClampedCubicSpline::SetParameters().
void BSplinesFoot::ComputeControlPointFrom3DataPoint | ( | void | ) |
References PatternGeneratorJRL::Bsplines::ComputeBasisFunctions(), FP(), IP(), PatternGeneratorJRL::Bsplines::m_basis_functions, PatternGeneratorJRL::Bsplines::m_basis_functions_derivative, PatternGeneratorJRL::Bsplines::m_basis_functions_sec_derivative, PatternGeneratorJRL::Bsplines::m_control_points, and PatternGeneratorJRL::Bsplines::m_degree.
Referenced by PatternGeneratorJRL::StepOverClampedCubicSpline::SetParameters().
void BSplinesFoot::ComputeControlPointFrom4DataPoint | ( | void | ) |
References PatternGeneratorJRL::Bsplines::ComputeBasisFunctions(), FP(), IP(), PatternGeneratorJRL::Bsplines::m_basis_functions, PatternGeneratorJRL::Bsplines::m_basis_functions_derivative, PatternGeneratorJRL::Bsplines::m_basis_functions_sec_derivative, PatternGeneratorJRL::Bsplines::m_control_points, and PatternGeneratorJRL::Bsplines::m_degree.
Referenced by PatternGeneratorJRL::StepOverClampedCubicSpline::SetParameters().
double PatternGeneratorJRL::BSplinesFoot::FP | ( | ) | [inline] |
double PatternGeneratorJRL::BSplinesFoot::FT | ( | ) | [inline] |
void BSplinesFoot::GetParameters | ( | double & | FT, |
double & | IP, | ||
double & | FP, | ||
std::vector< double > & | ToMP, | ||
std::vector< double > & | MP | ||
) |
double PatternGeneratorJRL::BSplinesFoot::IP | ( | ) | [inline] |
std::vector<double> PatternGeneratorJRL::BSplinesFoot::MP | ( | ) | [inline] |
void PatternGeneratorJRL::BSplinesFoot::SetParameters | ( | double | FT, |
double | IP, | ||
double | FP, | ||
std::vector< double > | ToMP, | ||
std::vector< double > | MP, | ||
double | IS = 0.0 , |
||
double | IA = 0.0 , |
||
double | FS = 0.0 , |
||
double | FA = 0.0 |
||
) |
Set the parameters This method assumes implicitly a initial position initial speed and initial acceleration equal to zero. The same for final speed and final acceleration. Speed at Max Position is around zero. It generates knot vector and control point vector according to the input
Referenced by BSplinesFoot().
std::vector<double> PatternGeneratorJRL::BSplinesFoot::ToMP | ( | ) | [inline] |