This repository is a ROS2 implementation of the 2017 RAL paper titled "Thrust Mixing, Saturation, and Body-Rate Control for Accurate Aggressive Quadrotor Flight" by Faessler, et. al.
It is implemented to work with the ROScopter controller.
Build and source this repository in a terminal (that has sourced ROS2) with
colcon build
source install/setup.zsh
Run with:
ros2 run thrust_mixing_lqr lqr_rate_controller
This node is designed to replace the ROScopter controller node. When using with ROScopter, don't launch the controller node, but do launch everything else.
This package defines 3 executables that can be used with ROScopter. One is the LQR rate controller, which takes in rate commands and publishes commands directly to the ROScopter mixer (in pass-through mode).
The trajectory follower transcription node is designed to take output of the ROScopter trajectory follower (if the trajectory follower is outputting angles), and convert those angle commands to rate commands so that the LQR controller node can operate on them.
The last is an RC transcription node, which converts RC output from the rc_raw topic to rate commands, which are then passed to the LQR controller.
Note that in order for this to work well, the firmware needs to set the RC stick deviation parameter to 1.0 (so that the ROSflight firmware doesn't hand control over to RC from offboard when the RC sticks deviate from center).