102 void setVelocityLimits(
const float vel_horizontal,
const float vel_up,
float vel_down);
109 void setThrustLimits(
const float min,
const float max);
150 void generateThrustYawSetpoint(
const float dt);
173 for (
int i = 0; i <= 2; i++) {
175 vel_sp(i) = _vel_sp(i);
206 bool _interfaceMapping();
208 void _positionController();
209 void _velocityController(
const float &dt);
210 void _setCtrlFlag(
bool value);
219 float _lim_vel_horizontal{};
221 float _lim_vel_down{};
222 float _lim_thr_min{};
223 float _lim_thr_max{};
226 float _hover_thrust{};
243 float _yawspeed_sp{};
245 bool _skip_controller{
false};
246 bool _ctrl_pos[3] = {
true,
true,
true};
247 bool _ctrl_vel[3] = {
true,
true,
true};
void resetIntegralZ()
Set the integral term in z to 0.
void resetIntegralXY()
Set the integral term in xy to 0.
matrix::Vector3f acceleration
matrix::Vector3f _thr_int
integral term of the velocity controller
matrix::Vector3f _acc_sp
desired acceleration
matrix::Vector3f _pos
current position
matrix::Vector3f position
void setTiltLimit(const float tilt)
Set the maximum tilt angle in radians the output attitude is allowed to have.
Core Position-Control for MC.
matrix::Vector3f velocity
void setHoverThrust(const float thrust)
Set the maximum tilt angle in radians the output attitude is allowed to have.
matrix::Vector3f _vel_dot
velocity derivative (replacement for acceleration estimate)
const matrix::Vector3f getVelSp() const
Get the.
matrix::Vector3f _pos_sp
desired position
matrix::Vector3f _gain_pos_p
Position control proportional gain.
constexpr _Tp min(_Tp a, _Tp b)
void setPositionGains(const matrix::Vector3f &P)
Set the position control gains.
matrix::Vector3f _vel_sp
desired velocity
constexpr _Tp max(_Tp a, _Tp b)
matrix::Vector3f _thr_sp
desired thrust
matrix::Vector3f _gain_vel_p
Velocity control proportional gain.
matrix::Vector3f _vel
current velocity
matrix::Vector3f _gain_vel_i
Velocity control integral gain.
matrix::Vector3f _gain_vel_d
Velocity control derivative gain.