Mark Whitehorn's quad code flown (successfully)

238 views
Skip to first unread message

Riccardo Kuebler

unread,
May 30, 2012, 3:06:30 PM5/30/12
to uavdevboard
Hi Mark,

just I did three flights with your code (r1538).
Too much easy, it was plug'n'play :D

I did the few changes needed to match my radio and my motors setup and went in flight (after a ground check obviously).
Stabilization is so smooth, beside good authority : I'm impressed.

I only did hover for now.

I did three video, one from ground, one from quad and one from ground at 100frame per second.
I will publish something soon.

A last note : I'm flying in x configuration.

Great work, Mark !

Best regards,

Ric

Riccardo Kuebler

unread,
May 30, 2012, 6:55:34 PM5/30/12
to uavdevboard
Hi Mark,

a couple of video will come online in short :

http://youtu.be/8f6H8_noxIA

http://youtu.be/8bSmvnYW5x4

Best regards,

Ric

2012/5/30 Riccardo Kuebler <kue...@ticino.com>

William Premerlani

unread,
May 30, 2012, 8:13:10 PM5/30/12
to uavde...@googlegroups.com
Hi Ric and Mark,
Very impressive videos and performance. I am very glad and excited to have both of you contributing to in a big way to MatrixPilotQuad. Mark has made good progress, I look forward to him taking the lead.
Best regards,
Bill

markw

unread,
May 30, 2012, 9:15:47 PM5/30/12
to uavde...@googlegroups.com
Ric,

Thanks for posting the videos. It's great to know the code will work on other quadcopters. I gather these flights were with the default gains.

Your onboard video looks like it's from a high quality CMOS camera. I can't see any obvious evidence of wobble or oscillations from the controls.

I just committed a set of changes to the code which (hopefully) corrected an error in what was the KDD term. It's now called RATE_KD (options_base.h has changed a bit) and the default gains have changed. I'd appreciate it if you could try the new version and default gains to see whether you think it's an improvement, and what effect the RATE_KD gain parameter has for you.

Thanks go to Bill Premerlani for making this work in the first place; all I've done is to make minor changes.

regards,
--Mark
Message has been deleted

Universal Engineers

unread,
May 31, 2012, 3:51:34 AM5/31/12
to uavde...@googlegroups.com
Dear Mark,

Thanx for your guidance and putting up your code on the trunk.
I'm able to fly and it is to easy to have the proper control on my quad.
Hats off to you for this good work.

Robby.

markw

unread,
May 31, 2012, 8:35:28 AM5/31/12
to uavde...@googlegroups.com
Hi Robby,

Great to hear MPQ is working for you, and thanks again for your help in testing. 

It would be great if you could post some characteristics of your quad, such as flying weight, battery and prop size.

There's a new update to the code in the repository and I'd be interested to know whether it compiles for you and whether you are using MPLAB-X or MPLABv8

regards,
--Mark

Mark Whitehorn

unread,
May 31, 2012, 8:41:06 AM5/31/12
to uavde...@googlegroups.com
Hi Igal,

This branch is in the very early stages of development and I am working on GPS position hold, compass mode fly-by-wire and stabilization of spinning flight.

At rev1542, there is a bugfix to the PID control loop, which resulted in changes to the default gains and renaming of the gain parameters. Merge the new version of options_base.h with your existing options.h file when you update, and beware that there hasn't been much testing of this rev yet.

regards,
--Mark

On Wed, May 30, 2012 at 11:48 PM, igor isakov <igo...@gmail.com> wrote:
Hi  mark,
 
what  was the  reason to  change  the  code?
 
Thanks,
Igal.

2012/5/31 markw <kd0...@gmail.com>



--
Mark Whitehorn
kd0...@gmail.com

Message has been deleted

Mark Whitehorn

unread,
May 31, 2012, 12:02:45 PM5/31/12
to uavde...@googlegroups.com
Igal,

It should fly OK in TILT_MODE and COMPASS_MODE without a GPS. 
COMPASS_MODE requires a magnetometer and currently maps forward stick to North, right stick to East regardless of quadcopter heading.

