Alex exoskeleton
ALEX SoftwareDocumentation
DummyTrajectoryGenerator.h
Go to the documentation of this file.
1 
12 #ifndef DUMMYTRAJECTORYGENERATOR_H_INCLUDED
13 #define DUMMYTRAJECTORYGENERATOR_H_INCLUDED
14 
15 #include <cmath>
16 
17 #include "TrajectoryGenerator.h"
18 
19 #define deg2rad(deg) ((deg)*M_PI / 180.0)
20 #define rad2deg(rad) ((rad)*180.0 / M_PI)
21 
26 enum Trajectory {
27  SIT = 0,
28  STAND = 1,
29 };
30 
36  private:
37  std::vector<double[2]> endPoints;
39  double trajTime = 2;
40  int numJoints = 6;
41  double lastProgress = 0;
42 
43  public:
44  DummyTrajectoryGenerator(int NumOfJoints);
51  bool initialiseTrajectory();
52 
57  bool initialiseTrajectory(Trajectory traj, double time);
58 
65  std::vector<double> getSetPoint(double time);
66 
73  bool isTrajectoryFinished();
74 };
75 #endif
Example Implementation of TrajectoryGenerator. Includes only two trajectories (Sit-to-Stand and Stand...
std::vector< double[2]> endPoints
bool initialiseTrajectory()
Implementation of the initialiseTrajectory method in TrajectoryGenerator.
Base class of Trajectory Generator. Will always be extended with specific implementations, and is relatively scarce, given the differences expected in the different trajectories.
bool isTrajectoryFinished()
Check if the trajectory has been completed based on last elapsed time.
Abstract class which is used to generate trajectorys for a Robot to follow.
std::vector< double > getSetPoint(double time)
Implementation of the getSetPoint method in TrajectoryGenerator.
Trajectory
Enum containing possible trajectory types for DummyTrajectoryGenerator.