Crazyflie autonomous

Firmware/software/electronics/mechanics
Post Reply
martin914
Beginner
Posts: 7
Joined: Tue Aug 06, 2013 11:18 pm

Crazyflie autonomous

Post by martin914 »

Hi everyone,

I am thinking of make the crazyflie autonomous by extending the source code of current crazyflie android client, when the right side joystick is moved upward, the command will be sent to start the motor, so if i put a timer for it, then i can make the crazyflie fly itself without manual control. But is it the part of source code to anable the motor to start lift up? or any idea how can i do this?

@Override
public void OnMoved(int pan, int tilt) {
right_analog_y = (float) tilt / resolution;
right_analog_x = (float) pan / resolution;

mFlightDataView.updateFlightData();
}

Thanks.
derf
Expert
Posts: 163
Joined: Fri May 31, 2013 12:17 am
Location: Germany

Re: Crazyflie autonomous

Post by derf »

Hi,

While this sounds like a nice idea, I'd advise against trying to make the Crazyflie fly "autonomously" based on timers. As long as the Crazyflie does not know anything about it's vertical position
from it's sensors (eg. Barometer), you can't reliably apply thrust. For example, if you would apply 60% thrust for 5 seconds your Crazyflie might just crash into the ceiling or not even lift off, because the battery is nearly drained (battery level needs to be considered).
This is not even considering the fact that you also have to control pitch and trim (apart from the basic stabilization).

I'd recommend to be patient until the "hover mode" is implemented in the Crazyflie firmware (some progress has been made already, just search the forum).
Otherwise you'll risk crashing and breaking your Crazyflie.

Regards,

Fred

P.S.: I'll look into adding support for basic pattern flying (eg. do a little circle or a square) to the Android client once the "hover mode" is implemented.
Post Reply