Let's Make Robots!

Texas Ranger, a WRT54GL R.O.V. (updated -interface pics)

Taikson's picture
Remotely Operated vehicle via Wifi. Web interfaced, and distance measurement.
Cost to build: 
$400

This is a Linksys WRT54GL wifi operated ROV. It is managed using one of the available serial ports of the router. It is connected to a 16f876 PIC wich controls telemetry, onboard nunchuck readings and manages servo position, laser and cannon firing sending data to a second PIC. both PICs and nunchuck are using the same I2C bus.

 

general design

Onboard Nunchuck is used to turret tilt compensation, reading data by first PIC, and sending servo position to the second one.

A background running, cross-compiled C program for OpenWRT is used to communicate from router to PIC.

Laser pointer makes possible distance measurements. Another program, running in router, reads image data from IP Cam, decompress JPEG format, using libjpeg lib, locates the most bright pixed in a defined area, and estimates the distance by trangulation. Data is showed drawing a canvas HTML5 powered green cross on the web interface. You can view this in the attached video.

Turret detail

 

Web interface is builded in the same location that OpenWRT lua web configuration. It captures mouse movement and keypressing by javascript and it posts data using AJAX. Telemetry is received by reverse AJAX, like webchats apps.

Web is builded putting an invisible iframe in the same location that cam image frame.

BB airsoft balls are the ammo for cannons.

An early version at Campus Party 2009

 

Texas Ranger, 1st place on Campus Party 2010 Free category

 

 

 

 

UPDATE (1) Some web interface pics:

 

Selecting left cannon

 

Interface is completely web interfaced. Mouse movements allows pan-tilt turret control, sending AJAX requests to the router.

Telemetry comes from reverse AJAX request.

8-segment led displays are pre-loaded gifs, and put by javascript:

First and second pic shows turret pan-tilt orientation in degrees, calculated from servo PWM

Third shows distance estimation to target, when laser is active.

Last shows current battery voltage

Green circles are painted by HTML5 canvas object. They are a graphic representation of g acceleration of x and y axis.

Displayed HUD is a transparent iframe and some ascii art ;), drawing the pan-tilt turret orientation.

In the first image, dot firing is indicating that left cannon is selected, and armed, and is ready to open fire :)

 

Now firing with the left cannon, and showing the measured distance, pointing to the laser dot. Percentage determines how much accurate is the current reading.(RGB value near to white)

 

The same pic, without firing. No weapon selected.

 

Circle x-axis accel. turns yellow if accel increases too much. In this image turret is not self-compensated to explain better that situation.

 

Same pic, with the y-axis. Red circle tell us that this situation is dangerous because of too much g accel !!!!

 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Can you give me the plans how to build this vehicle? and when i went to the makers faire, i saw this rover base that had the sweetest suspension in the world. think about giving the vehicle a better suspention

Please give me the plans. i really want to use your idea thanks.

Taikson's picture

OMG, I'm afraid that I can't help you in that case, because there is no plans at all :/

A tiny paper with some measures, to order wood in wood store, was all of my plans, and it was thrown away time ago...

 

 

 

Caleborp's picture

How did you measure the distance using the laser, and how accurate is it? Great work btw.

Taikson's picture

That's a good question! :)

I have builded a C program for OpenWRT and loaded it into WRT54GL. That program connects a socket to IPCAM and reads Motion-JPG stream. Using libjpeg decompresses the downloaded image frame, and reads RGB values for a predefined area. Then searches the most brigth pixel in that area (higher RGB value), an returns it's position.

Reverse AJAX returns that position to web browser, and javascript function returns distance estimation. It has a predefined array that connects distances to pixel positions, maded by observation. Not defined values, are calculated by linear function, but it is also possible to make the job by triangulation, if you know the lens camera geometry.

Accuracy is +-5% but it will vary a lot if the laser o camera position has changed. (Caused by an impact or something). Note that if you choose the predefined points, accuracy will be 100% if real distance matches those points, and less if not.

To sum up, the most important thing is that hard job is done by router CPU and only cosmetic stuff is done by web browser. It is specially usefull if I want to implement some future IA behaviour, without a computer. Performance is about 2-4 FPS, and display delay 0,5-1 secs more or less.

 

 

 

Do you think that you could replace the camera and get a better refresh rate? I know the router is faster than 2-4FPS transfer rate, right??? I've been designing a very similar robot and think that offloading camera duties to the router is a must, what if you combined a gumstix CPU with the router and ditched the PICs, faster frame rate? or new router?

thanks, Andrew

Taikson's picture

Hi Andrew!!!,

That's tricky subject, no doubt, because video is intended to be sent using router wifi to a web browser. I have been breaking my brain with this problem for a long time :)

CPU router is not used to see the image on the web interface (the html points directly to IP camera using an iframe, inside control html). Tecnically there is no request to router web server to see the image, and fps are near factory specs. No problems at this point.

Problems start when I want to read image to estimate distances. I must make another http request to IP camera, this time done in background by router, and then, process the image data and send white dot position with the rest of the telemetry. In that case there are two guys accessing IP camera, me with firefox, and router searching the white dot.

You are right, using another camera, maybe simple rgb, and process signal by other ways we could achieve more fps, but we still have to solve the problem of viewing the image using only wifi and web.

Any idea?

 

 

I didnt see any details on your site on which IP camera you used, but i know that if you used H.264 it would take less processing power to search the tiny area for white dots. There are generaly 2 types of ip cameras, that one and Mpeg4. the performance can be seen here, the pdf is safe by the way. http://saysecurity.com/forum/viewtopic.php?f=4&t=438

Another thought is that you should check your routers performance specs on wiki or something and compare it to others.

Besides making your code smaller and more efficient I think it might be benificial to structure your router code to check if the camera is being used, maybe the programs are trying to query the camera at the same time slowing it down? just a thought and good luck, and for a project of mine, do you think you could use one of the serial interfaces of the router and make a program that gives it an address so a uController czn talk?

Andrew

Hey, very nice R.O.V.

thanks for the inspiration for my own robot!.

also nice incoming frames there on the web browser.

Q: what kindda battery are you using for the linksys router? and the microcontroller?motor?

Had a plan of putting a linksys on my robot to but it's rated for 12Volt right?

Taikson's picture

Hi eclipse!

My ROV uses a total of 4 18650 Li-Ion Batteries, in two groups. One of them powers the router, control board and IPCam. The other one powers the rest of the components.

Because of it doesn't exist an affordable battery holder, I builded two, from battery protectors.You can see how I made in my blog:

http://taiksonprojects.blogspot.com/2010/10/alimentado-la-bestia-portabaterias.html

Also it can be powered by a unique power supply, using a 100W/15V laptop adapter, and some diodes in serie to drop voltage.

Linksys WRT54GL can be powered from a wide range of voltage, it works internally at 3.3V, so it has a power regulator. 5 to 12V (even a bit more, but not tested personally!) power supply should be OK.

Hope you got the desired inspiration!

 

 

certainly got some inspiration.

2 groups of 2 (in total 4) so 7,4V each ? exactly what is was planning (although i'll try to use a standard batterypack).

i checked out the rest of your blog... nice photos of the detailed construction and campus party (where more lmr people have been).

clever thinking on the bbguns. i'm interrested in hearing more about that (and my spanish isnt that good).

if only those thing wouldnt be prohibited in the netherlands.