PX4:main
← PX4:pr-fw-rate-control-module
opened 01:39PM - 18 Sep 22 UTC
## Describe problem solved by this pull request
The `fw_att_control` module wer…e controlling both attitude and body rate setpoints. While this has been working great, this makes it hard to integrate other control methods on either side of the cascasded loop.
Therefore, this PR proposes adding a separate `fw_rate_control` module that pulls out the rate control functionality from the `fw_att_control` module.
## Describe your solution
This PR adds a fixed wing rate control module, where we can potentially swap out the controller to other controllers(out of tree modules)
Adding the rate controller as a separate module has the following advantages
- We can run the rate controller at a faster rate, that is appropriate for attitude control
- makes the control framework more modular, for example we can now switch the rate controller to different rate control methods (e.g. indi @kimnerd FYI)
- Cleaner interface between rate control and attitude control so that the interface for each cascaded control is clearly defined
- This moves us closer to a unified rate controller for VTOLs
This is still a WIP, and I have noticed a few things that needs to be resolved before we can actually merge this approach
- [x] This PR breaks the wheel controller - We need to decide on how to handle wheel controller (https://github.com/PX4/PX4-Autopilot/pull/20537)
- A lot of information is just getting passed to the attitude controller just for the wheel controller
- [x] Decide on how to handle flap controls (Currently being passed through attitude setpoints)
- Why are flaps part of the attitude setpoint?
- [x] The `fw_rate_control` still needs to subscribe to `vehicle_attitude_setpoint` message since the reset rate integral is included in the `vehicle_attitude_setpoint` (https://github.com/PX4/PX4-Autopilot/pull/20502)
## Test data / coverage
Tested in SITL
## Additional context
- This is a continuation of https://github.com/PX4/PX4-Autopilot/pull/20080