OpenSim::CorrectionController Class Reference

This is a simple feedback controller to be used in generating a forward dynamic simulation. More...

#include <CorrectionController.h>

Inheritance diagram for OpenSim::CorrectionController:
OpenSim::TrackingController OpenSim::Controller OpenSim::ModelComponent OpenSim::Object

List of all members.

Public Member Functions

 CorrectionController ()
 Default constructor.
 CorrectionController (const std::string &aFileName, bool aUpdateFromXMLNode=true)
 CorrectionController (const CorrectionController &aController)
 Copy constructor.
virtual ~CorrectionController ()
 Destructor.
virtual Objectcopy () const
 Copy this CorrectionController and return a pointer to the copy.
CorrectionControlleroperator= (const CorrectionController &aController)
 Assignment operator.
double getKp () const
 Get the gain for position errors.
void setKp (double aKp)
 Set the gain for position errors.
double getKv () const
 Get the gain for velocity errors.
void setKv (double aKv)
 Set the gain for velocity errors.
virtual void setActuators (Set< Actuator > &actuators)
virtual double computeControl (const SimTK::State &s, int index) const
 Compute the controls for a simulation.
virtual void setup (Model &model)
virtual void setupSystem (SimTK::MultibodySystem &system)
virtual void initState (SimTK::State &s)

Protected Member Functions

void setupProperties ()
 Connect properties to local pointers.
void copyData (const CorrectionController &aController)
 Copy the member variables of the specified controller.

Protected Attributes

PropertyDbl _kpProp
 Gain for position errors.
double & _kp
PropertyDbl _kvProp
 Gain for velocity errors.
double & _kv
Storage_yDesStore
 States for the simulation.

Detailed Description

This is a simple feedback controller to be used in generating a forward dynamic simulation.

Author:
Chand T. John, Samuel R. Hamner, Ajay Seth
Version:
1.0

Constructor & Destructor Documentation

CorrectionController::CorrectionController (  ) 

Default constructor.

OpenSim::CorrectionController::CorrectionController ( const std::string &  aFileName,
bool  aUpdateFromXMLNode = true 
)
CorrectionController::CorrectionController ( const CorrectionController aController  ) 

Copy constructor.

Parameters:
aController Controller to copy.
CorrectionController::~CorrectionController (  )  [virtual]

Destructor.


Member Function Documentation

double CorrectionController::computeControl ( const SimTK::State &  s,
int  index 
) const [virtual]

Compute the controls for a simulation.

The caller should send in an initial guess.

Implements OpenSim::TrackingController.

Object * CorrectionController::copy (  )  const [virtual]

Copy this CorrectionController and return a pointer to the copy.

The copy constructor for this class is used. This method is called when a description of this controller is read in from an XML file.

Returns:
Pointer to a copy of this CorrectionController.

Reimplemented from OpenSim::Object.

void CorrectionController::copyData ( const CorrectionController aController  )  [protected]

Copy the member variables of the specified controller.

Reimplemented from OpenSim::TrackingController.

double CorrectionController::getKp (  )  const

Get the gain for position errors.

Returns:
Current position error gain value.
double CorrectionController::getKv (  )  const

Get the gain for velocity errors.

Returns:
Current velocity error gain value.
void CorrectionController::initState ( SimTK::State &  s  )  [virtual]

Reimplemented from OpenSim::Controller.

CorrectionController & CorrectionController::operator= ( const CorrectionController aController  ) 

Assignment operator.

This method is called automatically whenever a command of the form "controller1 = controller2;" is made, where both controller1 and controller2 are both of type Controller. Although Controller cannot be instantiated directly, a subclass of Controller could implement its own operator= method that calls Controller's operator= method. If the subclass does not implement its own operator= method, then when a command of the form "controller1 = controller2" is made, where both controller1 and controller2 are instants of the subclass, the Controller class's operator= method will be called automatically.

Parameters:
aController The controller to be copied.
Returns:
Reference to the altered object.
Reference to this object.

Reimplemented from OpenSim::TrackingController.

void CorrectionController::setActuators ( Set< Actuator > &  actuators  )  [virtual]

Reimplemented from OpenSim::Controller.

void CorrectionController::setKp ( double  aKp  ) 

Set the gain for position errors.

Parameters:
aKp Position error gain for controller will be set to aKp.
void CorrectionController::setKv ( double  aKv  ) 

Set the gain for velocity errors.

Parameters:
aKv Velocity error gain for controller will be set to aKv.
void CorrectionController::setup ( Model model  )  [virtual]

Reimplemented from OpenSim::Controller.

void CorrectionController::setupProperties ( void   )  [protected, virtual]

Connect properties to local pointers.

Reimplemented from OpenSim::TrackingController.

void CorrectionController::setupSystem ( SimTK::MultibodySystem &  system  )  [virtual]

Reimplemented from OpenSim::Controller.


Member Data Documentation

Gain for position errors.

This property can be specified in a setup file.

Gain for velocity errors.

This property can be specified in a setup file.

States for the simulation.


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

Generated on Wed Dec 16 15:03:50 2009 for OpenSim by  doxygen 1.6.1