Copied vision code from robot.

Errors abound.