Page 1 of 1

Mellinger controller

Posted: Tue Mar 26, 2019 1:03 am
by Yoyasp
Hey there,

After looking into flying drones along flightpaths with setpoints every 0.1 seconds i am unable to fly accurate enough.
This is why i started looking into other controllers to use. However i run into a few questions regarding the Mellinger controller i hope some of you can awnser for me.

Is it required to upload a trajectory to use the Mellinger controller?

If it is required can someone help me understand what the values in the csv files mean?
I can see what the duration stands for, but i dont seem to understand the x1, x2, x3 etc... To me it doesnt look like they are positions as they fluctuate between positive and negative very fast, maybe accelaration?

Any help would be greatly appreciated.

Kind regards,

Jasper

Re: Mellinger controller

Posted: Tue Mar 26, 2019 10:07 am
by arnaud
Hi,

To use the melinger controller you must use the high-level controller. The high level controller contains a couple of commands that do not require you to generate a trajectory, for instance take-off, land and goto. You can see example of how to use it in python in this lib example: https://github.com/bitcraze/crazyflie-l ... er_demo.py.

Though, if you need more complex flight path you need to generate trajectories. I have never made trajectories myself so this is just my understanding of it, hopefully @whoenig who made the high level commander will correct me if I am completely off : ).

Each line of the trajectories, like the one if this example (https://github.com/bitcraze/crazyflie-l ... vel.py#L46) are the DURATION and the coefficient of four 7 degree polynomial for X(t), Y(t), Z(t) and YAW(t). The crazyflie will run the trajectories one by one from t=0 to t=DURATION.

The script I link above contains a link to a tool that can generate and display the trajectories. We have also experimented generating a trajectory piece-wise and using numpy to fit a polynomial to it, the biggest problem is the connection between polynomials, it is very hard to get it to connect smoothly in velocity/acceleration/jerk.

Re: Mellinger controller

Posted: Tue Mar 26, 2019 4:55 pm
by Yoyasp
Thanks Arnaud!

I shall try out the basic HL commands that do not require pre uploaded trajectories!

Re: Mellinger controller

Posted: Tue Mar 26, 2019 5:36 pm
by whoenig
Just one small correction: High-level mode and mellinger are independent, i.e., you can use the high-level mode and fly with the PID controller. You can also use the mellinger to fly manually using a joystick.

And a warning: There are currently some issues with switching between high-level and low-level modes during the flight, which I am working on.

Re: Mellinger controller

Posted: Thu Oct 17, 2019 2:35 pm
by Enrico Mattei
Sorry,
I have a question. What is the High Level in CrazyFlie?

Re: Mellinger controller

Posted: Mon Oct 21, 2019 2:12 pm
by arnaud
@Enrico Mattei: The High-Level commander discussed in this thread is a commander implemented in the Crazyflie that can be controlled with high-level setpoint like goto commands and trajectories. This is different to pre-existing low level controller like attitude and position control for which the setpoint are instantaneous attitude or position setpoint.

Since this question is of a different topic of this thread, if I did not answer your question or if you have further question feel free to create a new topic.

Re: Mellinger controller

Posted: Tue Oct 22, 2019 2:18 pm
by HC766
Hi, I have some questions about high-level command and mellinger controller. If I would like to use the mellinger controller and high-level to achieve a autonomous flying, where can I find the principle of the control algorithms of this? I am going to do my graduate project about it, so I wish I can truly understand the control algorithm of the autonomous flying by using mellinger controller https://github.com/bitcraze/crazyflie-l ... er_demo.py and high-level command https://github.com/bitcraze/crazyflie-l ... er_demo.py