Public Member Functions | Private Attributes | List of all members
simulatedMotor Class Reference

#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
 

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.

simulatedMotor::~simulatedMotor ( )
inline

Definition at line 28 of file simulatedMotor.h.

Member Function Documentation

virtual double simulatedMotor::getAngle ( )
inlinevirtual

Returns the current Joint Angles.

Definition at line 126 of file simulatedMotor.h.

virtual std::string simulatedMotor::getErrorMessage ( )
inlinevirtual

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

Definition at line 37 of file simulatedMotor.h.

virtual double simulatedMotor::getLowerLimit ( )
inlinevirtual

Definition at line 97 of file simulatedMotor.h.

virtual double simulatedMotor::getMaxAcceleration ( )
inlinevirtual

Definition at line 82 of file simulatedMotor.h.

virtual double simulatedMotor::getMaxVelocity ( )
inlinevirtual

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)
inlinevirtual

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

Definition at line 120 of file simulatedMotor.h.

virtual double simulatedMotor::getTimeConstant ( ) const
inlinevirtual

Definition at line 107 of file simulatedMotor.h.

virtual double simulatedMotor::getUpperLimit ( )
inlinevirtual

Definition at line 93 of file simulatedMotor.h.

virtual double simulatedMotor::getVelocity ( )
inlinevirtual

Returns the current Angular velocities (Rad/s)

Definition at line 132 of file simulatedMotor.h.

virtual bool simulatedMotor::init ( )
inlinevirtual

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 
)
inlinevirtual

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)
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.

virtual void simulatedMotor::setMaxVelocity ( double  radpersec)
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.

virtual void simulatedMotor::setTimeConstant ( double  T)
inlinevirtual

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 ( )
inlinevirtual

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

Definition at line 151 of file simulatedMotor.h.

virtual bool simulatedMotor::statusDec ( )
inlinevirtual

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

Definition at line 145 of file simulatedMotor.h.

virtual bool simulatedMotor::statusMoving ( )
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.

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.

RampCommand simulatedMotor::m_lastMove
private

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 Mon Nov 25 2019 03:48:21