Good starting point for writing a quadrotor controller
I wrote a python script a few months ago, that implements a 6-DoF quadrotor simulation with an LQR controller for attitude and position control, but would love to somehow get the controller working on a real quadrotor using ROS, in the not too distant future. As I'm new to ROS, I had a few questions regarding the high-level topics, publish and subscribe design, and was wondering if it might look like the following:
1) IMU publishes quadrotor's state
2) LQR controller subscribes to IMU state topic, and publishes rotor speed or voltage commands for a particular controller setpoint
3) Each rotor subscribes to a relevant controller rotor speed or voltage command topic, to stabilize and control quadrotor
4) Repeat steps (1)-(3)
Since I haven't bought myself a quadrotor testbed yet, I wanted to test the controller with ROS + Gazebo instead. As such, I was wondering if anyone in the community has already made a package that provides a controller and allows ROS to simulate the controller on a quadrotor in Gazebo. So far I've managed to find the RotorS project from ETH Zurich ( https://github.com/ethz-asl/rotors_si... ), but have unfortunately been unable to get it to work with Ubuntu 16.04 and ROS Kinetic (I've followed the instructions multiple times, but always seem to get errors when using catkin build). What I'm hoping to do, is see how a working controller is uses ROS to publish and subscribe appropriately, in the Gazebo environment, and then eventually replace the working controller with my own code to see how it compares. Once I'm happy that the controller works in simulation with Gazebo, I'll then try and port it onto a real quadrotor.
Any help would be much appreciated, thanks very much.