Browse Source

FlightTasks and local setpoint: add thrust setpoint

sbg
Dennis Mannhart 7 years ago committed by Beat Küng
parent
commit
76ad00497b
  1. 3
      msg/vehicle_local_position_setpoint.msg
  2. 3
      src/lib/FlightTasks/tasks/FlightTask.hpp

3
msg/vehicle_local_position_setpoint.msg

@ -12,3 +12,6 @@ float32 vz # in meters/sec @@ -12,3 +12,6 @@ float32 vz # in meters/sec
float32 acc_x # in meters/(sec*sec)
float32 acc_y # in meters/(sec*sec)
float32 acc_z # in meters/(sec*sec)
float32 thr_x # normalized
float32 thr_y # normalized
float32 thr_z # normalized

3
src/lib/FlightTasks/tasks/FlightTask.hpp

@ -130,6 +130,9 @@ protected: @@ -130,6 +130,9 @@ protected:
/* Put the yaw anglular rate produced by the task into the setpoint message */
void _setYawspeedSetpoint(const float &yawspeed) { _vehicle_local_position_setpoint.yawspeed = yawspeed; }
/* Put the thrust setpoint produced by the task into the setpoint message */
void _setThrustSetpoint(const matrix::Vector3f &thrust_setpoint) { thrust_setpoint.copyToRaw(&_vehicle_local_position_setpoint.thr_x);}
private:
uORB::Subscription<vehicle_local_position_s> *_sub_vehicle_local_position{nullptr};

Loading…
Cancel
Save