#include <tgTensionController.h>
Provides control of rest length based on a tension setpoint for tgBasicActuators.
Definition at line 40 of file tgTensionController.h.
tgTensionController::tgTensionController |
( |
tgBasicActuator * |
controllable, |
|
|
double |
setPoint = 0.0 |
|
) |
| |
The only constructor with two inputs
- Parameters
-
[in] | controllable. | The tgBasicActuator to be controlled. |
[in] | setPoint. | The initial setPoint for the system |
Definition at line 38 of file tgTensionController.cpp.
tgTensionController::~tgTensionController |
( |
| ) |
|
|
virtual |
void tgTensionController::control |
( |
double |
dt | ) |
|
|
virtual |
The control step. This version calculates the necessary rest length change in order to produce the desired tension set point in the actuator
- Parameters
-
[in] | dt | - the elapsed time since the last call. Must be positive. |
Reimplemented from tgBasicController.
Definition at line 50 of file tgTensionController.cpp.
void tgTensionController::control |
( |
double |
dt, |
|
|
double |
setPoint, |
|
|
double |
sensorData = 0 |
|
) |
| |
|
virtual |
Calls setNewSetPoint on the setPoint parameter, then calls control(dt)
- Parameters
-
[in] | dt | - the elapsed time since the last call. Must be positive. |
[in] | setPoint | - the setpoint to be used at this step. |
[in] | sensorData | unused in this version. Unifies the API with PIDController |
Reimplemented from tgBasicController.
Definition at line 76 of file tgTensionController.cpp.
void tgTensionController::control |
( |
tgBasicActuator & |
sca, |
|
|
double |
dt, |
|
|
double |
setPoint |
|
) |
| |
|
static |
A static version which directly calls setControlInput(input, dt) on the tgBasicActuator. Calculates correct control input based on the setpoint and properties of the Basic Actuator, performs the same calculation as control(dt)
- Parameters
-
[in] | sca,a | reference the tgBasicActuator to be controlled |
[in] | dt,the | time elapsed since the last call. Is passed through to tgBasicActuator.moveMotors(dt) |
[in] | setPoint,the | desired tension. |
Definition at line 90 of file tgTensionController.cpp.
const tgControllable* const tgBasicController::getControllable |
( |
| ) |
const |
|
inlineinherited |
Return a const pointer to a const tgControllable. Current solution to obtaining sensor data (requires casting at a higher level)
Definition at line 82 of file tgBasicController.h.
void tgBasicController::setNewSetPoint |
( |
double |
newSetPoint | ) |
|
|
virtualinherited |
Updates m_setPoint to newSetpoint
- Parameters
-
[in] | newSetPoint,the | next desired setpoint for the controllable |
Definition at line 72 of file tgBasicController.cpp.
double tgBasicController::m_setPoint |
|
protectedinherited |
The control setpoint. Updated via control or setNewSetPoint
Definition at line 92 of file tgBasicController.h.
The documentation for this class was generated from the following files: