In file /home/blah/darwin2k/src/d2k/ctrl/pidController.h:

class pidController

a controller for doing joint-space PID control.

Inheritance:


Public Fields

[more]vector akp
position gain for acceleration commands
[more]vector akd
derivative gain for acceleration commands
[more]vector aki
integral gain for acceleration commands
[more]vector kp
position gain for joint torque/force commands
[more]vector kd
derivative gain for joint torque/force commands
[more]vector ki
integral gain for joint torque/force commands
[more]vector pos
vector of position setpoints
[more]vector vel
vector of velocity setpoints.

Public Methods

[more]virtual int setAccelerationGains(double kp, double kd, double ki)
sets the gains for acceleration commands for all DOFs
[more]virtual int setTorqueGains(double kp, double kd, double ki)
sets the gains for torque commands for all DOFs the derivative and integral gains are set to 2*sqrt(kp) and kp/100, respectively
[more]virtual int setAccelerationGains(double kp)
sets the gains for acceleration commands for all DOFs the derivative and integral gains are set to 2*sqrt(kp) and kp/100, respectively
[more]virtual int setTorqueGains(double kp)
sets the gains for acceleration commands for all DOFs
[more]virtual int setAccelerationGains(int i, double kp)
sets the gains for acceleration commands for a specific DOF.
[more]virtual int setTorqueGains(int i, double kp)
sets the gains for torque commands for a specific DOF the derivative and integral gains are set to 2*sqrt(kp) and kp/100, respectively


Inherited from controller:

Public Fields

ovector accCmd
ovector Tcmd
omechanism* mech
odynoTimer* timer
odofInfluence* inf
oint alwaysUpdate

Public Methods

ovirtual double maxDt(void)
ovirtual int computeTorqueCommand(double currentTime, int &computedAcc)
ovirtual int computeAccelerationCommand(double currentTime)
ovirtual int madeProgress(double currentTime)
ovirtual int reset(void)

Public Members

o inherited from d2kComponent
o not currently used

Protected Fields

odouble _maxDt


Inherited from d2kComponent:

Public Fields

od2kSimulator* sim
oconfiguration* cfg
oconst char* label
oint active

Public Methods

ovirtual int minCfgs(void) const
ovirtual int maxCfgs(void) const
ovirtual const char* getCfgName(int i)
ovirtual int readParams(paramParser* parser)
ovirtual int setVariables(const ptrList* taskParamRecs)
ovirtual int simInit(d2kSimulator* Sim)
ovirtual int init(ptrList* Cfgs)
ovirtual int forceCfgResolution(void)
ovirtual int cleanup(void)
ovirtual int update(int &violated)
ovirtual const cfgLabelRecord* getLabelRec(int i) const


Inherited from synObject:

Public Fields

ostatic int staticClassID
oint objectID
oint verboseLevel

Public Methods

ovirtual const char* className(void) const
ovirtual synObject* copy(void) const
ovirtual int isOfType(int typeNum, int derivedOk)
ostatic int setStaticClassID(void)
ovirtual int classID(void) const


Documentation

a controller for doing joint-space PID control. Users may also want to check out the jointController, which is much more flexible than the pidController. The pidController doesn't usefully read gains from files, so an d2kSimulator or d2kComponent (or other user-supplied code) must set the gains to get any useful behavior out of the controller. The controller has different sets of gains for computing torque and acceleration commands.

File variables

Also see controller class for other parameters.
ovector akp
position gain for acceleration commands

ovector akd
derivative gain for acceleration commands

ovector aki
integral gain for acceleration commands

ovector kp
position gain for joint torque/force commands

ovector kd
derivative gain for joint torque/force commands

ovector ki
integral gain for joint torque/force commands

ovector pos
vector of position setpoints

ovector vel
vector of velocity setpoints. Defaults to 0.

ovirtual int setAccelerationGains(double kp, double kd, double ki)
sets the gains for acceleration commands for all DOFs

ovirtual int setTorqueGains(double kp, double kd, double ki)
sets the gains for torque commands for all DOFs the derivative and integral gains are set to 2*sqrt(kp) and kp/100, respectively

ovirtual int setAccelerationGains(double kp)
sets the gains for acceleration commands for all DOFs the derivative and integral gains are set to 2*sqrt(kp) and kp/100, respectively

ovirtual int setTorqueGains(double kp)
sets the gains for acceleration commands for all DOFs

ovirtual int setAccelerationGains(int i, double kp)
sets the gains for acceleration commands for a specific DOF. the derivative and integral gains are set to 2*sqrt(kp) and kp/100, respectively

ovirtual int setTorqueGains(int i, double kp)
sets the gains for torque commands for a specific DOF the derivative and integral gains are set to 2*sqrt(kp) and kp/100, respectively


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.