#include <PIDControl.h>
Public Member Functions | |
PIDControl () | |
virtual | ~PIDControl () |
virtual OStatus | DoInit (const OSystemEvent &event) |
virtual OStatus | DoStart (const OSystemEvent &event) |
virtual OStatus | DoStop (const OSystemEvent &event) |
virtual OStatus | DoDestroy (const OSystemEvent &event) |
void | ReadyEffector (const OReadyEvent &event) |
void | NotifySensor (const ONotifyEvent &event) |
Public Attributes | |
OSubject * | subject [numOfSubject] |
OObserver * | observer [numOfObserver] |
Private Member Functions | |
void | OpenPrimitives () |
void | NewCommandVectorData () |
void | SetJointGain () |
MovingResult | AdjustDiffJointValue () |
MovingResult | MoveToBroadBase () |
MovingResult | MoveToSleeping () |
RCRegion * | FindFreeRegion () |
void | SetJointValue (RCRegion *rgn, int idx, double start, double end) |
void | SetJointValueForStepInput (RCRegion *rgn, int idx, double val) |
void | InitSensorIndex (OSensorFrameVectorData *sensorVecData) |
void | DisableJointGainOfAllLegs () |
void | InputParameter () |
MovingResult | StepInput () |
void | SaveLogData () |
bool | YesNo (const char *prompt) |
int | InputKey (const char *prompt) |
Private Attributes | |
PIDControlState | pidControlState |
PIDControlInfo | pidControlInfo |
OPrimitiveID | jointID [NUM_JOINTS] |
RCRegion * | region [NUM_COMMAND_VECTOR] |
OJointValue * | logData |
bool | initSensorIndex |
int | sensorIndex [NUM_JOINTS] |
Static Private Attributes | |
const size_t | NUM_JOINTS = 15 |
const size_t | NUM_COMMAND_VECTOR = 2 |
const word | TILT_PGAIN = 0x000a |
const word | TILT_IGAIN = 0x0008 |
const word | TILT_DGAIN = 0x000c |
const word | PAN_PGAIN = 0x000d |
const word | PAN_IGAIN = 0x0008 |
const word | PAN_DGAIN = 0x000b |
const word | ROLL_PGAIN = 0x000a |
const word | ROLL_IGAIN = 0x0008 |
const word | ROLL_DGAIN = 0x000c |
const word | J1_PGAIN = 0x0016 |
const word | J1_IGAIN = 0x0004 |
const word | J1_DGAIN = 0x0008 |
const word | J2_PGAIN = 0x0014 |
const word | J2_IGAIN = 0x0004 |
const word | J2_DGAIN = 0x0006 |
const word | J3_PGAIN = 0x0023 |
const word | J3_IGAIN = 0x0004 |
const word | J3_DGAIN = 0x0005 |
const word | PSHIFT = 0x000e |
const word | ISHIFT = 0x0002 |
const word | DSHIFT = 0x000f |
const int | BROADBASE_MAX_COUNTER = 48 |
const int | SLEEPING_MAX_COUNTER = 48 |
const int | STEP_INPUT_NUM_FRAMES = 4 |
const int | HOLD_TIME_NUM_FRAMES = 256 |
|
Definition at line 18 of file PIDControl.cc. References jointID, PCS_IDLE, region, and sensorIndex. |
|
Definition at line 142 of file PIDControl.h. |
|
Definition at line 280 of file PIDControl.cc. References FindFreeRegion(), GetJointValue(), jointID, NUM_JOINTS, SetJointValue(), and subject. Referenced by DoStart(), and ReadyEffector(). |
|
Definition at line 434 of file PIDControl.cc. References jointID, LFLEG_J1, LFLEG_J2, LFLEG_J3, LRLEG_J1, LRLEG_J2, LRLEG_J3, RFLEG_J1, RFLEG_J2, RFLEG_J3, RRLEG_J1, RRLEG_J2, and RRLEG_J3. Referenced by ReadyEffector(). |
|
Definition at line 80 of file PIDControl.cc. |
|
Definition at line 27 of file PIDControl.cc. References HOLD_TIME_NUM_FRAMES, logData, NewCommandVectorData(), and OpenPrimitives(). |
|
Definition at line 49 of file PIDControl.cc. References AdjustDiffJointValue(), pidControlState, and subject. |
|
Definition at line 67 of file PIDControl.cc. References pidControlState. |
|
Definition at line 375 of file PIDControl.cc. References region. Referenced by AdjustDiffJointValue(), MoveToBroadBase(), MoveToSleeping(), and StepInput(). |
|
Definition at line 419 of file PIDControl.cc. References jointID, and sensorIndex. Referenced by NotifySensor(). |
|
Definition at line 520 of file PIDControl.cc. Referenced by InputParameter(). |
|
Definition at line 451 of file PIDControl.cc. References PIDControlInfo::desiredValue, PIDControlInfo::dgain, DSHIFT, PIDControlInfo::effectorCounter, PIDControlInfo::igain, InputKey(), ISHIFT, jointID, PIDControlInfo::jointIndex, PIDControlInfo::pgain, pidControlInfo, PSHIFT, and PIDControlInfo::sensorCounter. Referenced by ReadyEffector(). |
|
Definition at line 302 of file PIDControl.cc. References BROADBASE_ANGLE, FindFreeRegion(), GetJointValue(), jointID, MOVING_FINISH, SetJointValue(), and subject. Referenced by ReadyEffector(). |
|
Definition at line 344 of file PIDControl.cc. References BROADBASE_ANGLE, FindFreeRegion(), MOVING_FINISH, SetJointValue(), SLEEPING_ANGLE, and subject. Referenced by ReadyEffector(). |
|
Definition at line 206 of file PIDControl.cc. References jointID, NUM_JOINTS, and region. Referenced by DoInit(). |
|
Definition at line 159 of file PIDControl.cc. References InitSensorIndex(), initSensorIndex, PIDControlInfo::jointIndex, logData, memcpy(), observer, pidControlInfo, pidControlState, PIDControlInfo::sensorCounter, sensorIndex, and STEP_INPUT_NUM_FRAMES. |
|
Definition at line 193 of file PIDControl.cc. References jointID. Referenced by DoInit(). |
|
Definition at line 87 of file PIDControl.cc. References AdjustDiffJointValue(), DisableJointGainOfAllLegs(), InputParameter(), MoveToBroadBase(), MoveToSleeping(), MovingResult, observer, pidControlState, SaveLogData(), SetJointGain(), StepInput(), and YesNo(). |
|
Definition at line 529 of file PIDControl.cc. References logData. Referenced by ReadyEffector(). |
|
Definition at line 238 of file PIDControl.cc. References DSHIFT, HEAD_PAN, HEAD_ROLL, HEAD_TILT, ISHIFT, J1_DGAIN, J1_IGAIN, J1_PGAIN, J2_DGAIN, J2_IGAIN, J2_PGAIN, J3_DGAIN, J3_IGAIN, J3_PGAIN, jointID, PAN_DGAIN, PAN_IGAIN, PAN_PGAIN, PSHIFT, ROLL_DGAIN, ROLL_IGAIN, ROLL_PGAIN, TILT_DGAIN, TILT_IGAIN, and TILT_PGAIN. Referenced by ReadyEffector(). |
|
Definition at line 385 of file PIDControl.cc. References jointID. Referenced by AdjustDiffJointValue(), MoveToBroadBase(), and MoveToSleeping(). |
|
Definition at line 403 of file PIDControl.cc. References jointID, and STEP_INPUT_NUM_FRAMES. Referenced by StepInput(). |
|
Definition at line 482 of file PIDControl.cc. References PIDControlInfo::desiredValue, PIDControlInfo::effectorCounter, FindFreeRegion(), HOLD_TIME_NUM_FRAMES, PIDControlInfo::jointIndex, pidControlInfo, PIDControlInfo::sensorCounter, SetJointValueForStepInput(), and subject. Referenced by ReadyEffector(). |
|
Definition at line 507 of file PIDControl.cc. Referenced by ReadyEffector(). |
|
Definition at line 207 of file PIDControl.h. |
|
Definition at line 205 of file PIDControl.h. Referenced by InputParameter(), and SetJointGain(). |
|
Definition at line 211 of file PIDControl.h. Referenced by DoInit(), and StepInput(). |
|
Definition at line 220 of file PIDControl.h. Referenced by NotifySensor(). |
|
Definition at line 204 of file PIDControl.h. Referenced by InputParameter(), and SetJointGain(). |
|
Definition at line 193 of file PIDControl.h. Referenced by SetJointGain(). |
|
Definition at line 192 of file PIDControl.h. Referenced by SetJointGain(). |
|
Definition at line 191 of file PIDControl.h. Referenced by SetJointGain(). |
|
Definition at line 197 of file PIDControl.h. Referenced by SetJointGain(). |
|
Definition at line 196 of file PIDControl.h. Referenced by SetJointGain(). |
|
Definition at line 195 of file PIDControl.h. Referenced by SetJointGain(). |
|
Definition at line 201 of file PIDControl.h. Referenced by SetJointGain(). |
|
Definition at line 200 of file PIDControl.h. Referenced by SetJointGain(). |
|
Definition at line 199 of file PIDControl.h. Referenced by SetJointGain(). |
|
Definition at line 216 of file PIDControl.h. Referenced by AdjustDiffJointValue(), DisableJointGainOfAllLegs(), InitSensorIndex(), InputParameter(), MoveToBroadBase(), NewCommandVectorData(), OpenPrimitives(), PIDControl(), SetJointGain(), SetJointValue(), and SetJointValueForStepInput(). |
|
Definition at line 218 of file PIDControl.h. Referenced by DoInit(), NotifySensor(), and SaveLogData(). |
|
Definition at line 177 of file PIDControl.h. |
|
Definition at line 176 of file PIDControl.h. Referenced by AdjustDiffJointValue(), and NewCommandVectorData(). |
|
Definition at line 145 of file PIDControl.h. Referenced by NotifySensor(), and ReadyEffector(). |
|
Definition at line 185 of file PIDControl.h. Referenced by SetJointGain(). |
|
Definition at line 184 of file PIDControl.h. Referenced by SetJointGain(). |
|
Definition at line 183 of file PIDControl.h. Referenced by SetJointGain(). |
|
Definition at line 214 of file PIDControl.h. Referenced by InputParameter(), NotifySensor(), and StepInput(). |
|
Definition at line 213 of file PIDControl.h. Referenced by DoStart(), DoStop(), NotifySensor(), and ReadyEffector(). |
|
Definition at line 203 of file PIDControl.h. Referenced by InputParameter(), and SetJointGain(). |
|
Definition at line 217 of file PIDControl.h. Referenced by FindFreeRegion(), NewCommandVectorData(), and PIDControl(). |
|
Definition at line 189 of file PIDControl.h. Referenced by SetJointGain(). |
|
Definition at line 188 of file PIDControl.h. Referenced by SetJointGain(). |
|
Definition at line 187 of file PIDControl.h. Referenced by SetJointGain(). |
|
Definition at line 221 of file PIDControl.h. Referenced by InitSensorIndex(), NotifySensor(), and PIDControl(). |
|
Definition at line 208 of file PIDControl.h. |
|
Definition at line 210 of file PIDControl.h. Referenced by NotifySensor(), and SetJointValueForStepInput(). |
|
Definition at line 144 of file PIDControl.h. Referenced by AdjustDiffJointValue(), DoStart(), MoveToBroadBase(), MoveToSleeping(), and StepInput(). |
|
Definition at line 181 of file PIDControl.h. Referenced by SetJointGain(). |
|
Definition at line 180 of file PIDControl.h. Referenced by SetJointGain(). |
|
Definition at line 179 of file PIDControl.h. Referenced by SetJointGain(). |