You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

44 lines
1.1 KiB

#ifndef _TRAJECTORY_H_
#define _TRAJECTORY_H_
#include "vec.h"
class Trajectory
{
public:
template <class T, unsigned SIZE>
Trajectory (
unsigned int steps_,
float totalTime_,
Vec<float,SIZE> jointMovement
);
~Trajectory();
unsigned int getSteps();
unsigned int getJoints();
/**
*
*/
template <class T, unsigned SIZE> Vec<float,SIZE> getJointPos (unsigned int step);
template <class T, unsigned SIZE> Vec<float,SIZE> getCartPos (unsigned int step);
template <class T, unsigned SIZE> Vec<float,SIZE> getVelocity (unsigned int step);
template <class T, unsigned SIZE> Vec<float,SIZE> getAcceleration(unsigned int step);
struct trajectoryNode
{
float jointPos;
float cartPos;
float velocity;
float acceleration;
};
protected:
static const unsigned int defaultSteps = 100;
unsigned int steps;
float totalTime;
unsigned int joints;
struct trajectoryNode* nodes;
};
#endif