Groundhog Autonomous UAV – Going faster with sunglasses

The Groundhog is being developed to line-follow at low altitude and higher speeds.  This video is of the field testing taking the speed up to 1.75 m/s.  It also explains why the Groundhog now sports sunglasses.

The Track

An oval of 50mm red webbing, bends of radius approx 3m and straights of approx 15m. Testing took place in early morning with glancing sunlight on dew-soaked webbing – great for walking the dog but not so good for computer-vision.

On-board at 1.75 m/s

Image recognition is by OpenCV on a Raspberry Pi 3 as explained in previous blogs.

Image Processing

Frame rates of over 40 fps are achieved by:

  1. Capturing and processing images in a separate thread;
  2. Processing only two roaming regions of interest as shown by the blue bands above;
  3. Using trigonometry to calculate bearings instead of image transformations.

The reality is that the PiCam is only delivering 30fps, so many frames get processed twice.

Flight Control

The position and bearing of the line is calculated in NED space from the orientation of the UAV and pitch of the camera.  A velocity vector is calculated to partly follow the line and also to ‘crab’ over it.  The velocity vector is sent to the Pixhawk via Dronekit, set to a fixed magnitude.  The Pixhawk is running Arducopter in Guided flight mode.  In these videos, the velocity is set at 1 m/s,  1.2 m/s, 1.4 ms and finally 1.75 m/s.

Performance

  1. Line following was reliable at all velocities up to 1.4 m/s at an altitude of 2m.
  2. The polaroid filter was effective at cutting out much surface reflection, permitting better performance when flying into the sun.
  3. At 1.75 m/s and 2m altitude, lock was lost occasionally when turning into the sun. This was due to more of the line passing out of the field of view and the challenging conditions due to surface reflection.  This is clearly seen from the on-board video above.
  4. Raising the altitude to 3m increased the field of view and allowed for reliable lapping of the track, even at 1.75 m/s.  However, the intention is to fly lower, not higher!
  5. A separate yaw test (full lock in loiter) indicated that despite being 3Kg, the maximum rate of rotation was not a limiting factor to following the track at higher speeds.

What Next?

To get lower and faster, we need to find a way to keep the track in the field of view. Some possibilities are:

  1. Use yaw more aggressively;
  2. Use a wide angle lens.

So back to the drawing board, but in the next field test maybe we’ll target velocity of 2m/s at 1.5m altitude – so faster and lower.

Advertisements

Groundhog UAV curved line following

groundhogcurve
Part of a series of videos and blogs tracking the development of The Groundhog, which was entered into the MAAXX Europe 2017 competition earlier this year.
Having successfully tested the re-written code to follow straight lines using velocity vectors for control and NED space mapping for line detection, we test it around a 50m track comprising 50mm wide red webbing – and we speed it up a bit as well.

The test turned out to be quite successful, with following speeds of 1.5m/s achieved under autonomous control provided by an on-board Raspberry Pi 3.  This is significantly faster than the winning UAV in MAAXX Europe this year, which is quite pleasing!

The YouTube video shows both on-board and off-board camera footage, the former demonstrating the roaming regions of interest used by OpenCV to maintain a lock under varying lighting conditions.

 

Whilst the test was successful, there remain significant barriers to the higher-speed, lower level flight that I want to achieve.

  1. Currently, altitude sensing is by barometer only, the accuracy of which is clearly limiting at low altitudes.  I’m going to introduce a sonar in the first instance to give programmatic altitude control, adjustable in-flight by a pot on the transmitter.
  2. Surface reflection ‘white-out’ of the line.  These cause the range at which the line can be reliably spotted to be considerably reduced.  A higher speeds, a forward looking camera is essential, however this also means the higher angles of incident light make it prone to surface reflection from the line which cause it to appear white.  There are a number of physical and programmatic changes that can be made to take account of this.
  3. Manoeuvrability.  At 3Kg, the Groundhog only turns so fast.  If the line curves faster than it can turn, the lock is lost.  Again, several solutions here, but the Groundhog is not just following a line, it is plotting it out in NED space.  This means it should be able to learn where the line should be.  I think that’s enough of a clue…