Page 1 of 1

Mikehamer's non-linear controller

Posted: Thu May 11, 2017 4:38 pm
by 4rzael
Hello,

I need, for a project I'm working on, to control multiple crazyflies (5), to have them follow given trajectories, etc...

I am currently using ROS with LPS nodes in TDoA mode as tracking systems, but I cannot get a drone to hover with precisions better than +-50cm, and it is even worse when the setpoint moves (naive trajectory implementation).

I saw that mikehamer made a quaternion based controller which seems very great and appropriate to do so.

The problem is that I don't get how to make it work.

* Is the quaternion controller compatible with mgreiff trajectory generation tool ?

* Is the current code (new-controller firmware) compatible with TDoA, and if so, what flags should be used at compile-time

* Is there an example ROS launch (or best, a repository) file I could use in order to have one drone hovering at a given position using this controller ? On the firmware issue about the new controller, this code https://gist.github.com/mikehamer/1d3e7 ... 2804dcdba5 is given, but I don't get what ROS nodes should be run with it.

Thanks for your help

Re: Mikehamer's non-linear controller

Posted: Tue Jun 13, 2017 9:18 am
by arnaud
Hi,

You are trying very experimental code. I will try to answer the best I can.

One note first: we found out recently that the PID controller did not have the I coefficient set for Z, setting some value there helps dramatically the height control.

Are you seeing different results with TDoA and TWR?

Now for your questions:

* Yes, for FOSDEM we have used mgrieff trajectory generation tool with Mike's controller.

* As far as I know it should be compatible. For a more recent merge you can look at the code we used for ICRA: https://github.com/bitcraze/crazyflie-f ... /icra-2017

With the compile flags (in config.mk)

Code: Select all

CONTROLLER         ?= new
POWER_DISTRIBUTION ?= cf2
Mike's controller is enabled. Though this branch also contains our demo code but by default it should not be running.

* This code is supposed to run with Mike's fork of the ros driver. I am not aware of a launchfile tha has been publically shared and unfortunatly I do not have it anymore on my computer. The script can be launched instead of the controller script in the ros demo launchfiles.

Re: Mikehamer's non-linear controller

Posted: Wed Jun 21, 2017 7:09 am
by SlouchyCat
Hi 4rzael and arnaud,

I am also interested in making crazyflie hover accurately using ROS with new non-linear controller. Can I just enable the new controller in make file and start the hover launchfile in ROS driver provided here?

https://github.com/bitcraze/lps-ros

Thanks!

Re: Mikehamer's non-linear controller

Posted: Wed Jun 21, 2017 9:34 am
by arnaud
The new controller still requires a fork of the ROS Crazyflie driver, you can find more information in this github ticket message: https://github.com/bitcraze/crazyflie-f ... -273224981

Re: Mikehamer's non-linear controller

Posted: Wed Jun 21, 2017 9:57 am
by SlouchyCat
Thanks Arnaud! It really helps!