Go to the documentation of this file.
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 void setLimits(double lowerLimit, double upperLimit)
sets the Joint Limits, the motor has to stay in these limits!
virtual bool statusAcc()
Returs true if the Joint is in phase one of rampmove.
virtual bool statusMoving()
Returns true if the Joint is still moving also returns true if Joints are accelerating or deceleratin...
virtual void setMaxVelocity(double radpersec)
Sets the maximum angular velocity (rad/s) for the Joints, use with care! A Value of 0....
virtual std::string getErrorMessage()
if error occured during init, get the error message with this
virtual void stop()
Stops the motor immediately.
virtual void setTimeConstant(double T)
sets / gets the time that the motor needs to reach target velocity (moveVel)
virtual bool init()
initializes the module, if an error occurs function returns false
virtual double getAngle()
Returns the current Joint Angles.
virtual double getMaxVelocity()
virtual void moveRamp(double targetAngle, double vmax, double amax)
any messages useful for debug are sent to this stream:
virtual double getUpperLimit()
virtual void movePos(double pos)
Moves the motor with the given velocity.
virtual void moveVel(double vel)
Moves the motor with the given velocity.
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 double getMaxAcceleration()
virtual bool isActive()
returns true if the the end of the movement is not reached yet
virtual double getVel(double TimeElapsed)
returns the planned velocity for TimeElapsed (seconds)
virtual double getVelocity()
Returns the current Angular velocities (Rad/s)
virtual double getLowerLimit()
virtual RampCommand getRampMove(double targetAngle)
Same but using the maximum velocity and acceleration of this motor.
virtual void setMaxAcceleration(double radPerSecSquared)
Sets the maximum angular acceleration (rad/s^2) for the Joints, use with care! A Value of 0....
virtual double getPos(double TimeElapsed)
returns the planned position for TimeElapsed (seconds)
virtual bool statusDec()
Returns true if the Joint is decelerating at end of movement.
simulatedMotor(double lowLimit, double upLimit, double maxAcc, double maxVel)
virtual double getTimeConstant() const