18 #ifndef __MOVE_COMMAND_H__ 19 #define __MOVE_COMMAND_H__ 37 virtual double getPos(
double TimeElapsed) = 0;
42 virtual double getVel(
double TimeElapsed) = 0;
69 std::cerr <<
"========Total Time: " <<
getTotalTime() <<
"\n";
107 RampCommand(
double x0,
double v0,
double xtarget,
double amax,
double vmax);
121 virtual double getPos(
double TimeElapsed);
130 virtual double getVel(
double TimeElapsed);
157 return (m_umkehr) ? (m_T1 + m_nachumkehr->T1()) : m_T1;
161 return (m_umkehr) ? m_nachumkehr->T2() : m_T2;
165 return (m_umkehr) ? m_nachumkehr->T3() : m_T3;
171 static void calculateAV(
double x0,
double v0,
double xtarget,
double time,
double T3,
double amax,
double vmax,
172 double& a,
double& v);
virtual double getPos(double TimeElapsed)=0
returns the planned position for TimeElapsed (seconds)
RampCommand * m_nachumkehr
virtual bool isActive()
returns true if the the end of the movement is not reached yet
static std::ofstream debug
virtual double timeRemaining()
returns remaining time
virtual double getTotalTime()=0
returns the planned total time for the movement (in seconds)
virtual double getVel(double TimeElapsed)=0
returns the planned velocity for TimeElapsed (seconds)
virtual double pos()
returns the planned position at time of function call (desired position)
virtual double vel()
returns the planned velocity at time of function call (desired velocitys)
virtual void start()
sets the starttime for the movement to the current time
virtual double T1()
Return the times of the different phases of the ramp move.