Does pitch rate controller work in Position mode?

In Position mode with 1.11.0 beta (tailsitter in MC mode) pitch rate controller does not seem to work: actuator outputs is proportional to rate setpoint and does not depend on estimated rate. Difference with Stabilized mode can be clearly seen in FlightPlot with following expressions:

  • (actuator_outputs_0.output[4]-actuator_outputs_0.output[5])/4
  • vehicle_angular_velocity_0.xyz[1]*250
  • vehicle_rates_setpoint_0.pitch

https://logs.px4.io/plot_app?log=425e2a6c-e1b2-4cd0-9616-00f40cca6bb0
Position mode:


Stabilized mode:

Neither yaw in this log nor pitch with older firmware have this effect.

  1. Is it true that pitch rate controller does not work in Position mode?
  2. Which controller controls rate setpoint in Position mode? (This setpoint looks like result of some PID.)
1 Like
  • Is it true that pitch rate controller does not work in Position mode?

NO, run here:https://github.com/PX4/Firmware/blob/master/src/modules/fw_att_control/FixedwingAttitudeControl.cpp#L506

Which controller controls rate setpoint in Position mode? (This setpoint looks like result of some PID.)

here: https://github.com/PX4/Firmware/blob/master/src/modules/mc_pos_control/mc_pos_control_main.cpp#L700

The angle setting value generated by the mc position controller is input into the fw attitude controller

Thank you, xdwgood.
Are you sure that line 506 is executed? It’s inside if (_vcontrol_mode.flag_control_attitude_enabled), and from https://github.com/PX4/Firmware/blob/v1.11.0-beta2/src/modules/fw_att_control/FixedwingAttitudeControl.cpp#L129 it seems to me this flag is false for VTOL in hovering mode.

sorry

pitch rate control run here: