Doug Weibel's Posts (28)

Sort by
Developer

 

3689489678?profile=original

When the ublox 6 series modules were released, I noted that the 6T and 6P modules provided access to the raw carrier phase measurements, and I started thinking about how to use this capability.  My connections through my university research appointment weren't strong enough to get ublox to sample a dev kit to me (they generally don't sample them at all).  Jordi and Chris from 3DRobotics.com were kind enough to use their customer relationship with ublox to get a sample 6T module and provided it to me mounted on the standard DIYDrones ublox LEA-6 module.  So mine looks just like the one above, except it has a 6T module instead of a 6H.

 

My prime curiosity was how good the carrier phase measurements from this module were.  The datasheet indicates that carrier phase measurements are available, but gives no specs about their accuracy.  So I had no idea if they would be of value.  Well, with a module in hand, some measurements made, and post-processing completed, I can tell you that there is tremendous potential here, but a lot of work before this is something ready for everyday use.

 

OK, what is carrier phase and why do I care?

A carrier phase measurement is a measurement of the phase of the arriving carrier wave signal from the gps satellite.  Think of it this way - as the radio signal from the GPS satellite travels from the satellite to your receiver it completes some fractional number of cycles of oscillation.  That means that the distance from the satellite receiver to you is some fractional number of wavelengths - say 100 million and 1/2 wavelengths.  The carrier phase measurement gives you the fractional value of 1/2 wavelength, or 180 degrees of phase.  That in itself is almost useless.  Fortunately the gps module gives us something a little better than that.  What it reports is the phase change (or the number of wavelengths of distance change) between the satellite and the receiver from one measurement epoch to the next.  So what we really have is a measurement of the change in distance between the satellite and the receiver over a known period of time.  And so theoretically, given that we know something about the location and velocity of all the satellites we should be able to use this information to calculate the (3D) velocity of the receiver.  Just one more thought on this topic - we could do the same thing with pseudo-range or Doppler measurements, which the receiver also makes, but carrier phase measurements have the potential to be orders of magnitude more accurate.

 

Nice, but what about position?

Well, the technique that I will describe below has some applicability to making very accurate position measurements, but lets just say it is really hard and is the kind of thing that only happens (still a relatively small number of) military gps with very large price tags.  I'll say some more about this later.  For now, we will just be looking at making velocity measurements.

 

OK, but what will we do with a great velocity measurement?

Well, imagine how much better position hold could work in a copter if the autopilot knew its 3D velocity vector to an accuracy of 5 millimeters per second.  Yeah, time for a double-take.  I said millimeters per second.  My initial test yielded a velocity resolution of 1 millimeter per second and an accuracy of better than 5 millimeters per second at a 5 Hz update rate.

 

There are lots of other things we can do with a better velocity estimate, like better acceleration modelling in the AHRS system, etc.

 

Let's see the data.

OK.  I have run two tests so far.  The first turned out fantastic.  The second had some difficulties, but still shows immense promise.  Below is a plot of the velocity estimate error during the first test.  This represents a bit over 5 minutes of data with samples at 5 Hz.

3689489765?profile=original

 

