Main Page | Modules | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

MotorControl Class Reference
[Miscellaneous Library Utilities]

#include <MotorControl.hh>

Inherits Module.

Inherited by PositionControl.

List of all members.


Detailed Description

Abstract base class for all motor controller modules.

The MotorControl class is an abstract base class for all modules that perform feedback control of rotational motors.


Public Member Functions

 MotorControl (char *name, int index)
virtual void init (void)=0
virtual void uninit (void)=0
virtual void activate (void)=0
virtual void deactivate (void)=0
virtual void update (void)=0
void getGains (MotorGains_t *g)
void setGains (MotorGains_t *g)
void setGains (float Kp, float Kd, float Ka=0.0)
void getTarget (MotorTarget_t *t)
void setTarget (MotorTarget_t *t)

Protected Attributes

DCMotorHW * dcmotors
MotorTarget_t target
MotorGains_t gains
DCMotorHW::MotorParam_t motorparams
DCMotorHW::MotorCalib_t calib


Constructor & Destructor Documentation

MotorControl::MotorControl char *  name,
int  index
[inline]
 

This constructor creates a motor control module with the supplied name and index. All motor control module are by definition single user


Member Function Documentation

void MotorControl::getGains MotorGains_t g  )  [inline]
 

This method returns the current control gain settings.

void MotorControl::getTarget MotorTarget_t t  )  [inline]
 

This method returns the current control target for this module.

void MotorControl::setGains float  Kp,
float  Kd,
float  Ka = 0.0
[inline]
 

This method sets the current control gain settings through individual arguments.

void MotorControl::setGains MotorGains_t g  )  [inline]
 

This method sets the current control gain settings.

void MotorControl::setTarget MotorTarget_t t  )  [inline]
 

This method sets the current control target for this module.


RHexLib Reference Documentation