Mellinger controller

Discussions about autonomous flight in general, regardless of positioning method
Post Reply
Yoyasp
Beginner
Posts: 19
Joined: Mon Jan 14, 2019 2:41 am

Mellinger controller

Post 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
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Mellinger controller

Post 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.
Yoyasp
Beginner
Posts: 19
Joined: Mon Jan 14, 2019 2:41 am

Re: Mellinger controller

Post by Yoyasp »

Thanks Arnaud!

I shall try out the basic HL commands that do not require pre uploaded trajectories!
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

Re: Mellinger controller

Post 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.
Enrico Mattei
Beginner
Posts: 1
Joined: Wed Sep 11, 2019 10:46 am

Re: Mellinger controller

Post by Enrico Mattei »

Sorry,
I have a question. What is the High Level in CrazyFlie?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Mellinger controller

Post 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.
HC766
Beginner
Posts: 17
Joined: Wed Oct 09, 2019 2:16 pm

Re: Mellinger controller

Post 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
Post Reply