Friday, February 17, 2012

2012 TePRA Competition Recap

Unity Web Player | TePRASimulation
Here, I'll be publishing my progress on the 2012 TePRA Student competition. I'll be building a robot car similar to the one displayed in the simulation to accomplish the task of being able to autonomously go around the block.

Here's a vid of the demo of my final working project. In the vid, the car is built from a Lego Car Kit

If this page starts getting some hits, I'll post up some of the code I developed to run it.

5/1/12


This project was developed by myself Danny Perez @tchdp and Melvin Cayas @whoaMelvin


Overall Description:


For electronics, the HTC Dream (G1) is connected directly via USB to an Arduino with a USB Host Shield for Android <-> Arduino communication.
The G1 processes frames using OpenCV for Android and calculates a heading and sends commands to the Arduino directly over USB. While the G1 can be hacked to enable USB host mode, the G1 is using ezGingerbread ROM for access to the USB Accessory API available from Android 2.3+. This allows access to the regular Android API without having to rebuild the kernel to allow communication over the USB port.


Also the use of OpenCV with the Android Google API (For USB Accessory mode) requires the latest version of OpenCV, with v. 2.4.0 released a couple of weeks ago. lucky me. this has more compatibility with a wider range of devices and is more stable.


The USB Host Shield is from Sparkfun. I couldn't get it to work with the USB Host Shield 2.0 libraries that the site links to, so I used the 1.0 libraries with better success. The only glitch I encountered was that it wouldn't work right if I had anything plugged into digital pin 7. It would recognize the Android device as soon as anything was disconnected from that pin, so I just made sure not to use it.


The motors are controlled with a Motor Driver Shield for the Arduino which just features a Dual H-Bridge IC capable of handling upto 2A and between 3-30 something V. 


If you have any questions on something that I forgot to cover here, just leave a comment and I'll do my best.


Here's some pictures of the physical setup:



This is the board I used for tracking:

2/17
Finally! After hours and hours of trying to figure out how the hell to make a game, I managed to make a rough simulation of the TePRA student competition. 

Features (for the web player):
Control the car with WSAD or the D-pad
Switch between 1st person camera (inside the phone) and 3rd person Camera. I will be adding some other features over the next couple of weeks. 


Unity Web Player | TePRASimulation
Unity Web Player. Install now!

No comments:

Post a Comment