Computer Controlled Vertical Takeoff

Firmware/software/electronics/mechanics
Post Reply
OverlyAmbitious
Beginner
Posts: 1
Joined: Tue Apr 22, 2014 4:28 pm

Computer Controlled Vertical Takeoff

Post by OverlyAmbitious »

Hi,

I am attempting to program what I thought would be a very simple maneuver for the flight path of the Crazyflie. However, even just taking off is causing me problems and I am not sure what is going wrong. I fear that continuing to try to debug the issue on my own will result in the Crazyflie coming to an untimely death at the hands of a wall or desk.

I know that drift is a major issue for quadcopters that do not have sensors beyond gyroscopes but I was still expecting less drift than what I am seeing. When trying to take off vertically I ramp the thrust from 15000 to 40000 in 1000 increments every 0.1 seconds. Once to 40000 I stop increasing the thrust but continue to send setpoint commands to try to keep it level. To try to add some intelligence to the lift off and I try to compensate for any roll and pitch by telling the Crazyflie to go the other way, like this: (CurrentRoll and CurrentPitch are set to the new value every time the stabilizer log information is returned, roughly every 10 ms.)

self._cf.commander.send_setpoint(-CurrentRoll, -CurrentPitch, 0, thrust)

I have checked to see if the rotors have dust or hairs on them but they appear to be clean. When testing with the Crazyflie in my hand the code does seem to make the rotors react in a way that would act to stabilize it. However, before the Crazyflie gets more than about 8 cm off the ground it has moved nearly a meter in the +x,-y direction (toward motors 1 and 4) with no indication of slowing down. As far as I can tell all motors are spinning at about the same speed (And if they weren't I would think the code would help to compensate for it). I know keeping it level only means there won't be acceleration in the x-y plane and that any velocity it acquires won't be removed. The floor isn't perfectly level but it is flat. I am nervous about ramping up the thrust further because I do not want to break it.

Is the latency too high to do this? Is my approach misguided or too simple? I saw some code attempting a similar goal but it used the C library, do I need to switch?

My current goal is for it to go up about 3 meters while moving less than a half meter in the x-y plane. The distance doesn't need to be perfect and I will almost certainly have to experiment with the time and thrust to get it close. I am attempting to do this without adding further sensors (complication).

I have the 6-DOF version since the 10-DOF was out of stock when I ordered mine (which makes things a bit more complicated).

Thank you for your time,
OverlyAmbitious?
omwdunkley
Expert
Posts: 162
Joined: Thu Jun 06, 2013 9:56 pm
Location: Munich

Re: Computer Controlled Vertical Takeoff

Post by omwdunkley »

Hi!
Very quick one from me.
What you are trying to do is pretty hard:) The first thing that comes to mind is the ground effect. Drift <20cm from the surface will be huge and with only the current imu sensors pretty unobservable.. If I were you and wanted to follow your approach a little more, I would start as aggressively as possible to "jump" out of the ground effect zone. Full throttle for a short duration and then try to recover from that (which will also be harder due to your large acceleration).

I assume your flie is perfectly balanced and doesnt drift much if you manually control thrust only.

Good luck!
Post Reply