Mellinger controller

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

Mellinger controller

Post by Yoyasp » Tue Mar 26, 2019 1:03 am

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: 2028
Joined: Tue Feb 06, 2007 12:36 pm

Re: Mellinger controller

Post by arnaud » Tue Mar 26, 2019 10:07 am

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: 18
Joined: Mon Jan 14, 2019 2:41 am

Re: Mellinger controller

Post by Yoyasp » Tue Mar 26, 2019 4:55 pm

Thanks Arnaud!

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

whoenig
Expert
Posts: 310
Joined: Mon Oct 27, 2014 2:55 am

Re: Mellinger controller

Post by whoenig » Tue Mar 26, 2019 5:36 pm

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.

Post Reply