1 #ifndef CONTROLS_CONTROLLER_BUOYANCY_CONTROLLER_H
2 #define CONTROLS_CONTROLLER_BUOYANCY_CONTROLLER_H
26 static constexpr
double MAX_DT = 0.1;
27 static constexpr
double EXPLODE_THRESHOLD = 1e4;
31 double buoyancy_bias_ = 0.0;
34 double saved_buoyancy_bias_ = 0.0;
42 void reset()
override;
Eigen::Matrix< double, 6, 1 > Vector6d
Definition: Types.h:29
Abstract base class for a single-responsibility force controller.
Definition: BaseControllerInterface.h:15
BaseControllerInterface()=default
Controller that compensates for buoyancy and gravity restoring forces.
Definition: BuoyancyController.h:25
Vector6d getForce(const State &goal, const State &curr, double dt) override
Computes the total buoyancy compensation force.
Definition: BuoyancyController.cpp:14
double getBias() const
Returns the current adaptive bias value in Newtons.
Definition: BuoyancyController.cpp:71
void reset() override
Resets the adaptive buoyancy bias to zero.
Definition: BuoyancyController.cpp:9
void loadBias()
Restores the adaptive bias from the most recent saved snapshot.
Definition: BuoyancyController.cpp:67
void saveBias()
Saves the current adaptive bias for later restoration.
Definition: BuoyancyController.cpp:63
Full kinematic state of the vehicle.
Definition: Types.h:63