Humanoids 16-264
Assignment #4: Optical Flow Navigation
Tristan Trutna and Mark Schumacher


The Idea:
This project builds on our initial investigation into optical flow navigation using Agilent high resolution optical mouse chips. Our concept for this project was to affix the mouse camera to a wheel driven vehicle and use the chip for direct feedback for displacement that avoids the pitfalls of other traditional enviornmental feedback for motion.

Traditional Motion Feedback:
There are many standards for motion feedback, the simplest of which is a rotary encoder that can be mounted on any rotating shaft. The concept is to measure the number of revolutions (or fractions of a revolution). In the terms of a wheeled vehicle, by putting a rotary encoder on the wheel bearing of a car one could assume a displacement of 2 pi r, per revolution. The drawback of this method is that it assumes perfect traction and constant wheel diameter on all terrains, and is thus not particularly effective for mobile robotics. Another solution for motion feedback for wheeled applications is Differential GPS, but the resolution is so low that it is really only good for vague guidance between waypoints rather than following a specific path.

Optical Mouse Advantages:
The advantage of using the optical mouse chip for motion feedback is that it offers direct dx dy data relative to the ground, removing the types of error associated rotary encoding. In addition, the cost of these chips is under $10/unit, allowing for several mouse chips on a vehicle, reducing error associated with noise in a given video signal.

The Testbed:
We wanted to build a light weight vehicle that would be easy to control. We chose to use RC servos modified for continuous rotation for navigation because of the ease of speed control. We based our vehicle on the Carpet Rover by Lynxmotion:

The final version of the vehicle:

We mounted 10 LEDs on the bottom level of the car to illuminate the ground for the mouse camera and suspended the mouse chip camera 15cm from the ground.

Test Application:
The test application was based on the same RealBASIC program written for the previous experiment, but modified to include some basic linear control.

The simple linear control code (this ignores horizontal displacement, a future goal):

if destModeB then                        //if the destination mode is selected
     xDisplacement = xScalingFactor * Val(EditFieldDistX.Text) //scale the distance
     yDisplacement = yScalingFactor * Val(EditFieldDistY.Text) //to dx/dy counts
     if dxSUM < xDisplacement/4 then          //smoothly accelerate from zero speed
          speedUP(1)                          //increase speed by 1 PWM count
     end if
     if dxSUM > (xDisplacement/4)*3 and speed > 1 then//smoothly decelerate to speed 1
          slowDOWN(1)                          //decrease speed by 1 PWM count
     end if
     if dxSUM > xDisplacement - 10 and dxSUM < xDisplacement + 10 then
          stopServos                        //at destination within a +/- 10 threshold
     end if
end if

Results:
The displacement accuracy was within about 5-10%, which I attribute to the narrow field of view (about 15°) of the lens I had left over from a previous project. Reattempting the same experiment with a wider field of view could reduce the noise in the image and possibly increase the accuracy of the measurements. The other modification to increase accuracy would be finding the optimal traveling speed of the testbed so that slow movement is not lost in the noise. Below is a (poor quality) video of the smooth acceleration and deceleration of the vehicle on a 50cm run. (Note: the black electrical tape marking the distance on the carpet is not visible in the video due to the lighting conditions and video quality)

Improvements and The Future:
The first improvement, already mentioned, would be to explore other lenses and to compare the results. The initial plan was to give X and Y coordinates of a destination, however the servos were not evenly calibrated and were difficult to work with. Replacing the inexpensive Futuba servos with higher grade servos would make implementing the horizontal navigation more responsive.

In addition we would also like to use a pair of mouse chips to implement object avoidance using optical flow through stereo vision.


(C) Tristan Trutna and Mark Schumacher
B.S. Mechanical Engineering Class of 2008
Carnegie Mellon University
Email: ttrutna_at_andrew_cmu_edu
           mschumac_at_andrew_cmu_edu