OK - let me describe a few things in this plot.  First, note that there are 5 `spikes' where the error is above 0.1 m/s.  These are 5 samples where the receiver did not have carrier phase lock on at least 4 satellites, and you need 4 satellites to get a valid solution.  For individual samples like this you can generally re-use the last velocity estimate.  There are also around 10 samples where the error is on the order of 4 or 5 cm/s.  These are samples where the receiver only had 4 satellites with carrier phase lock.  The accuracy gets better when the receiver has more satellites with carrier phase lock.

You may be wondering what my "truth data" was.  Well, it was simply that the module was just sitting on the ground in my back yard, so the truth was 0 velocity in the Earth centered Earth fixed (ECEF, WGS84 for example) frame.  This is not at all cheating as the velocity relative to the ground is irrelevant - we are still making a velocity estimate based on measurements of the velocity between the satellites and the receiver, and the satellites are all moving at roughly 14,000 km/hour in various directions.  The relative velocities between the satellites and the receiver are on the order of thousands of kilometers per hour, and from this we are able to deduce motion on the millimeter per second scale.

 

Unfortunately maintaining carrier phase lock is not as easy as tracking a satellite.  On the second test in similar conditions I only got carrier phase lock on 4+ satellites about 75% of the time, leaving many periods of several seconds with no valid measurements available.  On the second test the reduced accuracy of the velocity measurement was more apparent with accuracy on the order of 0.1 m/s with 4 satellites and 0.02 m/s with 5 satellites.  Even so, 0.02 m/s is a very impressive number.

How did you do it?

I did all this with data recorded using ublox UCenter and post processing using MATLab.  There is no reason that C code cannot be developed to do this in real time, although it probably requires too much processing power to add to an 8 bit autpilot.  Fortunately 32 bit hobbyist autopilots are becoming reality.  My method was really a reflection on my lack of time for this sort of project at present.  So, here is what I did:

  • I used the 6T module to collect raw carrier phase measurement data.  Tridge supplied a Python script to convert the ublox formatted file to a human readable file.  I did some further formatting on it and imported it into MATLab as a data structure.
  • I used the GPS broadcast Ephemeris to compute the position of all the GPS satellites for which there were measurements at each time epoch, and translated these positions into the ECEF coordinate frame.
  •  I differenced the computed ranges between adjacent epochs and set up a linearized least squares estimate of the receiver velocity using unit vectors in the directions from the receiver to the various satellites as a weighting matrix.  The final estimate can be translated into the ENU or NED navigation frame for use.

I thought that approach would work great, but it failed completely, and it took me a while to figure out why.  The reason is that although the receiver clock bias is not needed in a velocity solution like it is in a position least squares solution, the receiver clock drift rate is not insignificant for inexpensive modules like ublox and it completely messes up the velocity estimate if it is not accounted for in the sample to sample carrier phase change.  Simply put, the receiver clock is not only running at a somewhat incorrect frequency (the clock bias - which is an error in the pseudo-range measurements) but its frequency is moving around and the rate of change of the frequency shows up as a velocity error in the carrier phase measurements.  So, I modified my least squares estimation to estimate both the 3D velocity vector and the drift rate of the receiver clock.  This worked great.

Work left to do

Several things need to happen to move this forward.  First, I need to investigate how big a problem exists with the module not being able to maintain carrier phase lock on enough satellites and what conditions make that better/worse.  Second, the issues with running this in real time on a drone need to be hashed out.  I don't really know how processor intensive this code will be when optimized, but likely it will need to wait for the 32 bit processors as it is fairly math intensive.  Finally code needs to be developed as I did this all with MATLab and borrowed a lot of proprietary scripts from research associates…

A few more things if you are interested - Cycle slip, Integer ambiguities...

The reason that it is difficult to use carrier phase measurements in a position solution is because of the "Integer Ambiguity".  The Integer Ambiguity is the unknown number of full cycles of the carrier wave between the satellite and the receiver.  See the picture below.

3689489819?profile=original

Here we see a satellite in motion and the phase measurement at two times.  The carrier phase measurement gives us the number of "Counted Cycles", but we have no idea how many cycles are in the Ambuguity.  There are techniques available to resolve the ambiguity, but generally these take a very large amount of processing power, take a long time, and are difficult to implement for platforms with dynamic motion.  We can maintain a sum of the Counted Cycles and do a variety of things with it.  This is one method used in RTK in a lot of agricultural applications, etc.  But every time we loose carrier phase lock we have to discard the sum and start over.  This is termed cycle slip.

I mentioned that gps receivers have a harder time maintaining carrier phase lock than just tracking a satellite.  The tracking loops in a gps receiver are fairly complicated.  There are simultaneous loops tracking both the code delay and Doppler frequency for both the in-phase and quadrature channels.  These loops use a power measurement from the combined I and Q channels in their discriminator to maintain lock in these loops.  However the carrier phase lock generally has to rely on a single channel and has other challenges. This is too bad because it is commonplace for the receiver to be able to track between 8 and 10 satellites in an open sky.  However, my 2nd test showed as poor as only 75% of the time with 4+ satellites maintaining carrier phase lock.  This will be the critical factor to investigate to move forward.

 

Read more…
Developer

Annual Public Service Announcement

3689430827?profile=original

It is that time of the year when for many of us the furnaces have been turned on for the coming winter and the indoor air is getting dry, so it must be time for my annual ESD Public Service Announcement.

 

What is ESD?  Electrostatic Discharge!  That little spark you sometimes get when you touch a light switch or some other grounded object.  Electrostatic discharge is always an issue when working with electronic equipment, but is a particular problem during the winter months due to dry indoor air.  When low temperature outside air enters a building and is heated the relative humidity drops considerably.  Dry air conditions increase static charge buildup.

 

Why should you care?  Well, if you are working with APM (or any other unprotected electronics) and build a large static charge on your person, then transfer that charge to APM (which may (or may not) be signaled by your touching it being accompanied by a spark), that may cause damage to the autopilot.  The hardware multiplexor on APM1 is particularly susceptible to damage from ESD, but many other components can be damaged as well.

 

How can you avoid damage from ESD?  There are a variety of products and techniques that can help.  Best practices would include using an anti-static mat on your work surface and using a wrist strap to ground your body to the mat when working on APM.  However, simpler, lower cost things can help a lot.  Pay attention to what clothes you are wearing when working on APM.  You may want to remove your fleece jacket or wool sweater.  When I sit down to work with APM I try to momentarily ground myself when first sitting down at my bench to drain any accumulated charge I am carrying, and do so every time I leave and come back to the bench.  Also, there are a variety of household anti-static products that can be very effective in lowering the amount of static charge you pick up.  I use an aerosol anti-static product that will treat a room with a few seconds spray, and which will last several days.

This may be old news to many, but if not then developing a small amount of ESD paranoia and some good habits can save you from killing electronics on the bench.  Personally if I am going to ruin an autopilot I prefer to do it with a spectacular crash!

Read more…
Developer

Lemon-RX UART and PPM output

rx1-320x320.jpg

I have had a Lemon-RX (previously known as Orange-RX) DSM2 6-Channel Receiver (PPM + UART)

sitting around for a bit, and finally got around to hooking it up to my logic analyzer and checking it out today.  I was interested in this RX as an inexpensive option if you need PPM output and run Spektrum/JR gear.  I knew from the spec sheet that the channel resolution on the UART output was a bit coarse.  It runs DEC(66) ~ DEC(134) full scale, giving only 68 disrete levels.  The PPM output is a bit better with a minimum change of about 12 microseconds, so about 83 steps.  Bumping my TX endpoints up got it up to 100 steps.  So that is not great, but OK for drone use IMO.  The stability and jitter looked really quite good at around 1 microsecond.

 

This RX comes as a bare board with a 3x7 header and 3x2 header soldered on.  It is a bit longer than an AR6200 and a bit narrower.  Some careful work with a soldering iron should allow for removal of the headers and soldering in a 3 wire pigtail if all you need is PPM, leaving you with a very thin package.

 

I have not done any range testing, but my expectation is that it should be similar to a real AR6200 as they are using the Cypress RF chipset.  Seems like a pretty good PPM option for only US$ 15.30 (plus shipping of course).

Read more…
Developer

A feature frequently requested is to add support to ArduPlane for using sonar to control the landing flare.The answer, unfortunately, is probably no.  Take a look at this graph I obtained yesterday...

3689443157?profile=original

This has been on my to-do list for ages as I have never gotten around to getting some real world data to see if this would work.  Finally got the real world data yesterday with the Maxbotix XL-EZ1 mounted in a SkyFun.

The graph shows data logged on a flight with 6 low passes using APM2 and the MaxBotix .  The standard ArduPlane/ArduCopter sonar library was used, including the 6 element mode filter (as recommended by MaxBotix.  The terrain over which the flight was flown was middle of the road in terms of difficulty for the sensor (in my estimation) being open arid prairie, with scattered clumps of low prairie grass   Based on the actual low passes the "good" altitude estimates (bottoms of the troughs) by the sonar were probably better than the equivalent altitude estimates by the baro sensor.  Unfortunately, as can be seen, when moving over the ground with significant speed the sonar fails to maintain a clean estimate of the altitude, even with the mode filter.

Of particular concern would be occasions such as during the second, fourth, and sixth pass, where the sonar suddenly reports a much higher altitude than actual.  If using sonar for flare control, this would likely result in a pitch down, with bad results.

Certainly under good conditions the sonar could be used for flare control, but it does not appear to give a robust enough estimate of altitude to be useful for general use.

Read more…
Developer

Annual Public Service Announcement

3689430827?profile=originalWe have had our first snow storm here in Colorado, and the furnaces are definitely running, so it seems like a good time for my annual ESD Public Service Announcement.

 

What is ESD?  Electrostatic Discharge!  That little spark you sometimes get when you touch a light switch or some other grounded object.  Electrostatic discharge is always an issue when working with electronic equipment, but is a particular problem during the winter months due to dry indoor air.  When low temperature outside air enters a building and is heated the relative humidity drops considerably.  Dry air conditions increase static charge buildup.

 

Why should you care?  Well, if you are working with APM and build a large static charge on your person, then transfer that charge to APM (which may (or may not) be signaled by your touching it being accompanied by a spark), that may cause damage to the autopilot.  The hardware multiplexor on APM is particularly susceptible to damage from ESD, but many other components can be damaged as well.

 

How can you avoid damage from ESD?  There are a variety of products and techniques that can help.  Best practices would include using an anti-static mat on your work surface and using a wrist strap to ground your body to the mat when working on APM.  However, simpler, lower cost things can help a lot.  Pay attention to what clothes you are wearing when working on APM.  You may want to remove your fleece jacket or wool sweater.  When I sit down to work with APM I try to momentarily ground myself when first sitting down at my bench to drain any accumulated charge I am carrying, and do so every time I leave and come back to the bench.  Also, there are a variety of household anti-static products that can be very effective in lowering the amount of static charge you pick up.  I use an aerosol anti-static product that will treat a room with a few seconds spray, and which will last several days.

 

Like they say - "An ounce of prevention...."

Read more…
Developer

Test flight using new Auto Flap feature

I had an excellent test flight with the new Auto Flap feature this morning.

 

3689427089?profile=original

 

This picture is the end of a fully autonomous flight.  Sorry, I should have had video running....  It is impressive that the Skywalker is sitting within about a meter of the center of the runway.  However, what is really cool about this landing is that there was a 10-15 mph (5-7 m/s) tailwind.  The decent rate of the Skywalker is pretty slow without flaps, making precision landing difficult.  With a tailwind the glide angle would be very flat and in this case the landing would have probably gone very long, landing perhaps 100 meters past this point.  However, with the automatic flap deployment ArduPlane did a very good job of getting the plane down and stopped close to the programmed landing point. 

 

To help everyone interested use this feature I have added a wiki page about it.  You can find that here:

http://code.google.com/p/ardupilot-mega/wiki/Flaps

 

Read more…
Developer

3689421878?profile=original

 

I have uploaded a new revision of APM to the trunk repository (r3665) with automatic flap functionality. I am really pressed for time so am hoping some community members can do some flight testing on it and report back.

 

Flap functionality can be assigned to channel 5 or 6, using the rc_5_funct and rc_6_funct parameters (similar to setting up differential ailerons).  The value to assign for automatic flaps is RC_6_FUNCT_FLAP_AUTO (in your config file) or 2 in the GCS parameter.

 

Flaps will function manually in flight modes of MANUAL through FLY_BY_WIRE_B, and will be set automatically for flight modes of FLY_BY_WIRE_C and higher.  If you want to know what FLY_BY_WIRE_C is, you'll have to wait a couple more days ;)

 

Automatic flap deployment is based on desired speed.  Desired speed is the current value of airspeed_cruise, which can be set with mission commands, or on the fly by changing the parameter value.  If you do not have an airspeed sensor flap deployment is based on the current value of throttle_cruise.  Four parameters have been added that can be set through your configuration file or through the ground station with MAVLink.  These are two speed values and two flap positions.  If the speed setpoint is above flap_1_speed then the flap position will be 0%.  If the speed setpoint is between flap_1_speed and flap_2_speed then the flap position shall be flap_1_percent.  If the speed setpoint is below flap_2_speed then the flap position shall be flap_2_percent.

 

The flap range is set up with the normal radio calibration procedure.  A flap value of 0% corresponds to the minimum value on the flap channel and a flap value of 100% corresponds to the maximum value on the flap channel.

 

Modest flap deployment should be useful for AP applications where you need to fly at a slow speed.  Higher flap deployment will be useful for even slower airspeeds with increased descent rates for landing approaches.

 

Have fun with it and please let me know how it goes.

 

 

Read more…
Developer

APM now supports Differential Ailerons


3689421013?profile=original
Sometimes APM development goes fast, and sometimes it goes like molasses in winter. After being asked repeatedly (over many months - sorry) I have finally gotten support for multiple aileron channels in place. You can use this if you want to set your airframe up with differential ailerons or if you have separate servos on your ailerons and they don't move opposite directions for a given input.

 

The big delay with this change was coordinating the way we would use channels 5-8 for a variety of purposes.  Functionality is coming for flaps, camera mounts and more.

 

Here are the things to know about using the new dual aileron functionality:

  1. I have tested this on the bench, but have not flight tested it.  I do not expect any problem, but as always with new functionality exercise some caution.
  2. The functionality is in the current version of the code in the repo (trunk).
  3. You can set up the second aileron on either channel 5 or 6.  Remember that it does not matter which channel it is on your receiver.  Just take that receiver output and hook it up to 5 or 6.
  4. For that channel (5 or 6) you will need to set a new parameter.  For channel 5 it is rc_5_funct.  You can set this as a parameter through a GCS like APM Planner, or you can set it using a #define in your config file.  If you set it in your config file use #define RC_5_FUNCT RC_5_FUNCT_AILERON.  If you set it through the GCS set rc_5_funct to a value of 1.
  5. If you want to use differential aileron travel program your radio so that it works as you desire in manual mode.
  6. You will need to redo your radio calibration.   I do not know if APM Planner properly supports calibration of channels 5 and 6, but I will drop Mike O an email about it and I'm sure if it does not now, it will very soon.  The CLI procedure does work fine.
  7. You cannot set the reversing for the 2nd aileron channel with the dip switches (as there is not one available for this).  So, it is highly recommended that you disable the dip switches and set up your reversing using the parameters.  Remember that if you are working with the raw parameter values reversing is 1 or -1.

 

Read more…
Developer

Here is a video clip from Paul Mather and my last minute entry into the SparkFun Autonomous Vehicle Competition.



The day before the competition I realized that the DIYDrones community had an unused entry into the competition and I had a second UAV ready to go, so I recruited Paul Mather as a teammate and we became team "Plan B", flying a SkyWalker with ArduPilotMega. It was quite windy and gusty as you can see. This is the conclusion of the first round flight, conducted 100% autonomously, which would have scored well. The plane was getting blown around badly on final approach, but would have made it around the pine tree and right into the landing zone had it not been for impact with the light pole visible around 0:15 :(

Some other details from the event: I believe that Paul and I, and Chris Anderson, were the only competitors flying APM powered planes - Paul and I had two teams, one with the SkyWalker and another with a SkyFun. Wind was a problem for the Skywalker. It certainly could have flown much better, but we were flying it pretty slow (ranging from 15 to 9 m/s) due to the small course and small landing area. The first run we clipped the light pole as shown in the video which was heartbreaking because it could have been a 100% autonomous landing into the very small landing zone on a windy day. On the second run the SkyWalker went into the pine tree that shows so prominently in the video and lodged very high. Fortunately a brave Sparkfun employee climbed up and dislodged it. It was no longer pretty after two crashes, but tape and lots of CA glue got it airworthy. On its third run we skipped the auto landing and got it on the ground quick enough after crossing the finish line to secure 2nd place.

The SkyFun performed great, but with all the pressure and chaos of the event I accidentally messed up the mission planning for two of the three runs and had it trying to climb over 1500 meters. Confusing absolute and relative altitudes in Colorado makes a big difference. That was embarrassing. The one successful run was really fun. We used a catapult launcher that was actually controlled by APM - having APM control the catapult was necessary to qualify for the autonomous takeoff bonus. A quick release connector on the back of the SkyFun was connected to a cable on the catapult controlling the release mechanism. After the release was triggered APM sensed the high acceleration of the catapult and as soon as the acceleration stopped APM fired up the motor. It worked flawlessly all three rounds. Unfortunately, on the one fully successful flight (100% auto from catapult launch through landing) the wind shifted around and we had a tailwind for the landing. A SkyFun with a tailwind will only come down so fast, and we glided past the landing zone and didn't get the big bonus.

 

Many thanks to Paul, and to my brother David, for all they did!  They both just made things happen.

Read more…
Developer


OK - After working with a small group of Alpha testers, I guess we are ready to open the flood gates and make a public release of ArduPilotMega!


Here is what you need to know:

  • This is an Alpha release - expect there to be bugs. If you don't want to deal with bugs, wait for the Beta. There will still be bugs in the Beta (probably), but a lot less.
  • For the Alpha release we will NOT be providing a .zip download. The code will be changing frequently as we find and fix bugs. You should use a SVN client to get the most recent revision to the code. Look below for a mini tutorial. If you don't want to mess with SVN, please wait for the Beta release.
  • Read the ArduPilot Mega manual. It is located here. Expect the manual to change on a daily basis. Recheck it frequently.
  • Please understand that there is a HUGE amount of functionality in ArduPilotMega. Most of it is still untested in actual flight, and some specific commands are not fully implemented.
  • We have made extensive use of libraries. You must either add these to your Arduino install or we would recommend using the great new "Sketchbook checkout" put together by Michael Smith which will handle getting the libraries for you and keeping them current. See the SVN mini tutorial below.
  • There is some functionality in place for the Legacy ground station. There is also functionality in place for the new ground station, however the new ground station is not ready yet.
What has been tested successfully? We have tested the basic flight modes (Manual, Stabilize, Fly By Wire, Auto) and the basic commands (Navigate to Waypoint, Loiter commands, and RTL)

What has not been tested:

  • Airspeed Sensor and associated control laws
  • Magnetometer
  • NMEA
  • Most of the commands
  • Use of many of the options in the config file
How can you help? If you feel you are up to Alpha testing, then join in. We are taking bug reports through the Google code repository "Issues" feature. You can find that here.

Good luck and happy autonomous flying!




Mini SVN Tutorial
This is a quick tutorial on how to use Tortise SVN to download the ArduPilotMega code using the "Sketchbook checkout" and how to keep your copy up to date.
  • Install the TortiseSVN client on your PC. Get it here.
  • On your PC open a window for the directory into which you would like to store your local copy of the code. Right click in the window and choose SVN Checkout.
  • Fill in the URL of repository with: http://ardupilot-mega.googlecode.com/svn/Sketchbook/trunk/
  • The checkout directory field should contain a folder name of the folder you are in appended with \Sketchbook
  • Click OK. This step downloads all the firmware and library files you will need. If you have a slow connection this step can be glitchy. If you get an error that one or more libraries you can use the SVN update feature to correct this after the checkout completes.
  • You should now have a Sketchbook folder which contains folders for ArduPilotMega, libraries, and Tests.
  • Open the Arduino IDE. Go to Preferences in the File menu. Change the Sketchbook location to this new Sketchbook folder. Now choose Sketchbook from the File menu and choose ArduPilotMega.
  • You are now ready to compile the latest code.
  • To update your local working copy to the latest revision, go to the directory containing your Sketchbook folder, right click on the Sketchbook folder, and choose SVN Update. With this one step you will get the latest code for ArduPilotMega and all the libraries downloaded to your PC.
Read more…
Developer

ArduPilot Mega v1.0 Alpha 1 release

The ArduPilot Mega development team is pleased to announce the public release of ArduPilot Mega v1.0 Alpha 1 test firmware. It is located here


If you are ready please feel free to test the code. The best place to start is with the manual which is located here

Please note
  1. There are libraries that you will need to install in your Arduino IDE for this firmware to work.
  2. This code is under development so there are lots of holes. Currently it supports MANUAL, STABILIZE, FLY_BY_WIRE_A, AUTO, RTL, and LOITER flight modes, a small number of a larger set of commands that will be implemented, and on board data logging. Currently it does not support any gps other than ublox, absolute or differential (airspeed) pressure sensors, magnetometer, battery voltage measurement, telemetry or uplink (some downlink available through Serial0), take-off or landing, and a bunch of other stuff
  3. The code is not compatible with the ArduPilot configuration tool. There is a waypoint (command) writer tool available in the tools directory of the repository, but no documentation available yet.
  4. The code is not currently compatible with the ground station.
We have successfully tested all flight modes. However this is an alpha release of code still under development. If you are expecting to just download it and have everything work, you are jumping on board too early. If you want to start learning about setting a UAV up with this system and learning about the features and options of the code then give it a go!
Read more…
Developer
Progress report: The ArduPilot Mega v1.0 firmware has reached a flyable state!


There is a lot of work left to do before v1.0 is ready for its beta release, but things are progressing. At present STABILIZE and FLY_BY_WIRE_A are working well. Full 4 channel control has been implemented. On board data logging is really making me smile.

Jason Short and I are working closely together and working through the navigation parts of the code. This will probably take just a little longer than just one of us ironing it out, but will result in a better end result. The big change is that we are changing from an architecture that supports a navigating a series of waypoints to an architecture that supports executing a series of commands. This turns out to be a little more complicated than expected, but will allow for much more refined mission scripting.

WE NEED YOU: If you would make a good alpha tester we could really use your help. Both Jason and I have some limitations that won't allow us to test fly nearly as often as we would like. I will probably only be able to test fly 2-3 times in the next 3 weeks. Alpha testers need to work closely with us to test out particular functionality and feed data back to us. If you are interested please PM me!!

We hope to have a beta release by the end of July. If you are using the code prior to the beta release you can expect to find that the code in the repository is changing frequently and from one day to the next there may be sweeping changes.
Read more…
Developer

Sparkfun announces new robotics competition.

Sparkfun has announced a new robotics competition - ANTIMOV.

antimov-2b.jpg

We want you to build a robot that completes a trivial task in the most inefficient and laborious way possible. Oh yeah, it needs to destroy itself doing so. Intrigued? We thought so!

Any suggestions on what the most trivial task a UAV could perform in a laborious way is! As I demonstrated at Sparkfun's AVC this year getting a AUV to destroy itself is a simple task - LOL.
Read more…
Developer

Team "Death by Pine Tree" renamed (again)

Following on with Chris' humerous submission today, and the bit of storytelling we have been enjoying in recent blog posts, I figured I'd post my latest tale of woe. Hopefully you will find it entertaining!

So, this past Saturday I competed in the SparkFun Autonomous Vehicle Competition using an ArduPilot with 2.6 firmware and ArduIMU. My airframe was the SkyFun from HobbyCity.

A few days before the competition SparkFun sent out an email saying I must submit a "team name". At the time I was in a bit of a panic because I was rebuilding my UAV from a crash suffered a few days earlier. While working on autonomous landing I discovered I had not planned my final waypoint very well and hit a pine tree. So, I told SparkFun that I was Team Death by Pine Tree! I glued the 2 halves of the fuselage together and continued on.

Friday, Ryan Beall was in town and we were sitting around and just couldn't stop ourselveds from trying to make 1 FINAL IMPROVEMENT.... I was not entirely happy with my altitude hold. It was tight enough for regular flying around, but not as tight as I wanted for doing auto landings. Ryan said (see how I try to give him part of the blame ;) ) lets just work through the math and see if the gain values make sense. So we did - and concluded the gain on the altitude error was way to low. We boosted it by a factor of 20. Does something smell fishy here. Of course when I worked through the math I forgot that I should be using altitude error in centimeters, not meters, so we had made the gain far too high. This caused a huge pitch oscillation that ended in a very spectacular sounding crash into a Maple tree. Time to call SparkFun and change the team name? Team Death by Maple Tree? This time the airframe was too far gone so I pulled all the electronics out and put them in my backup SkyFun.

Saturday was the big day. My UAV was flying great, with the fastest lap times by far, but I was too chicken to try auto landing the first 2 rounds. The final round came and I figured it was now or never. Mentally prepared for whatever auto land might bring out I saw my UAV inexplicably ignore the bits of code telling it to slow down at waypoint 9 and cut the throttle at waypoint 16. Instead it just kept ripping around and starting over at waypoint 1. SparkFun had assigned a 15 second deduction for auto landing and a 30 second deduction for auto landing with the UAV coming to rest inside a roughly 10 by 20 meter area. I asked the judge standing next to me "If I do nothing and the UAV arrives on the ground, then that is an auto landing and good for 15 seconds, right?" He looked a bit perplexed and said "well, yeah...". OK I thought, low voltage cut-off here we come. And a few minutes later it did come, followed by a nice little crash into an adjacent parking lot. The SparkFun band picked up on that immediately and began singing about Death by QualComm Parking Lot. On Monday I glued the 4 pieces of the fuselage back together.

Peter Hollands has been stuck here in Colorado since the SparkFun competition due to the Iceland volcano eruption and cancelled flights. He emailed me about getting together and I told him that today I would be taking the UAV to show to the local high school robotics club. He was quite happy to come along. We met a great group of kids and had fun talking with them about all kinds of robotics and UAVs and Arduino stuff, etc. Then we went outside for a demonstration. The high school has a lot of athletic fields, but the track team was using the football field, the soccer fields were all in use, as were 2 of the 3 baseball diamonds. With only 1 choice we headed to the open baseball diamond. I looked it over and said I was a bit nervous about the poles and fences so I told the kids they would have to settle for manual take-off and landing. But we had a pretty good demonstation. Then it was time to land. The first pass it was apparent early that I would float too far and hit the outfield fence, so I went around. The second pass was better, but still too high. For the third pass I figured I would come in nice and low over the outfield fence on the first base side and head towards the other corner of the outfield. All I had to do was steer around the foul line pole. Peter said "your going to hit the pole". "No," I said, "I see it". Then whack!

Tomorrow I will glue the pieces together again......

Team "Death by Foul Line Pole" just doesn't sound quite right.

Read more…
Developer

Altitude sensing - Ublox versus SCP1000

I got a SCP1000 absolute pressure sensor and have been looking at the relative performance versus ublox.


Here is the data from my first flight test - ublox is blue, scp1000 is pink. The data was taken while manually flying a SkyFun "pusher jet" in somewhat gusty wind conditions.


There are several things that stand out to me. First is that the scp data is a lot "noisier". Does this actually represent the movement of the aircraft? Perhaps. I cannot really say after this one test.


Second is that the ublox appears to lag badly during fast descents. Seems to keep up going up, but not so much coming down. I suspect this has something to do with the ublox filtering algorithm.


The third thing I see, about which I am the most curious, is that something produced some kind of offset to the pressure at the beginning and end of the flight. If you look closely at the beginning of the graph, you can see that the pressure altitude starts at the same value as the gps altitude (by definition in the software). However, while still on the ground, something causes the pressure altitude to jump down about 22 meters. It bounces back and forth for one period before takeoff. Then at the end of the flight, you can see that the landing altitude is about 22 meters below actual, but then something happens on the ground that causes it to bounce back up around the correct value. This is a real problem. My only theory so far is that putting the canopy on may be trapping some small amount of pressure. However, if this were the case I don't know how the sensor would have the relative level of accuracy it does during the flight. The effect does not appear to be related to airspeed, as the changes noted at the beginning and end were while not in motion.


I also noted that except for the bottom of the "second valley", the effect I noted above, if it is coming and going, could produce the "noise" seen in the pressure altitude. You can see that the peaks of the "noise" correspond fairly well with the gps altitude for much of the flight.


I welcome all thought and comments.....


Read more…
Developer

ArduPilot 2.5.1 alpha test video

I have been busily testing ArduPilot 2.5.1 with ArduIMU and correcting bugs in the basic functionality. I now have all MODEs working well in my primary airframe configuration and will now work on verifying other configurations (radio types, shield versions, thermopiles, etc.)


If you want to help test climb aboard. There is an active thread in the Forum.

Read more…
Developer
Poll - how do you want FBW to work?

Jason Short came up with a great flight mode, FLY BY WIRE, in ArduPilot 2.5. This mode differs from STABILIZE. In STABILIZE the autopilot constantly tries to return the plane to 0 pitch and roll, while you give stick inputs that tell the plane to do something else. It feels a bit like you are arm wrestling against the autopilot sometimes. With FLY BY WIRE if you move the right(*) stick half way to the right then the plane will bank half of the maximum amount defined. As long as you hold that stick position the plane will hold that bank. If you center the stick, the plane will go to zero bank.

* - All references to right stick assume a mode 2 RC setup where the right stick controls pitch and roll.

That is all great! You are not arm wrestling the autopilot. You are telling it what roll you want and it is giving you exactly that roll.

But what about throttle and elevator? Jason had a scheme where if you moved the right stick then you would get both a pitch and throttle response. In 2.5.1 I have been trying an alternate scheme involving both pitch and throttle increasing or decreasing together. I am convinced that these schemes are not the best. But what is? It really comes down to user preference.

I think the two best alternatives are:
  1. Have the throttle remain under manual control and have the right stick up and down control pitch angle. This setup is great for tuning your servo PID gains (both roll and pitch), and is a really fun way to fly.
  2. Have the elevator maintain a constant airspeed and have moving the right stick up and down increase or decrease throttle from a cruising throttle. This setup is probably the ideal setup for new pilots. You can hand the transmitter to anyone and they can fly. Can't stall because airspeed is controlled. Want to turn, move the stick to the side. Want to go up or down, move the stick up or down. Of course they still have to deal with what up and down is and what left and right are while coming and going, but if you let go the plane will always take care of itself.
What do you think is best??? Maybe something else?

I can't seem to get the poll to embed - please go here

Read more…