regards,
--Mark

On Thu, May 31, 2012 at 8:51 AM, igor isakov <igo...@gmail.com> wrote:
ok,
 
is the new version require a GPS  unit ?
 
Igal.


 
2012/5/31 Mark Whitehorn <kd0...@gmail.com>



--
Mark Whitehorn
kd0...@gmail.com

gefkuz

unread,
May 31, 2012, 2:26:55 PM5/31/12
to uavdevboard
Hi Mark,

I'm testing your code on my quad (who don't fly for the moment).
First impression, it's beautifull. Really speed PID.
I'm not using a traditionnal radio. The control is done by my PC with
a specific application, and transmit with a couple of xbee.
Then I made some minor modifications on the code, to control the quad
by Telemetry.c. I made some modification on option.h to add a define
to activated telemetry control.
For the moment, I think I don't modify more the code because I want to
test outdoor.
Do you want to integrate my code?
In the future, I would like to modify the telemetry to send more
information like ardustation and other.

Gefkuz

Mark Whitehorn

unread,
May 31, 2012, 3:28:43 PM5/31/12
to uavde...@googlegroups.com
Hi Gefkuz,

I'm glad you like the looks of the code. 

Since this branch is relatively untested, I'd like to keep its focus pretty narrow to minimize the complexity of maintaining it. My intent is just to get the attitude and position control functions working correctly, then see how the development team wants to integrate them into a version for release.

If you make your wireless control capability modular, it should be easy to integrate into the release code at some point.

regards,
--Mark
--
Mark Whitehorn
kd0...@gmail.com

Message has been deleted
Message has been deleted

markw

unread,
May 31, 2012, 5:01:10 PM5/31/12
to uavde...@googlegroups.com
Here's video of my test of rev1543 MatrixPilotQuad_mw: http://www.youtube.com/watch?v=Vc4dNS_U11s

regards,
--Mark


Riccardo Kuebler

unread,
May 31, 2012, 5:04:41 PM5/31/12
to uavde...@googlegroups.com
Hi Mark,

just seen it : impressive !

I think I still have to tune the gains better on mine.

Best regards,

Ric

2012/5/31 markw <kd0...@gmail.com>

Riccardo Kuebler

unread,
May 31, 2012, 5:05:32 PM5/31/12
to uavde...@googlegroups.com
btw I don't understand : are trying to test heading hold with magnetometer ?
What about GPS ?

Ric

2012/5/31 Riccardo Kuebler <kue...@ticino.com>

gefkuz

unread,
May 31, 2012, 5:53:52 PM5/31/12
to uavdevboard
Mark,

I've got the same problem as Igal with full svn upgrade and just add
option.h with RATE_KP and other defines.

Gefkuz

Mark Whitehorn

unread,
Jun 1, 2012, 10:59:06 AM6/1/12
to uavde...@googlegroups.com, William Premerlani
Hi Ric,

I don't think I replied to this message; the magnetometer is working to eliminate yaw drift, but there are some issues with the automatic offset and alignment corrections. Bill is going to look into that.

The "compass" flight mode is fly by wire with forward cyclic = North. So I can give full yaw command and steer without worrying about the quad's actual heading. The controller compensates for heading to make forward stick mean North even with the quad spinning rapidly. The code is also compensating for control latency when spinning since otherwise a wobble instability develops due to tilt response being delayed by many degrees of rotation.

The "pos hold" flight mode is supposed to hover at the current GPS coordinates, but that's not working very well at all yet.

73,
--Mark

igor isakov

unread,
Jun 1, 2012, 11:10:18 AM6/1/12
to uavde...@googlegroups.com
Hi  to  all,

this  is  my first  outdoor  quadrotor  fly.


regards.

2012/6/1 Mark Whitehorn <kd0...@gmail.com>

Mark Whitehorn

unread,
Jun 1, 2012, 11:14:13 AM6/1/12
to uavde...@googlegroups.com
Hi Igal,

