40 #include <matrix/matrix/math.hpp> 42 #include <uORB/topics/vehicle_local_position.h> 43 #include <uORB/topics/vehicle_local_position_setpoint.h> 44 #include <uORB/topics/vehicle_constraints.h> 49 matrix::Vector3f position;
50 matrix::Vector3f velocity;
51 matrix::Vector3f acceleration;
88 void overwriteParams();
101 bool updateSetpoint(
const vehicle_local_position_setpoint_s &setpoint);
107 void updateConstraints(
const vehicle_constraints_s &constraints);
117 void generateThrustYawSetpoint(
const float dt);
159 matrix::Vector3f vel_sp{};
161 for (
int i = 0; i <= 2; i++) {
163 vel_sp(i) = _vel_sp(i);
180 matrix::Vector3f pos_sp{};
182 for (
int i = 0; i <= 2; i++) {
184 pos_sp(i) = _pos_sp(i);
196 void updateParams()
override;
203 bool _interfaceMapping();
205 void _positionController();
206 void _velocityController(
const float &dt);
207 void _setCtrlFlag(
bool value);
209 matrix::Vector3f _pos{};
210 matrix::Vector3f _vel{};
211 matrix::Vector3f _vel_dot{};
212 matrix::Vector3f _acc{};
214 matrix::Vector3f _pos_sp{};
215 matrix::Vector3f _vel_sp{};
216 matrix::Vector3f _acc_sp{};
217 matrix::Vector3f _thr_sp{};
219 float _yawspeed_sp{};
220 matrix::Vector3f _thr_int{};
221 vehicle_constraints_s _constraints{};
222 bool _skip_controller{
false};
223 bool _ctrl_pos[3] = {
true,
true,
true};
224 bool _ctrl_vel[3] = {
true,
true,
true};
235 _param_mpc_tiltmax_air,
237 _param_mpc_man_tilt_max,
void resetIntegralZ()
Set the integral term in z to 0.
Definition: PositionControl.hpp:129
Core Position-Control for MC.
Definition: PositionControl.hpp:75
void resetIntegralXY()
Set the integral term in xy to 0.
Definition: PositionControl.hpp:123
const float & getYawspeedSetpoint()
Get the.
Definition: PositionControl.hpp:150
const matrix::Vector3f & getThrustSetpoint()
Get the.
Definition: PositionControl.hpp:136
const matrix::Vector3f getVelSp()
Get the.
Definition: PositionControl.hpp:157
Definition: px4_param.h:318
C++ base class for modules/classes using configuration parameters.
Definition: px4_module_params.h:46
const matrix::Vector3f getPosSp()
Get the.
Definition: PositionControl.hpp:178
const float & getYawSetpoint()
Get the.
Definition: PositionControl.hpp:143
Definition: PositionControl.hpp:48