// generated from rosidl_adapter/resource/msg.idl.em
// with input from px4_msgs/msg/ControlAllocatorStatus.msg
// generated code does not contain a copyright notice


module px4_msgs {
  module msg {
    typedef float float__3[3];
    typedef int8 int8__16[16];
    module ControlAllocatorStatus_Constants {
      @verbatim (language="comment", text=
        "The actuator is not saturated")
      const int8 ACTUATOR_SATURATION_OK = 0;
      @verbatim (language="comment", text=
        "The actuator is saturated (with a value <= the desired value) because it cannot increase its value faster")
      const int8 ACTUATOR_SATURATION_UPPER_DYN = 1;
      @verbatim (language="comment", text=
        "The actuator is saturated (with a value <= the desired value) because it has reached its maximum value")
      const int8 ACTUATOR_SATURATION_UPPER = 2;
      @verbatim (language="comment", text=
        "The actuator is saturated (with a value >= the desired value) because it cannot decrease its value faster")
      const int8 ACTUATOR_SATURATION_LOWER_DYN = -1;
      @verbatim (language="comment", text=
        "The actuator is saturated (with a value >= the desired value) because it has reached its minimum value")
      const int8 ACTUATOR_SATURATION_LOWER = -2;
    };
    struct ControlAllocatorStatus {
      @verbatim (language="comment", text=
        "time since system start (microseconds)")
      uint64 timestamp;

      @verbatim (language="comment", text=
        "Boolean indicating whether the 3D torque setpoint was correctly allocated to actuators. 0 if not achieved, 1 if achieved.")
      boolean torque_setpoint_achieved;

      @verbatim (language="comment", text=
        "Unallocated torque. Equal to 0 if the setpoint was achieved." "\n"
        "Computed as: unallocated_torque = torque_setpoint - allocated_torque")
      float__3 unallocated_torque;

      @verbatim (language="comment", text=
        "Boolean indicating whether the 3D thrust setpoint was correctly allocated to actuators. 0 if not achieved, 1 if achieved.")
      boolean thrust_setpoint_achieved;

      @verbatim (language="comment", text=
        "Unallocated thrust. Equal to 0 if the setpoint was achieved." "\n"
        "Computed as: unallocated_thrust = thrust_setpoint - allocated_thrust")
      float__3 unallocated_thrust;

      @verbatim (language="comment", text=
        "Indicates actuator saturation status." "\n"
        "Note 1: actuator saturation does not necessarily imply that the thrust setpoint or the torque setpoint were not achieved." "\n"
        "Note 2: an actuator with limited dynamics can be indicated as upper-saturated even if it as not reached its maximum value.")
      int8__16 actuator_saturation;

      @verbatim (language="comment", text=
        "Bitmask of failed motors that were removed from the allocation / effectiveness matrix. Not necessarily identical to the report from FailureDetector")
      uint16 handled_motor_failure_mask;
    };
  };
};
