PDA

View Full Version : [Project] I.C.R. The Internet Controlled Robot



ROBOTMAN
07-11-2010, 01:38 PM
Because I have not posted anything in a long time I have decided to post my "Sub Project" I.C.R. the Internet Controlled Robot. This project is really parallel with my robot butler and was built as a proof of concept for internet control but I figured it deserved its own post.

I.C.R. is basically a stinger platform with a webcam and phidgets HC motor controller. All this is powered by a single 9.6v Ni-Cd battery.

http://lh6.ggpht.com/_d2efKQvSrU8/TDa0EfDaezI/AAAAAAAAADs/O6UOWX6KARA/s800/P1020672.JPG


http://lh4.ggpht.com/_d2efKQvSrU8/TDa0DqrbKVI/AAAAAAAAADg/9JReAQ1jVYU/s800/P1020670.JPG

http://lh4.ggpht.com/_d2efKQvSrU8/TDa0E9eKQKI/AAAAAAAAADw/13yK0zI54f8/s800/P1020667.JPG

To control I.C.R. over the internet I used a combination of four languages.



XHTML/CSS: Used to create the webpage that the robot is controlled from.
AJAX: Sends commands to the PHP code running on the server without having to refresh the page every time.
PHP: Receives the commands sent by the AJAX and writes them to a .txt file also hosted on the server.
Python: Reads the file using the url library, processes, and sends the command to the phidgets motor controller.

This is a complex way to do a simple task and needs refinement but as a proof of concept it works brilliantly.

Currently all this takes place on a HP laptop and an old Dell OPTIPLEX 160L running Windows Server 2003.
The laptop runs the python code and RoboRealm which relays the webcam image to the control page using a iFrame. The Dell hosts the files which is something that I have always wanted to be able to do.

I hope to at some point post a link to the control page and let people drive the bot around but I have no way of regulating the number of users or preventing two people from using it at the same time. Also because it is not wireless its wires are easily ripped out. If you feel a burning desire to control the robot send me a P.M. and I will give you the link.

For now here is a screen shot of the G.U.I. and a video of me controlling the bot.


http://www.youtube.com/v/znZO7msgJkA&hl=en_US&fs=1



http://lh5.ggpht.com/_d2efKQvSrU8/TDa0D7ELaSI/AAAAAAAAADk/QUaZmT97rww/s1024/gui.png


Note: I will be posting a tutorial on how to turn a computer into a web server and possible one about why and how to internet control a robot.

For now here is the code used to run everything.

xx2747
07-12-2010, 11:40 PM
that's brilliant! next is to control the robot butler you have planned! good luck. im in korea so i cant do anything robotics since everything is in seattle. all im doing is making websites... ugh. BTW twiloogle got a remodel and is on the que for a series B advertising and funding! you should visit it in a day or so.

zoomkat
07-13-2010, 08:21 PM
It looks like an interesting project, but it is a bit complex to have simple internet control. I've got a servo based pan/tilt cam (below) that just uses the apache web server and notepad made files to control the cam movement.

http://web.comporium.net/~shb/wc2000-PT-script.htm

ROBOTMAN
07-14-2010, 01:33 AM
Wow! That's really sweet. It looks like you put a lot more time than I did into the project :).You definitely made a light weight application but how you did it is beyond my current programing skill level. I just drew up a quick one using python because that is my "testing" language needless to say future versions will look a lot more like yours thanks to the fact that I am learning assembler. Do you have a trossen post for that project? I think people in the trossen community would be interested.

zoomkat
07-14-2010, 09:44 PM
The below page has the basic setup. A batch file started by the apache web server has access to the environmental variables set by apache, in this case the query_string. The echoo.com file is made in assembly, and the contents of the query_string are echoed to the com port. This setup can only send data out the com port. It can't receive data from the com port. I've made a small .exe file using freebasic that can both send and receive data. A simple quick start for internet device control.

http://web.comporium.net/~shb/byte.htm

animeunplugged
09-05-2010, 11:41 PM
:)Wow thats pretty awesome! keep up the good work!