Public Member Functions | Private Attributes
simulatedMotor Class Reference

#include <simulatedMotor.h>

List of all members.

Public Member Functions

virtual double getAngle ()
 Returns the current Joint Angles.
virtual std::string getErrorMessage ()
 if error occured during init, get the error message with this
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.
virtual RampCommand getRampMove (double targetAngle)
 Same but using the maximum velocity and acceleration of this motor.
virtual double getTimeConstant () const
virtual double getUpperLimit ()
virtual double getVelocity ()
 Returns the current Angular velocities (Rad/s)
virtual bool init ()
 initializes the module, if an error occurs function returns false
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 void moveVel (double vel)
 Moves the motor with the given velocity.
virtual void setLimits (double lowerLimit, double upperLimit)
 sets the Joint Limits, the motor has to stay in these limits!
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...
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...
virtual void setTimeConstant (double T)
 sets / gets the time that the motor needs to reach target velocity (moveVel)
 simulatedMotor (double lowLimit, double upLimit, double maxAcc, double maxVel)
virtual bool statusAcc ()
 Returs true if the Joint is in phase one of rampmove.
virtual bool statusDec ()
 Returns true if the Joint is decelerating at end of movement.
virtual bool statusMoving ()
 Returns true if the Joint is still moving also returns true if Joints are accelerating or decelerating.
virtual void stop ()
 Stops the motor immediately.
 ~simulatedMotor ()

Private Attributes

double m_amax
RampCommand m_lastMove
double m_ll
double m_ul
double m_vmax
double T0

Detailed Description

Definition at line 24 of file simulatedMotor.h.


Constructor & Destructor Documentation

simulatedMotor::simulatedMotor ( double  lowLimit,
double  upLimit,
double  maxAcc,
double  maxVel 
)

Definition at line 21 of file simulatedMotor.cpp.

Definition at line 28 of file simulatedMotor.h.


Member Function Documentation

virtual double simulatedMotor::getAngle ( ) [inline, virtual]

Returns the current Joint Angles.

Definition at line 126 of file simulatedMotor.h.

virtual std::string simulatedMotor::getErrorMessage ( ) [inline, virtual]

if error occured during init, get the error message with this

Definition at line 37 of file simulatedMotor.h.

virtual double simulatedMotor::getLowerLimit ( ) [inline, virtual]

Definition at line 97 of file simulatedMotor.h.

virtual double simulatedMotor::getMaxAcceleration ( ) [inline, virtual]

Definition at line 82 of file simulatedMotor.h.

virtual double simulatedMotor::getMaxVelocity ( ) [inline, virtual]

Definition at line 71 of file simulatedMotor.h.

RampCommand simulatedMotor::getRampMove ( double  targetAngle,
double  v,
double  a 
) [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.

virtual RampCommand simulatedMotor::getRampMove ( double  targetAngle) [inline, virtual]

Same but using the maximum velocity and acceleration of this motor.

Definition at line 120 of file simulatedMotor.h.

virtual double simulatedMotor::getTimeConstant ( ) const [inline, virtual]

Definition at line 107 of file simulatedMotor.h.

virtual double simulatedMotor::getUpperLimit ( ) [inline, virtual]

Definition at line 93 of file simulatedMotor.h.

virtual double simulatedMotor::getVelocity ( ) [inline, virtual]

Returns the current Angular velocities (Rad/s)

Definition at line 132 of file simulatedMotor.h.

virtual bool simulatedMotor::init ( ) [inline, virtual]

initializes the module, if an error occurs function returns false

Definition at line 31 of file simulatedMotor.h.

void simulatedMotor::movePos ( double  pos) [virtual]

Moves the motor with the given velocity.

Definition at line 86 of file simulatedMotor.cpp.

void simulatedMotor::moveRamp ( double  targetAngle,
double  vmax,
double  amax 
) [virtual]

any messages useful for debug are sent to this stream:

executes a rampmove

Definition at line 38 of file simulatedMotor.cpp.

void simulatedMotor::moveVel ( double  vel) [virtual]

Moves the motor with the given velocity.

Definition at line 62 of file simulatedMotor.cpp.

virtual void simulatedMotor::setLimits ( double  lowerLimit,
double  upperLimit 
) [inline, virtual]

sets the Joint Limits, the motor has to stay in these limits!

Definition at line 88 of file simulatedMotor.h.

virtual void simulatedMotor::setMaxAcceleration ( double  radPerSecSquared) [inline, virtual]

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.

virtual void simulatedMotor::setMaxVelocity ( double  radpersec) [inline, virtual]

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.

virtual void simulatedMotor::setTimeConstant ( double  T) [inline, virtual]

sets / gets the time that the motor needs to reach target velocity (moveVel)

Definition at line 103 of file simulatedMotor.h.

virtual bool simulatedMotor::statusAcc ( ) [inline, virtual]

Returs true if the Joint is in phase one of rampmove.

Definition at line 151 of file simulatedMotor.h.

virtual bool simulatedMotor::statusDec ( ) [inline, virtual]

Returns true if the Joint is decelerating at end of movement.

Definition at line 145 of file simulatedMotor.h.

virtual bool simulatedMotor::statusMoving ( ) [inline, virtual]

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.

void simulatedMotor::stop ( ) [virtual]

Stops the motor immediately.

Definition at line 112 of file simulatedMotor.cpp.


Member Data Documentation

double simulatedMotor::m_amax [private]

Definition at line 160 of file simulatedMotor.h.

Definition at line 157 of file simulatedMotor.h.

double simulatedMotor::m_ll [private]

Definition at line 159 of file simulatedMotor.h.

double simulatedMotor::m_ul [private]

Definition at line 159 of file simulatedMotor.h.

double simulatedMotor::m_vmax [private]

Definition at line 160 of file simulatedMotor.h.

double simulatedMotor::T0 [private]

Definition at line 162 of file simulatedMotor.h.


The documentation for this class was generated from the following files:


schunk_powercube_chain
Author(s): Florian Weisshardt
autogenerated on Sat Jun 8 2019 20:25:18