Ask Your Question

Good starting point for writing a quadrotor controller

asked 2019-05-28 01:18:59 -0600

JeffR1992 gravatar image

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 ( ), 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.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2019-06-06 04:35:51 -0600

kosmastsk gravatar image

I would suggest you to take a look at Hector Quadrotor. It works with ROS Kinetic for sure and they have implemented all the controllers in it. On top of this, in order to move the drone in space, I have used a PID position controller that sends velocity commands to the Quadrotor and works fine

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-05-28 01:15:59 -0600

Seen: 305 times

Last updated: Jun 06 '19