Class SmoothSpline

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class bitbots_splines::SmoothSpline : public bitbots_splines::Spline

SmoothSpline

Implementation of 5th order polynomial splines trajectory known to minimize jerk

Public Functions

void addPoint(double time, double position, double velocity = 0.0, double acceleration = 0.0)

Add a new point with its time, position value, velocity and acceleration

const std::vector<Point> &points() const

Access to points container

std::vector<Point> &points()
void computeSplines()

Recompute splines interpolation model

std::string getDebugString()

Returns a string representation of the Spline to get inside while debugging.

Returns

Protected Functions

virtual void importCallBack() override

Inherit Load Points

Private Functions

Polynom polynomFit(double t, double pos_1, double vel_1, double acc_1, double pos_2, double vel_2, double acc_2) const

Fit a polynom between 0 and t with given pos, vel and acc initial and final conditions

Private Members

std::vector<Point> points_

Points container

struct Point

Simple point struture

Public Members

double time
double position
double velocity
double acceleration