Infrared beacon guidance for the arducopter

Following Leon's great blog post showing the use of a camera from a WII remote as a 3D position sensor for his helicopter, I've been tinkering and now have a Wii remote camera working as a sensor on my Arducopter. Thanks to Chris for encouraging me to blog this work that was previously described in the forums

Why bother
Currently the only sensor we have that tells us where we are relative to something else in our environment is the sonar. Some of the other sensors tell us where we are relative to a theoretical datum (eg GPS), or a variable datum (eg air pressure) these could both see you trying to land your aircraft below ground or off in a tree somewhere if your unlucky. The accelerometers tell us how we are oriented relative to gravity but nothing about where we are. The gyros tell us how we are moving. The recent work on optical flow which senses the surroundings also tells us how the aircraft is moving but not where it is.

My hypothesis is that a combination of an optical sensor such as the wii camera and ground based beacons could be used for accurate relative position determination to allow for precision navigation. This could be useful for landings, take offs, indoor navigation and loitering without GPS.

The Theory
The Wii Camera can track up to four infra red blobs. By sensing the location of a set of predefined IR beacons we can, through simple trigonometry, determine our height above the beacons, our displacement from the beacons and our rotation (yaw) relative to the beacons. This information could then be used to control the navigation algorithms to control the aurducopter. An example, would be to a precise landing on a 'helipad'.

Something similar to this has been done before by the University of Tubingen - have a look at their video

The Wii camera has its limitations.

  • You have to sacrifice a Wii remote to obtain one - there is no known alternative source for the camera - mine cost $1.99 on ebay.
  • The Field of View is quite narrow (+/- 20 deg). Leon has hot glued a small lens on his camera to get a wider field of view.
  • The camera has an I2C interface - great - at 3 volts - not so great. It also needs a 24Mhz clock signal - all do-able with off the shelf components.

The calculations required to determine position from camera data are relatively simple - less complex than the optical flow calculations by the look of them.



The results
I've mounted a wii camera to my arducopter, created an arduino library to communicate with it, modified the arducopter code to work with it and done some test flying. The test flying so far is "hand flying" (with and without motors running) as the back yard is too small for free flight and it was getting late.

The "flights" are above a simple IR target that is just two IR leds approx 15cm apart. (Cost per target is less than a dollar). I've logged Sonar, Baro and Wii camera altitudes. Here is the graph of the three altitude/range sensors - click for a bigger view

The blue line is the Wii sensor output - note when the algorithm can't see both the target leds it outputs a zero value. The only "calibration" required is to know the distance between the target LEDs.  - in theory this could be eliminated if you used sonar range to 'calibrate' the target when you first see it.

The correlation between sonar and IR ranging is pretty darn good! In fact one could argue that - in this very limited test - the sonar shows noise (probably due to the BBQ cover flapping in the AC down wash) while the Wii altitude is either rock steady or nil.

The code also calculates x/y displacement from a position vertically above the target in millimetres and rotation (yaw) relative to the target. I'm not using any of this just yet.

I need to do some further work to cope with aircraft roll and pitch effects (currently the code assumes the aircraft is always level) I assume I can use the optical flow code as an example of how to sort this out.

Next steps for me
* free flying and Alt-hold tests
* clean up the code
* have a look at modifying loiter to use the targets
* find and use a lens to get a wider field of view
* come up with an precision guidance to landing concept and convince someone to help me code it

 

What do you think?

I'm keen to hear what people think of this type of sensor being used with arducopters.

Is it useful? How could you use it?

A couple of outside the box ideas to kick you off:

1) fit the aircraft with an IR illuminator (from a security camera) and use IR reflective markers on the ground.

2) get the aircraft to carry IR beacons and drop them when it wants to loiter for precision loiter ability. Or drop a trail of cheap beacons Hansel and Gretel style to find its way 'home' without GPS

 

APM_WiiCamera.zip

Views: 9407


Moderator
Comment by Michael Pursifull on September 26, 2011 at 5:35am

Outstanding, I am still in the planning phases of an automated charging station, and this is a stellar solution to one of the central challenges. Autonomous robots are never really autonomous until they can "refuel" without human interaction, and this is one of my goals. I envision, using some other plans, of allowing one or more multicopters to communicate with the terrestrial GPS-enabled charging platforms, determine if they are "open for use" or "in use", to land, and to negotiate a circuit test and pass security/verification codes to one another before they each use relays to cut over power for the APM and connect the battery to the charger and initiate charging. 

 

The level of precision required for the design I hope to use was always going to take me back to early light/line style robotic guidance systems, rather than the large-pad style chargers I have seen at some labs, in part because I have a mind to construct a covered hanger for the quads so that they can "come in out of the weather" for their refueling.

 

Very nice option, thank you for sharing!

Comment by Kurbads Alkans on September 26, 2011 at 6:13am

I was thinking about it also. the only problem i see is sun reflections.

Comment by Andrew Radford on September 26, 2011 at 7:36am

At the very least this could be used as a landing pad marker.

 

Can the geometry be scaled up somehow so that a deployment of IR becaons on the ground could create a 'precision hover zone' that extends several 10s of meters?

Comment by Chad P on September 26, 2011 at 9:05am

Great work.  I love it for precision landings!  You could also use it for tracking objects of interest.  Say I want to video myself riding my dirt bike through a track...just put an IR beacon on the fender.  AWESOME!  Please keep up the good work.

Comment by Lars Johansson on September 26, 2011 at 1:38pm

Amazing, as Chad I would love to see trackig based on a (set of) beacons on an object! Well done and congrats on the progress so far!


100KM
Comment by u4eake on September 26, 2011 at 4:16pm

This is mighty interesting !  I think I found my next modification to my copter :-)


Developer
Comment by Randy on September 26, 2011 at 8:40pm

Re the lenses and lens mounts.  An M12x0.5 lens mount is the standard and you can get both these and a collection of lenses from peauproductions.

     http://peauproductions.com/store/index.php?main_page=product_info&a...

     http://peauproductions.com/store/index.php?main_page=product_info&a...

The cost of the lens mounts are close to highway robbery but the lenses themselves aren't too bad.

 

I guess the accuracy will go down if you make the the lens too wide but presumably there will be some middle ground that works best.

 

Please tell me if you'd like any help with coming up with a 3d printed case (including the lens mount).  I'm getting good with google sketchup and/or with any other ArduCopter code questions.

 

P.S. you know that nintendo probably throws out dozens of wii remotes including the cameras each day.  There's a room somewhere full of perfectly good cameras that we sadly can't get our hands on.

Comment by Greg Fletcher on September 26, 2011 at 9:39pm

This would be great if it works in full daylight. Those little infrared controlled toy helies don't work outdoors in the sun. With the camera looking down this may not even matter.

Comment by Lars Johansson on September 27, 2011 at 4:10am
Comment by Lars Johansson on September 27, 2011 at 4:19am

just US$6.40, Standard M12x0.5 thread and f-stop of 2.0

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

Groups

Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service