Thanks for posting the video. Looks like stabilization is working well.

You might want to decrease TILT_KP to slow down the tilt response a little.

regards,
--Mark

gefkuz

unread,
Jun 1, 2012, 1:03:42 PM6/1/12
to uavdevboard
Hi all,

First fly outdoor today. Wouah, this is difficult...
I need some training lol.
But It's real amazing after PID adjustement finished.
It's time now to buy more propellers, and reconfigure my Esc to don't
stop on low battery...

Thanks to the team. ;)

Next step, training, training, training and thinking to FPV.

Universal Engineers

unread,
Jun 4, 2012, 10:21:55 AM6/4/12
to uavde...@googlegroups.com
Dear Mark,

Sorry for the delay as I was away for the last couple of days.
I'm using GAUI-330x quad with all the supplied motors and battery.
I use MPLAB ver.8 AND PICKIT 3 with my UDB-4.

Regards,
Robby.

Igal

unread,
Jun 27, 2012, 2:56:45 PM6/27/12
to uavdevboard
HI to all ,

Recently i found some problems at my quad behavior:

1. after the quad getting calibrate on the floor - which
determine my 0 degree, i put throttle up and the quad go up
but the stabilzation is going around 5 degree in pitch axis.
what may be the reason for this?

2. i check the stabilization on pith and roll axis, and i
see that i have more stable behavior on roll axis than in
pitch axis . the difference is huge !!
from what i know the the stability for pitch axis and roll
axis must be the same , am i wrong?

regards,
igal.

On Jun 4, 5:21 pm, Universal Engineers

Mark Whitehorn

unread,
Jun 29, 2012, 10:42:22 AM6/29/12
to uavde...@googlegroups.com
Hi Igal,

It sounds like you might have a bad motor or ESC on the pitch axis. That would account for both the trim problem and the difference in stability.

regards,
--Mark

--



--
Mark Whitehorn
kd0...@gmail.com

Igal

unread,
Jul 2, 2012, 1:51:53 PM7/2/12
to uavde...@googlegroups.com
hi mark,

i  downloaded  new revision  of your  code "r1597"  and  i have some  error  during  compilation:

"

build\udb4\motorCntrl.o(.text+0x564): In function `motorCntrl':
C:\\MatrixPilotQuad\motorCntrl.c:457: undefined reference to `_Q16atan'
Link step failed.

"

what  may be the problem ?

regards, 
igal

On Friday, June 29, 2012 5:42:22 PM UTC+3, markw wrote:
Hi Igal,

It sounds like you might have a bad motor or ESC on the pitch axis. That would account for both the trim problem and the difference in stability.

regards,
--Mark

Mark Whitehorn

unread,
Jul 2, 2012, 2:32:11 PM7/2/12
to uavde...@googlegroups.com
Hi Igal,

_Q16atan is in libq. You need to add the "q" library to your project's link parameters.

regards,
Mark

Igal

unread,
Jul 2, 2012, 4:56:58 PM7/2/12
to uavde...@googlegroups.com
ok,

where should i  define it ?

igal


On Monday, July 2, 2012 9:32:11 PM UTC+3, markw wrote:
Hi Igal,

_Q16atan is in libq. You need to add the "q" library to your project's link parameters.

regards,
Mark

Mark Whitehorn

unread,
Jul 2, 2012, 6:05:08 PM7/2/12
to uavde...@googlegroups.com
In MPLAB-X, it's on the Project Properties menu (MPLAB8 has a similar menu):
Inline image 1

I also committed the updated MPLAB-X project files, so you could just update them, if you're using that IDE.

--Mark
image.png

gefkuz

unread,
Jul 3, 2012, 2:54:25 PM7/3/12
to uavde...@googlegroups.com

Mark,

 
I made the needed modifications on the mplab8 project. If you want, there is on the zip file. Now The compilation is ok.
MatrixPilotQuad.zip

Mark Whitehorn

unread,
Jul 3, 2012, 3:26:57 PM7/3/12
to uavde...@googlegroups.com
Thanks, I'll update the project files in svn.
--Mark

