controls  3.0.0
ControllerConfig.h
Go to the documentation of this file.
1 #ifndef CONTROLS_CONTROLLER_CONTROLLER_CONFIG_H
2 #define CONTROLS_CONTROLLER_CONTROLLER_CONFIG_H
3 
4 #include <utils/Transforms.h>
5 
13  Array6d Kp = Array6d::Zero();
14 
16  Array6d Ki = Array6d::Zero();
17 
19  Array6d Kd = Array6d::Zero();
20 
22  Array6d Kp_surface = Array6d::Zero();
23 
25  Array6d Ki_surface = Array6d::Zero();
26 
28  Array6d Kd_surface = Array6d::Zero();
29 
31  double ff_gain = 0.0;
32 
34  double fb_gain = 1.0;
35 
37  double buoyancy_gain = 0.0;
38 
41 
43  double surface_threshold = 0.1;
44 
46  Array6d axis_gain = Array6d::Ones();
47 
48  // ── Adaptive buoyancy bias estimation (heave) ──────────────────────────
49 
51  bool buoyancy_adaptive_z = false;
52 
54  double buoyancy_adaptive_rate = 0.5;
55 
58 
61 
64 
65  // ── Adaptive buoyancy bias estimation (roll/pitch) ─────────────────────
66  // Independent of the heave switch. Static G(q) torque is never output on
67  // roll/pitch; only this adaptive bias. Roll and pitch share these values.
68 
70  bool buoyancy_adaptive_rp = false;
71 
74 
77 
80 };
81 
82 #endif // CONTROLS_CONTROLLER_CONTROLLER_CONFIG_H
Eigen::Array< double, 6, 1 > Array6d
Definition: Types.h:40
Tuning parameters for the combined feed-forward / feedback controller.
Definition: ControllerConfig.h:11
double buoyancy_gain
Scalar weight applied to the buoyancy compensation force contribution.
Definition: ControllerConfig.h:37
Array6d Ki_surface
Integral PID gains used when the vehicle is near the surface.
Definition: ControllerConfig.h:25
double buoyancy_adaptive_pos_thresh
Depth error threshold for steady-state detection on heave (m)
Definition: ControllerConfig.h:60
double ff_gain
Scalar weight applied to the feed-forward force contribution.
Definition: ControllerConfig.h:31
double buoyancy_adaptive_pos_thresh_rp
Attitude error threshold for steady-state detection on roll/pitch (deg)
Definition: ControllerConfig.h:76
double buoyancy_adaptive_rate
Adaptation rate for the heave bias estimator (N per m-s of depth error)
Definition: ControllerConfig.h:54
double buoyancy_adaptive_vel_thresh_rp
Body angular-rate threshold for steady-state detection on roll/pitch (deg/s); <= 0 disables the gate.
Definition: ControllerConfig.h:79
Array6d axis_gain
Per-axis output scaling applied after all controller contributions are summed.
Definition: ControllerConfig.h:46
double surface_threshold
Depth threshold in metres below which surface gains are applied.
Definition: ControllerConfig.h:43
double buoyancy_adaptive_clamp_pct
Maximum adaptive heave bias as a fraction of net buoyancy force (e.g.
Definition: ControllerConfig.h:57
bool surface_gain_scheduling
Enables switching between surface and underwater PID gains based on depth.
Definition: ControllerConfig.h:40
Array6d Kp
Proportional PID gains for underwater operation.
Definition: ControllerConfig.h:13
Array6d Kp_surface
Proportional PID gains used when the vehicle is near the surface.
Definition: ControllerConfig.h:22
Array6d Kd_surface
Derivative PID gains used when the vehicle is near the surface.
Definition: ControllerConfig.h:28
double buoyancy_adaptive_vel_thresh
Heave velocity threshold for steady-state detection (m/s); <= 0 disables the gate.
Definition: ControllerConfig.h:63
bool buoyancy_adaptive_rp
Enables the adaptive roll/pitch bias.
Definition: ControllerConfig.h:70
bool buoyancy_adaptive_z
Enables the adaptive heave bias (learns and applies the residual buoyancy force)
Definition: ControllerConfig.h:51
Array6d Ki
Integral PID gains for underwater operation.
Definition: ControllerConfig.h:16
double buoyancy_adaptive_rate_rp
Roll/pitch bias adaptation speed (higher learns faster)
Definition: ControllerConfig.h:73
double fb_gain
Scalar weight applied to the feedback (PID) force contribution.
Definition: ControllerConfig.h:34
Array6d Kd
Derivative PID gains for underwater operation.
Definition: ControllerConfig.h:19