Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef SPLINE_FUNCTIONS_H_
00026 #define SPLINE_FUNCTIONS_H_
00027
00028 #include <boost/numeric/ublas/lu.hpp>
00029
00030 namespace katana
00031 {
00032
00033
00034
00035 inline void generatePowers(int n, double x, double* powers);
00036
00040 void sampleCubicSpline(const std::vector<double>& coefficients, double time, double& position, double& velocity,
00041 double& acceleration);
00042
00043 void getCubicSplineCoefficients(double start_pos, double start_vel, double end_pos, double end_vel, double time,
00044 std::vector<double>& coefficients);
00045
00065 void splineCoefficients(int steps, double *timearray, double *encoderarray, double *arr_p1, double *arr_p2,
00066 double *arr_p3, double *arr_p4);
00067
00073 void sampleSplineWithTimeBounds(const std::vector<double>& coefficients, double duration, double time,
00074 double& position, double& velocity, double& acceleration);
00075
00076 }
00077
00078 #endif