On Tue, Jul 3, 2012 at 12:54 PM, gefkuz <gef...@gmail.com> wrote:

Mark,

 
I made the needed modifications on the mplab8 project. If you want, there is on the zip file. Now The compilation is ok.

--



--
Mark Whitehorn
kd0...@gmail.com

Igal

unread,
Jul 11, 2012, 4:07:12 PM7/11/12
to uavde...@googlegroups.com
Hi Mark,

how can i see the gain parameter change in telementry  while i play with the  pitch trim button ?

Regards,
Igal.

Mark Whitehorn

unread,
Jul 11, 2012, 5:18:22 PM7/11/12
to uavde...@googlegroups.com
Hi Igal,

The gain values are sent out each time the throttle is brought down to idle. The gain adjustment channel must not be pitch, roll or throttle though. I use channel 5 or 7 on my Spektrum DX7 radio.

regards,
--Mark

igor isakov

unread,
Jul 12, 2012, 11:00:53 AM7/12/12
to uavde...@googlegroups.com
Hi  mark,
 
i  know  that  fact,   i ask  if  i  can  see  in  real  time  with  RS232  the  change  of  gains  with tx ? 
 
Igal.

2012/7/12 Mark Whitehorn <kd0...@gmail.com>
Hi Igal,

The gain values are sent out each time the throttle is brought down to idle. The gain adjustment channel must not be pitch, roll or throttle though. I use channel 5 or 7 on my Spektrum DX7 radio.

regards,
--Mark


On Wed, Jul 11, 2012 at 2:07 PM, Igal <> wrote:
Hi Mark,

how can i see the gain parameter change in telementry  while i play with the  pitch trim button ?

Regards,
Igal.


On Tuesday, July 3, 2012 10:26:57 PM UTC+3, markw wrote:
Thanks, I'll update the project files in svn.
--Mark

On Tue, Jul 3, 2012 at 12:54 PM, gefkuz <gef...@gmail.com> wrote:

Mark,

 
I made the needed modifications on the mplab8 project. If you want, there is on the zip file. Now The compilation is ok.

--



--
Mark Whitehorn
kd0...@gmail.com

--



--
Mark Whitehorn
kd0...@gmail.com

--

Mark Whitehorn

unread,
Jul 12, 2012, 11:39:10 AM7/12/12
to uavde...@googlegroups.com
Hi Igor,

Sorry I misunderstood your question. You and Ric both suggested this and it seems like an easy thing to do. I just committed r1623 of MPQ-MW with the change. Please let me know if it works the way you want.

regards,
--Mark

Riccardo Kuebler

unread,
Jul 12, 2012, 11:56:54 AM7/12/12
to uavde...@googlegroups.com
Hi Mark,

I meant to have all gain changes recorded and this seems what you did in the last revision : thanks.

I guess Igal would like to have live telemetry and gains on a terminal.
It should be possible to send them by Xbee over serial port and have them on a terminal (I use Tera Term for this, but never did it with Xbee).

Best regards,

Ric

2012/7/12 Mark Whitehorn <kd0...@gmail.com>
--

igor isakov

unread,
Jul 23, 2012, 8:31:03 AM7/23/12
to uavde...@googlegroups.com
HI,
 
last  version  fly test  :
 
 
 
Regards,
Igal.

2012/7/12 Riccardo Kuebler <chilosc...@gmail.com>
--

Mark Whitehorn

unread,
Jul 23, 2012, 8:59:51 AM7/23/12
to uavde...@googlegroups.com
Hi Igal,

Thanks for posting your flight video, it looks like you're making good progress.

Please let me know if you have any problems with motors running before you have performed the arming sequence.

best regards,
--Mark

Igal

unread,
Jul 24, 2012, 12:00:06 AM7/24/12
to uavde...@googlegroups.com
Hi Guys,

i perform  Experiment in order to estimate  performance  of  the  quad with  payload of  1 kg  and  impact  response.

see  attached  link : 


Igal.
Reply all
Reply to author
Forward
0 new messages