Self stabilizing using the 3-axis accelerometer?

Discussions and questions about the Crazyflie Nano Quadcopter
ahorvat
Beginner
Posts: 4
Joined: Sat May 18, 2013 10:46 am

Re: Self stabilizing using the 3-axis accelerometer?

Post by ahorvat »

I'm also having some issues getting the hover mode working. I've cloned, built and flashed the firmware.
Using PS3 Mode 3, clicking the O button seems only to toggle the hover mode off, at which point the quad just drops out and motors are unresponsive.

Am I missing something here?
willminers
Beginner
Posts: 7
Joined: Sun May 12, 2013 12:50 pm

Re: Self stabilizing using the 3-axis accelerometer?

Post by willminers »

I was getting that, ahorvat, are you sure you built the right version of the firmware? I had the right branch of the pc client, but not the correct firmware, so the hover mode was just acting as a kill switch.

The problems I am having with the hover mode are that once I turn it on, it just flies up until it hits the ceiling, and I can't seem to reduce the altitude.
pablo_paul
Beginner
Posts: 17
Joined: Fri May 10, 2013 8:26 pm

Re: Self stabilizing using the 3-axis accelerometer?

Post by pablo_paul »

I'm just cloning the hover branch I think the original link given was for the cloned bitcraze branch!
ahorvat
Beginner
Posts: 4
Joined: Sat May 18, 2013 10:46 am

Re: Self stabilizing using the 3-axis accelerometer?

Post by ahorvat »

At the time I cloned, the hover branch was already merged into the default, but something was apparently wrong. Cleaned and rebuilt the firmware.

Now I have the 'hover into the ceiling' behaviour that I've heard about...yay. So I guess this needs a bit more work. Anyone had any real success?
mjc506
Beginner
Posts: 13
Joined: Wed Feb 20, 2013 1:41 pm

Re: Self stabilizing using the 3-axis accelerometer?

Post by mjc506 »

I re-coded the hover 'thrust control' part of Phiamo's code here: https://bitbucket.org/mjc506/crazyflie-firmware

I still need to tweak the PID parameters (and work out a sensible D part) but so long as the set point isn't too far away, it hovers quite happily.

I'd recommend holding on to your cf at your desired height first, then switching hover mode on. The props will then start to spin, and when you let go the cf will drop a bit, but then should start to recover.
bhuism
Beginner
Posts: 13
Joined: Thu May 09, 2013 8:51 am

Re: Self stabilizing using the 3-axis accelerometer?

Post by bhuism »

I'm very excited about pressure driven thrust! I'll give it a try, can u put a binary up in your bitbucket or do I need to compile it myself? will you pull your changes to the main repo later?
rmirwin2
Member
Posts: 51
Joined: Mon May 13, 2013 6:06 pm

Re: Self stabilizing using the 3-axis accelerometer?

Post by rmirwin2 »

Also had the ceiling thing until I got your last contribution (b3f0802) today, Matt.

My Crazyflie is hovering now!! :lol:

Still some oscillation in the altitude but it's very close. Amazing!

Phillip, Matt, everyone, great work, sure is fun! Thanks!

Rich
VGer's v1.7.1 frame, 10DOF Crazyflie, Wireless Xbox360 Controller, Virtual Machine on VMware/Windows 7
mjc506
Beginner
Posts: 13
Joined: Wed Feb 20, 2013 1:41 pm

Re: Self stabilizing using the 3-axis accelerometer?

Post by mjc506 »

It needs compiling first at the moment, once I've got it working nicely I'll stick up a compiled blob and do a pull request.

Rmirwin2, are you using the standard PID coefficients? I think they still need tweaking, but yeah, they're not too far off I think.
rmirwin2
Member
Posts: 51
Joined: Mon May 13, 2013 6:06 pm

Re: Self stabilizing using the 3-axis accelerometer?

Post by rmirwin2 »

I suspect they are yet the standard ones as I haven't looked for them or seen an update for them.
Do you plan to post a good set?

Again, thanks for the work here. Really makes the Crazyflie easier to handle!

Rich
VGer's v1.7.1 frame, 10DOF Crazyflie, Wireless Xbox360 Controller, Virtual Machine on VMware/Windows 7
mjc506
Beginner
Posts: 13
Joined: Wed Feb 20, 2013 1:41 pm

Re: Self stabilizing using the 3-axis accelerometer?

Post by mjc506 »

You can fiddle with them in the 'parameters' tab :)

Once I find a good set, I'll push the changes to bitbucket and provide a compiled .bin

Phiamo's done some work with my code too, but I'm still at work so I'll check it out at home :)
Post Reply