|
controls
3.0.0
|
Controller that compensates for buoyancy and gravity restoring forces. More...
#include <BuoyancyController.h>
Public Member Functions | |
| void | reset () override |
| Resets the adaptive buoyancy bias to zero. More... | |
| Vector6d | getForce (const State &goal, const State &curr, double dt) override |
| Computes the total buoyancy compensation force. More... | |
| void | saveBias () |
| Saves the current adaptive bias for later restoration. More... | |
| void | loadBias () |
| Restores the adaptive bias from the most recent saved snapshot. More... | |
| double | getBias () const |
| Returns the current adaptive bias value in Newtons. More... | |
| BaseControllerInterface ()=default | |
| BaseControllerInterface (std::shared_ptr< SystemDynamicsBase > auv, std::shared_ptr< ControllerConfig > config) | |
| Constructs a controller with the given dynamics model and config. More... | |
Public Member Functions inherited from BaseControllerInterface | |
| BaseControllerInterface ()=default | |
| BaseControllerInterface (std::shared_ptr< SystemDynamicsBase > auv, std::shared_ptr< ControllerConfig > config) | |
| Constructs a controller with the given dynamics model and config. More... | |
| virtual | ~BaseControllerInterface ()=default |
Additional Inherited Members | |
Protected Attributes inherited from BaseControllerInterface | |
| std::shared_ptr< SystemDynamicsBase > | auv_ |
| Vehicle dynamics model shared with all controllers in a stack. More... | |
| std::shared_ptr< ControllerConfig > | config_ |
| Tuning parameters shared with all controllers in a stack. More... | |
Controller that compensates for buoyancy and gravity restoring forces.
Produces two additive components:
buoyancy_adaptive) — a slow integrator on the heave axis that learns the residual buoyancy force not captured by the static model. The bias is only updated when the vehicle is in approximate steady state (small depth error and small heave velocity), so it does not fight the PD controller during transients. Inspired by the adaptive feedforward in Eng You Hong et al., "Depth
Control of an Autonomous Underwater Vehicle, STARFISH", NUS 2010.Returns zero near the surface when surface gain scheduling is enabled.
|
default |
|
inline |
Constructs a controller with the given dynamics model and config.
| auv | [in] Shared vehicle dynamics model |
| config | [in] Shared controller tuning parameters |
| double BuoyancyController::getBias | ( | ) | const |
Returns the current adaptive bias value in Newtons.
|
overridevirtual |
Computes the total buoyancy compensation force.
Returns G(q) from the dynamics model plus, when adaptive estimation is enabled, an adaptive heave-axis bias that slowly tracks residual depth error during steady state.
| goal | [in] Desired vehicle state (orientation and position Z are used) |
| curr | [in] Current vehicle state (position Z and twist Z are used) |
| dt | [in] Time step in seconds (used by the adaptive estimator) |
Implements BaseControllerInterface.
| void BuoyancyController::loadBias | ( | ) |
Restores the adaptive bias from the most recent saved snapshot.
|
overridevirtual |
Resets the adaptive buoyancy bias to zero.
Reimplemented from BaseControllerInterface.
| void BuoyancyController::saveBias | ( | ) |
Saves the current adaptive bias for later restoration.