ROBOOP, A Robotics Object Oriented Package in C++
Spl_cubic Class Reference

Natural cubic splines class. More...

#include <trajectory.h>

Inheritance diagram for Spl_cubic:

Public Member Functions

 Spl_cubic (const Matrix &pts)
 Constructor. More...
short interpolating (const Real t, ColumnVector &s)
 Interpolating the spline at time t. Extrapolating is not allowed.
short first_derivative (const Real t, ColumnVector &ds)
 Spline first derivative at time t.
short second_derivative (const Real t, ColumnVector &dds)
 Spline second derivative at time t.

Private Attributes

int nb_path
 Number of path, i.e: path in x,y,z nb_path=3.
Matrix Ak
Matrix Bk
Matrix Ck
Matrix Dk
RowVector tk
 Time at control points.
bool bad_data
 Status flag.

Detailed Description

Natural cubic splines class.

Definition at line 87 of file trajectory.h.

Constructor & Destructor Documentation

Spl_cubic::Spl_cubic ( const Matrix &  pts)


pts,:Matrix containing the spline data.

The first line of the Matrix contain the sampling time Second line contain data (sk) to create spline i. Third " " i+1. on Nth line i+N.

The spline has the following form:

\[ s = A_k(t-t_k)^3 + B_k(t-t_k)^2 + C_k(t-t_k) + D_k \]

Definition at line 55 of file trajectory.cpp.