Tuesday, November 6, 2012

Android Robot - Auto pilot project

Android smartphone is a very powerful device, with GPS, digital compass, gyro, and accelerometer inside, which can be a great platform for making robot. Moreover, the dual core processor inside can perform intensive calculations as well.

In order to let my Galaxy Nexus to control the motors, I used the cheap wifi router: TP-LINK WR703N as a wifi to serial bridge to my motor boards. I can simply send tcp packet to control the motors.

My ultimate goal is making an autopilot robot using GPS, but the result is very bad as the best positioning accuracy is only around 10 meters. I think GPS reading should only use as reference, I may need to consider other sensor readings to calculate the best estimated position of the robot during navigation. 




Anyway, here is the screenshot of my app:




Here is the video showing the robot using digital compass on the phone to adjust the orientation:

For GPS and digital compass programming, I would recommend you to read this project:

http://code.google.com/p/bearing/source/browse/#git%2FBearing%2Fsrc%2Fcom%2Falfray%2Fbearing

The source codes show you how to read the compass and gps data, also calculate distance and bearing of two locations.

Finally here is the video showing the robot in auto pilot mode, use GPS and digital compass to navigate.

2 comments:

Unknown said...

The site gives me access denied message. Please help. Need code to help me with my project.

Bitartist said...

someone cached in github here:
https://github.com/wainach/Pervasive-Project/tree/master/Android/SoundLatitude/src/com/alfray/bearing