Infrared beacon guidance for the arducopter

3689426094?profile=originalFollowing 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.


3689426115?profile=original
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
3689426162?profile=original
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

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Moderator

    Wireless power transmission is still in its infancy (see latest Xprize) and still a ways away from being commercially available.

    Right now its a way cool way to cook a goose flying through the microwave beam.

  • Developer

    Albert,

         Not sure I'm understanding you correctly but if I am, you can't send power through the air using an RC channel.  If this kind of thing was possible you wouldn't have to hitch up a battery to your receiver right?

         Using an IR becon to land on a specific target (like a charging station) is cool though.

  • @Mike That reminds me of an idea I had were you could place a "Charging Station" which would emit a Blank signal on an RC channel, then the drone or robot ot whatever your using could "feed" off of that power. I

    t probably wouldnt mean unlimited airtime but it could probably increase the airtime substantialy.

    And even then it could just land on the charger and switch into low-power mode till it is charged again.

  • @squalish, there are reports of successful sampling at 200hz with these cameras. So yes you could theoretically detect a blinking beacon. Equally targets made up of three leds where you varied the spacing / location of the centre led could be used to give each target a unique visual identity.

    Eg. The following are all unique patterns of three leds
    L....L..L
    L.L.....L
    L...L...L

    No specs sheets for the camera are available from manufacturer to check the sample rate.
    Manufacturer is Pixart in Taiwan. Seems Nintendo may have proprietary rights to the technology and are not sharing.
  • What is the sampling rate on the camera?

    I'm sure it's already been done somewhere professionally, but IR LEDs that blink a short binary identifier at a few hundred hertz could be used for passive guidance.

  • @Greg the black plastic window on the end of the wii remote is an IR bandpass filter that filters out visible light. I'm not sure how much light the sun emits at 900 nano meters. 900 nm appears to be close to the peak wavelength for the wii camera.
  • @Lars and @Randy thanks for the info on lenses. Now you've made me spend more money!
    I'll do some testing of the various lenses when they arrive and report back the results.

    This week I hope to tidy up the arduino library for the camera and post it here for others to use.
  • @UT the wii cameras have been shown to work beyond 10 meters with a bright enough IR light source.

    A single beacon on an aircraft and multiple cameras in a room would allow you to calculate x,y,z position of the aircraft. Multiple beacons on the aircraft would allow you to determine the attitude of the aircraft.

    The vicon gear uses reflectors on the Aircraft and IR illuminators on the cameras. I have ordered some IR reflectors (for Naturalpoint trackIR devices) and hope to test them With a security camera IR illuminator soon.
  • Take a look at this article: http://www.ra.cs.uni-tuebingen.de/publikationen/2009/wenzel2009_uav...

    I came across it a few years back and it looks quite interesting.

    http://www.ra.cs.uni-tuebingen.de/publikationen/2009/wenzel2009_uav_wiitracking.pdf
  • It depents on the IR beacon
    It would be a nice Projekt ;)
This reply was deleted.