#include <simulatedMotor.h>
Public Member Functions | |
virtual double | getAngle () |
Returns the current Joint Angles. More... | |
virtual std::string | getErrorMessage () |
if error occured during init, get the error message with this More... | |
virtual double | getLowerLimit () |
virtual double | getMaxAcceleration () |
virtual double | getMaxVelocity () |
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 call. More... | |
virtual RampCommand | getRampMove (double targetAngle) |
Same but using the maximum velocity and acceleration of this motor. More... | |
virtual double | getTimeConstant () const |
virtual double | getUpperLimit () |
virtual double | getVelocity () |
Returns the current Angular velocities (Rad/s) More... | |
virtual bool | init () |
initializes the module, if an error occurs function returns false More... | |
virtual void | movePos (double pos) |
Moves the motor with the given velocity. More... | |
virtual void | moveRamp (double targetAngle, double vmax, double amax) |
any messages useful for debug are sent to this stream: More... | |
virtual void | moveVel (double vel) |
Moves the motor with the given velocity. More... | |
virtual void | setLimits (double lowerLimit, double upperLimit) |
sets the Joint Limits, the motor has to stay in these limits! More... | |
virtual void | setMaxAcceleration (double radPerSecSquared) |
Sets the maximum angular acceleration (rad/s^2) for the Joints, use with care! A Value of 0.5 is already pretty fast, you probably don't want anything more than 1.0... More... | |
virtual void | setMaxVelocity (double radpersec) |
Sets the maximum angular velocity (rad/s) for the Joints, use with care! A Value of 0.5 is already pretty fast, you probably don't want anything more than 1.0... More... | |
virtual void | setTimeConstant (double T) |
sets / gets the time that the motor needs to reach target velocity (moveVel) More... | |
simulatedMotor (double lowLimit, double upLimit, double maxAcc, double maxVel) | |
virtual bool | statusAcc () |
Returs true if the Joint is in phase one of rampmove. More... | |
virtual bool | statusDec () |
Returns true if the Joint is decelerating at end of movement. More... | |
virtual bool | statusMoving () |
Returns true if the Joint is still moving also returns true if Joints are accelerating or decelerating. More... | |
virtual void | stop () |
Stops the motor immediately. More... | |
~simulatedMotor () | |
Private Attributes | |
double | m_amax |
RampCommand | m_lastMove |
double | m_ll |
double | m_ul |
double | m_vmax |
double | T0 |
Definition at line 24 of file simulatedMotor.h.
simulatedMotor::simulatedMotor | ( | double | lowLimit, |
double | upLimit, | ||
double | maxAcc, | ||
double | maxVel | ||
) |
Definition at line 21 of file simulatedMotor.cpp.
|
inline |
Definition at line 28 of file simulatedMotor.h.
|
inlinevirtual |
Returns the current Joint Angles.
Definition at line 126 of file simulatedMotor.h.
|
inlinevirtual |
if error occured during init, get the error message with this
Definition at line 37 of file simulatedMotor.h.
|
inlinevirtual |
Definition at line 97 of file simulatedMotor.h.
|
inlinevirtual |
Definition at line 82 of file simulatedMotor.h.
|
inlinevirtual |
Definition at line 71 of file simulatedMotor.h.
|
virtual |
Get a representation of the rampMove that the motor WOULD execute if told so at the time of function call.
Calculate time that a rampMove WOULD take (no movement is executed)
Definition at line 123 of file simulatedMotor.cpp.
|
inlinevirtual |
Same but using the maximum velocity and acceleration of this motor.
Definition at line 120 of file simulatedMotor.h.
|
inlinevirtual |
Definition at line 107 of file simulatedMotor.h.
|
inlinevirtual |
Definition at line 93 of file simulatedMotor.h.
|
inlinevirtual |
Returns the current Angular velocities (Rad/s)
Definition at line 132 of file simulatedMotor.h.
|
inlinevirtual |
initializes the module, if an error occurs function returns false
Definition at line 31 of file simulatedMotor.h.
|
virtual |
Moves the motor with the given velocity.
Definition at line 86 of file simulatedMotor.cpp.
|
virtual |
any messages useful for debug are sent to this stream:
executes a rampmove
Definition at line 38 of file simulatedMotor.cpp.
|
virtual |
Moves the motor with the given velocity.
Definition at line 62 of file simulatedMotor.cpp.
|
inlinevirtual |
sets the Joint Limits, the motor has to stay in these limits!
Definition at line 88 of file simulatedMotor.h.
|
inlinevirtual |
Sets the maximum angular acceleration (rad/s^2) for the Joints, use with care! A Value of 0.5 is already pretty fast, you probably don't want anything more than 1.0...
Definition at line 78 of file simulatedMotor.h.
|
inlinevirtual |
Sets the maximum angular velocity (rad/s) for the Joints, use with care! A Value of 0.5 is already pretty fast, you probably don't want anything more than 1.0...
Definition at line 67 of file simulatedMotor.h.
|
inlinevirtual |
sets / gets the time that the motor needs to reach target velocity (moveVel)
Definition at line 103 of file simulatedMotor.h.
|
inlinevirtual |
Returs true if the Joint is in phase one of rampmove.
Definition at line 151 of file simulatedMotor.h.
|
inlinevirtual |
Returns true if the Joint is decelerating at end of movement.
Definition at line 145 of file simulatedMotor.h.
|
inlinevirtual |
Returns true if the Joint is still moving also returns true if Joints are accelerating or decelerating.
Definition at line 139 of file simulatedMotor.h.
|
virtual |
Stops the motor immediately.
Definition at line 112 of file simulatedMotor.cpp.
|
private |
Definition at line 160 of file simulatedMotor.h.
|
private |
Definition at line 157 of file simulatedMotor.h.
|
private |
Definition at line 159 of file simulatedMotor.h.
|
private |
Definition at line 159 of file simulatedMotor.h.
|
private |
Definition at line 160 of file simulatedMotor.h.
|
private |
Definition at line 162 of file simulatedMotor.h.