|
LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
|
An abstract closed-loop controller. More...
#include <closedLoopController.hpp>
Public Member Functions | |
| virtual | ~ClosedLoopController ()=default |
| virtual void | setTarget (Input itarget)=0 |
| Sets the target for the controller. | |
| virtual Input | getTarget ()=0 |
| Gets the last set target, or the default target if none was set. | |
| virtual Input | getProcessValue () const =0 |
| virtual Output | getError () const =0 |
| Returns the last error of the controller. | |
| virtual bool | isSettled ()=0 |
| Returns whether the controller has settled at the target. | |
| virtual void | reset ()=0 |
| Resets the controller's internal state so it is similar to when it was first initialized, while keeping any user-configured information. | |
| virtual void | flipDisable ()=0 |
| Changes whether the controller is off or on. | |
| virtual void | flipDisable (bool iisDisabled)=0 |
| Sets whether the controller is off or on. | |
| virtual bool | isDisabled () const =0 |
| Returns whether the controller is currently disabled. | |
Public Member Functions inherited from okapi::ControllerOutput< Input > | |
| virtual void | controllerSet (Input ivalue)=0 |
| Writes the value of the controller output. | |
An abstract closed-loop controller.
| Input | The target/input type. |
| Output | The error/output type. |
Definition at line 19 of file closedLoopController.hpp.
|
virtualdefault |
|
pure virtual |
Changes whether the controller is off or on.
Turning the controller on after it was off will cause the controller to move to its last set target, unless it was reset in that time.
Implemented in okapi::AsyncLinearMotionProfileController, okapi::AsyncMotionProfileController, okapi::AsyncPosIntegratedController, okapi::AsyncVelIntegratedController, okapi::AsyncWrapper< Input, Output >, okapi::AsyncWrapper< double, double >, okapi::IterativeMotorVelocityController, okapi::IterativePosPIDController, and okapi::IterativeVelPIDController.
|
pure virtual |
Sets whether the controller is off or on.
Turning the controller on after it was off will cause the controller to move to its last set target, unless it was reset in that time.
| iisDisabled | whether the controller is disabled |
Implemented in okapi::AsyncLinearMotionProfileController, okapi::AsyncMotionProfileController, okapi::AsyncPosIntegratedController, okapi::AsyncVelIntegratedController, okapi::IterativeMotorVelocityController, okapi::IterativePosPIDController, okapi::IterativeVelPIDController, okapi::AsyncWrapper< Input, Output >, and okapi::AsyncWrapper< double, double >.
|
pure virtual |
Returns the last error of the controller.
Does not update when disabled.
Implemented in okapi::AsyncLinearMotionProfileController, okapi::AsyncMotionProfileController, okapi::AsyncPosIntegratedController, okapi::AsyncVelIntegratedController, okapi::AsyncWrapper< Input, Output >, okapi::AsyncWrapper< double, double >, okapi::IterativeMotorVelocityController, okapi::IterativePosPIDController, and okapi::IterativeVelPIDController.
|
pure virtual |
Implemented in okapi::AsyncLinearMotionProfileController, okapi::AsyncMotionProfileController, okapi::AsyncPosIntegratedController, okapi::AsyncVelIntegratedController, okapi::AsyncWrapper< Input, Output >, okapi::AsyncWrapper< double, double >, okapi::IterativeMotorVelocityController, okapi::IterativePosPIDController, and okapi::IterativeVelPIDController.
|
pure virtual |
Gets the last set target, or the default target if none was set.
Implemented in okapi::AsyncLinearMotionProfileController, okapi::AsyncMotionProfileController, okapi::AsyncPosIntegratedController, okapi::AsyncVelIntegratedController, okapi::AsyncWrapper< Input, Output >, okapi::AsyncWrapper< double, double >, okapi::IterativeMotorVelocityController, okapi::IterativePosPIDController, and okapi::IterativeVelPIDController.
|
pure virtual |
Returns whether the controller is currently disabled.
Implemented in okapi::AsyncLinearMotionProfileController, okapi::AsyncMotionProfileController, okapi::AsyncPosIntegratedController, okapi::AsyncVelIntegratedController, okapi::AsyncWrapper< Input, Output >, okapi::AsyncWrapper< double, double >, okapi::IterativeMotorVelocityController, okapi::IterativePosPIDController, and okapi::IterativeVelPIDController.
|
pure virtual |
Returns whether the controller has settled at the target.
Determining what settling means is implementation-dependent.
If the controller is disabled, this method must return true.
Implemented in okapi::AsyncLinearMotionProfileController, okapi::AsyncMotionProfileController, okapi::AsyncPosIntegratedController, okapi::AsyncVelIntegratedController, okapi::AsyncWrapper< Input, Output >, okapi::AsyncWrapper< double, double >, okapi::IterativeMotorVelocityController, okapi::IterativePosPIDController, and okapi::IterativeVelPIDController.
|
pure virtual |
Resets the controller's internal state so it is similar to when it was first initialized, while keeping any user-configured information.
Implemented in okapi::AsyncLinearMotionProfileController, okapi::AsyncMotionProfileController, okapi::AsyncPosIntegratedController, okapi::AsyncVelIntegratedController, okapi::AsyncWrapper< Input, Output >, okapi::AsyncWrapper< double, double >, okapi::IterativeMotorVelocityController, okapi::IterativePosPIDController, and okapi::IterativeVelPIDController.
|
pure virtual |
Sets the target for the controller.
| itarget | the new target |
Implemented in okapi::AsyncWrapper< Input, Output >.