Autonomous Autopilot, Almost

So the autopilot is now full autonomous, able to direct the main motion processor between various intermediate GPS waypoints to the final destination.  It will soft-abort flights via a controlled immediate landing if objects are in the way, the number of ‘visible’ satellites drops below a safety limit, or at the end of the flight.

Or it would if my GPS receiver / the weather would behave.  It’s only ever got 11 satellites max, and today it was struggling to keep 8.  Roughly 10 seems to be the acceptable lower limit my Mavic will accept for GPS control and today, it had no problem finding 11+.  Hermione on the other hand could only see 8 at the highest and this often drops mid-flight.  Without a constant set of satellites the position drifts – I’ve seen 40+m errors today.  Luckily I have code to abort a flight if the number of satellites drops below the minimum, and that’s what I’ve seen; in addition, the GPS is used to produce the direction of travel, but not the speed which is fixed at a gentle 0.3m/s to allow the down-facing video to track lateral motion accurately.

Here’s the GPS data I got for my standard 2m square flight; as you can see the return to base which in real life was very accurate, was 4m out by GPS’ account:

GPS accuracy & resolution

GPS accuracy & resolution

So I need the skies to clear and ideally to find a better GPS receiver, and herein lies the problem: I’m off to Disney Land, Paris next week.  Sod’s law says GPS conditions will be perfect here in England next week!


P.S. Just found myself a USB receiver that covers both GPS and GLONASS. GPS is USA owned and has 31 satellites; GLONASS is the Russian equivalent with 24 satellites; hopefully together I’ll be able to get much higher number of satellites, and hence much more accuracy as a result. Sadly, the proof of this pudding will only happen after a week of Disney junk-food eating. 🙁

HEXO+

I just got an e-mail about this autonomous quadcopter.

What’s interesting to me is how it works; it’s controlled by a smartphone app which has a set of pre-defined types of flight – a more complex version of Phoebe’s flight plan. My suspicion is that the drone has basic stability motion processing based upon angles and quadframe Z-axis velocity, but it also shares its sensor data, critically its GPS positions back to the smartphone. The smartphone has another set of motion processing ‘PIDs’: by comparing its own and the drones GPS coordinates, the smartphone app gets a relative position of drone; this ‘input’, when compared to the preconfigured flight style ‘target’ produces a new ‘output’ to send back to the drone for its own processing – essentially another set of PIDs based in the smartphone to supply a new set of targets into the drone’s PIDs.

It’s not that different from this:


In both cases, instead of a human pilot, they have an external computer of some sort which can ‘see’ the drone’s relative position to itself, whether that’s GPS on the drone wrt the smartphone GPS or the shiny balls wrt the cameras. This relative position controls the drones behaviour based on a simple set of flight rules settings.

And to me, it’s a confidence boost: what I’m trying to do with Phoebe is quite different from these autonomous solutions as she has no external control computer, and why I’ve been finding so hard to get her to behave safely.

My aversion to more sensors

The PC World mention, along with some recent comments got me thinking about why I lack interest in adding an altimeter / magnetometer / GPS / remote control to HoG.  After all, it’s the obvious next step.

I have the sensors already, and none of the above would add much in the way of overheads to the code processing – perhaps only 1Hz polls of the GPS, compass and altimeter fused with the existing data from the accelerometer and gyro about orientation, direction and speed feeding into the existing flight targets.  All relatively straightforward.

Autonomy vs. remote control was purely a personal decision based upon my ineptness at controlling machines with joysticks.  I stopped computer gaming with Half-Life2 2 when I was within seconds of the end and yet  lacked the hand-eye coordination to win that final battle to stop the launch of the missile / rocket / bomb.

It’s a combination of time and testing that is the biggest problem.  Up to now, all testing happens in the back garden – it now takes me less than 5 minutes to run a flight, and get back indoors to analyze the diagnostics.  Even when the weather is terrible, those 5 minute slots exist virtually every day.  But with GPS movement tracking resolution of 10m, the garden is nowhere near big enough to test autonomous path tracking – just too many high stone walls to crash into.  I could move testing to the village play park a hundred meters down the road, but it’s called a kids play park for a good reason.  I could move into the fields a couple of hundred meters away, but that’s just far enough away that time steps in – to-ing and fro-ing between the fields and the “engineering lab” (home office) would just be too inefficient for the limited time available due to a full-time job and two kids under 7.  Oh, and the farmers probably wouldn’t appreciate HoG scything down their crops or sheering their sheep!

So I settled on short term autonomous flights within the bounds of the back garden.

Having said all that, I’m off to the kids’ play park tomorrow during school time just to see how long HoG can maintain a stable hover with limited drift, and perhaps add some horizontal movement to her flight plan if all goes well.  Weather forecast is good, sunshine and only a gentle breeze so hopefully I’ll be able to get a longer video of what she can do!

Forget DIY, go Zano!

Zano is everything I want from Phoebe and so much more…

  • accelerometer
  • gyroscope
  • magnetometer / compass
  • barometer / altimeter
  • PIR motion detector
  • Ultrasonic range finder
  • GPS
  • Camera

all fused to make an autonomous, teeny, tiny absolutely brilliant quadcopter for the price I’ve spent on replacement blades since Christmas!

Even more amazingly, they’ve got 10 times their pledge target of £125,000 and there’s still 8 days to go.  If I hadn’t spent so much on replacement props this last week, I’d have got one – go for it!