1 #ifndef CONTROLS_CONTROLLER_BUOYANCY_CONTROLLER_H
2 #define CONTROLS_CONTROLLER_BUOYANCY_CONTROLLER_H
16 static constexpr
double MAX_DT = 0.1;
17 static constexpr
double EXPLODE_THRESHOLD = 1e4;
20 static constexpr
double MAX_CG_CB_OFFSET = 0.01;
24 Vector6d buoyancy_bias_ = Vector6d::Zero();
27 bool is_stationkeeping_ =
false;
46 static bool adapt_axis(
double& bias,
double error_sig,
double rate,
double adapt_rate,
double pos_thresh,
47 double vel_thresh,
double clamp,
double dt);
55 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
Buoyancy/gravity restoring compensation with optional adaptive bias.
Definition: BuoyancyController.h:15
Vector6d get_force(const State &goal, const State &curr, double dt) override
Computes the buoyancy compensation wrench.
Definition: BuoyancyController.cpp:34
void set_stationkeeping(bool stationkeeping)
Sets whether the vehicle is stationkeeping (gates adaptation on/off)
Definition: BuoyancyController.cpp:14
void reset() override
Resets the adaptive buoyancy bias to zero.
Definition: BuoyancyController.cpp:9
Full kinematic state of the vehicle.
Definition: Types.h:63