This class implements a controller driver for theME305 board.
More...
|
|
| debugFlag |
| | Debugging flag for print statements in Putty.
|
| |
|
| KpPrime |
| | Velocity feedback constant.
|
| |
|
| KiPrime |
| | Position feedback constant.
|
| |
This class implements a controller driver for theME305 board.
◆ __init__()
| def closedLoop.closedLoop.__init__ |
( |
|
self, |
|
|
|
KpPrime, |
|
|
|
KiPrime, |
|
|
|
debugFlag = False |
|
) |
| |
Constructor for controller driver class.
- Parameters
-
| KpPrime | Velocity feedback constant |
| KiPrime | Position feedback constant |
| debugFlag | Debugging flag related to print statements in Putty |
◆ get_Kp()
| def closedLoop.closedLoop.get_Kp |
( |
|
self | ) |
|
Method for calling current Kp value.
- Returns
- Current gain value
◆ set_Kp()
| def closedLoop.closedLoop.set_Kp |
( |
|
self, |
|
|
|
newKpPrime |
|
) |
| |
Method for setting Kp.
- Parameters
-
◆ update()
| def closedLoop.closedLoop.update |
( |
|
self, |
|
|
|
omegaRef, |
|
|
|
omega, |
|
|
|
thetaRef, |
|
|
|
theta |
|
) |
| |
Update method for controller.
This method is run on every period of the controller task, and takes in desired and current speed and position to get a new PWM level for the motors.
- Parameters
-
| omegaRef | Reference speed, interpolated at current time from reference data set |
| omega | Current speed, called from encoder driver object |
| thetaRef | Reference position, interpolated at current time from reference data set |
| theta | Current position, called from encoder driver object |
- Returns
- Desired PWM level for motor
The documentation for this class was generated from the following file: