18 #ifndef _SIMULATED_MOTOR_H_ 19 #define _SIMULATED_MOTOR_H_ 27 simulatedMotor(
double lowLimit,
double upLimit,
double maxAcc,
double maxVel);
39 return std::string(
"No Errors.");
50 virtual void moveRamp(
double targetAngle,
double vmax,
double amax);
53 virtual void moveVel(
double vel);
56 virtual void movePos(
double pos);
88 virtual void setLimits(
double lowerLimit,
double upperLimit)
virtual std::string getErrorMessage()
if error occured during init, get the error message with this
virtual void setTimeConstant(double T)
sets / gets the time that the motor needs to reach target velocity (moveVel)
virtual double getPos(double TimeElapsed)
returns the planned position for TimeElapsed (seconds)
virtual bool statusAcc()
Returs true if the Joint is in phase one of rampmove.
virtual void stop()
Stops the motor immediately.
virtual RampCommand getRampMove(double targetAngle)
Same but using the maximum velocity and acceleration of this motor.
virtual void setMaxVelocity(double radpersec)
Sets the maximum angular velocity (rad/s) for the Joints, use with care! A Value of 0...
virtual RampCommand getRampMove(double targetAngle, double v, double a)
Get a representation of the rampMove that the motor WOULD execute if told so at the time of function ...
virtual bool isActive()
returns true if the the end of the movement is not reached yet
virtual double getVelocity()
Returns the current Angular velocities (Rad/s)
virtual double getTimeConstant() const
virtual bool statusMoving()
Returns true if the Joint is still moving also returns true if Joints are accelerating or deceleratin...
virtual bool init()
initializes the module, if an error occurs function returns false
virtual void moveVel(double vel)
Moves the motor with the given velocity.
virtual double getAngle()
Returns the current Joint Angles.
virtual double getUpperLimit()
simulatedMotor(double lowLimit, double upLimit, double maxAcc, double maxVel)
virtual void movePos(double pos)
Moves the motor with the given velocity.
virtual void moveRamp(double targetAngle, double vmax, double amax)
any messages useful for debug are sent to this stream:
virtual double getMaxAcceleration()
virtual double getVel(double TimeElapsed)
returns the planned velocity for TimeElapsed (seconds)
virtual double getLowerLimit()
virtual bool statusDec()
Returns true if the Joint is decelerating at end of movement.
virtual void setMaxAcceleration(double radPerSecSquared)
Sets the maximum angular acceleration (rad/s^2) for the Joints, use with care! A Value of 0...
virtual void setLimits(double lowerLimit, double upperLimit)
sets the Joint Limits, the motor has to stay in these limits!
virtual double getMaxVelocity()