|
FDCL Controllers
|
Controller functions for the rover. More...
#include <include/fdcl/control.hpp>

Public Member Functions | |
| control (fdcl::state_t *&state_, fdcl::command_t *&command_, fdcl::param *config_file_) | |
| void | init (void) |
| void | load_config (void) |
| void | set_error_to_zero (void) |
| void | attitude_control (void) |
| void | attitude_control_decoupled_yaw (void) |
| void | position_control (void) |
| double | get_time (void) |
| void | output_uav_properties (double &m, Matrix3 &J) |
| void | output_fM (double &f, Vector3 &M) |
Public Attributes | |
| double | t = 0.0 |
| double | t_pre = 0.0 |
| double | dt = 1e-9 |
| int | freq = 100 |
| bool | use_integral = false |
| fdcl::integral_error_vec3 | eIR |
| fdcl::integral_error | eI1 |
| fdcl::integral_error | eI2 |
| fdcl::integral_error | eIy |
| fdcl::integral_error_vec3 | eIX |
| Vector3 | eR = Vector3::Zero() |
| Vector3 | eW = Vector3::Zero() |
| Vector3 | ei = Vector3::Zero() |
| Vector3 | M = Vector3::Zero() |
| Vector3 | eX = Vector3::Zero() |
| Vector3 | eV = Vector3::Zero() |
| Vector3 | b1 = Vector3::Zero() |
| Vector3 | b2 = Vector3::Zero() |
| Vector3 | b3 = Vector3::Zero() |
| Vector3 | b3_dot = Vector3::Zero() |
| Eigen::Matrix< double, 4, 4 > | fM_to_forces_inv |
| Vector4 | f_motor |
| Vector4 | fM = Vector4::Zero() |
| double | f_total = 0.0 |
Controller functions for the rover.
This class includes all the controllers used to control the rover All controller related functions for the rover are included in this class. This inlcudes two attitude controllers, a geometric controller and a decoupled-yaw controller (ACC-2019) with a geometric position controller.
| fdcl::control::control | ( | fdcl::state_t *& | state_, |
| fdcl::command_t *& | command_, | ||
| fdcl::param * | config_file_ | ||
| ) |
| state_ | Pointer to the current states |
| command_ | Pointer to the desired states |
| config_file_ | Pointer to the external fdcl::param object, which is used to load configuration parameters |
| void fdcl::control::attitude_control | ( | void | ) |
Decouple-yaw controller proposed on "Control of Complex Maneuvers for a Quadrotor UAV using Geometric Methods on SE(3)" URL: https://arxiv.org/pdf/1003.2005.pdf
| void fdcl::control::attitude_control_decoupled_yaw | ( | void | ) |
Decouple-yaw controller proposed on "Geometric Controls of a Quadrotor with a Decoupled Yaw control" URL: https://doi.org/10.23919/ACC.2019.8815189
| double fdcl::control::get_time | ( | void | ) |
Returns the current time in seonds from the start of the class.
| void fdcl::control::init | ( | void | ) |
Initialize the variables in the controller class
| void fdcl::control::load_config | ( | void | ) |
Loads the class parameters from the config file.
| void fdcl::control::output_fM | ( | double & | f, |
| Vector3 & | M | ||
| ) |
Outputs the control force and moments.
| f | |
| M |
| void fdcl::control::output_uav_properties | ( | double & | m_out, |
| Matrix3 & | J_out | ||
| ) |
Outputs the mass and the inertia matrix of the UAV.
| m_out | |
| J_out |
| void fdcl::control::position_control | ( | void | ) |
Position controller as proposed in "Geometric Controls of a Quadrotor with a Decoupled Yaw control"
| void fdcl::control::set_error_to_zero | ( | void | ) |
Set all integral errors to zero.
| Vector3 fdcl::control::b1 = Vector3::Zero() |
Direction of the first body axis
| Vector3 fdcl::control::b2 = Vector3::Zero() |
Direction of the second body axis
| Vector3 fdcl::control::b3 = Vector3::Zero() |
Direction of the third body axis
| Vector3 fdcl::control::b3_dot = Vector3::Zero() |
Desired rate of change of b3 axis
| double fdcl::control::dt = 1e-9 |
Time step size in seconds
| Vector3 fdcl::control::ei = Vector3::Zero() |
Position integral error
| fdcl::integral_error fdcl::control::eI1 |
Attitude integral error for roll axis
| fdcl::integral_error fdcl::control::eI2 |
Attitude integral error for pitch axis
| fdcl::integral_error_vec3 fdcl::control::eIR |
Attitude integral error
| fdcl::integral_error_vec3 fdcl::control::eIX |
Position integral error
| fdcl::integral_error fdcl::control::eIy |
Attitude integral error for yaw axis
| Vector3 fdcl::control::eR = Vector3::Zero() |
Attitude error
| Vector3 fdcl::control::eV = Vector3::Zero() |
Velocity error
| Vector3 fdcl::control::eW = Vector3::Zero() |
Angular rate error
| Vector3 fdcl::control::eX = Vector3::Zero() |
Position error
| Vector4 fdcl::control::f_motor |
Calculated forces required by each moter
| double fdcl::control::f_total = 0.0 |
Total propeller thrust
| Vector4 fdcl::control::fM = Vector4::Zero() |
Force-moment vector
| Eigen::Matrix<double, 4, 4> fdcl::control::fM_to_forces_inv |
Force to force-moment conversion matrix
| int fdcl::control::freq = 100 |
Control thread frequence
| Vector3 fdcl::control::M = Vector3::Zero() |
Control moments
| double fdcl::control::t = 0.0 |
Current loop time in seconds
| double fdcl::control::t_pre = 0.0 |
Time of the previous loop in seconds
| bool fdcl::control::use_integral = false |
Flag to enable/disable integral control
1.8.11