PDA

View Full Version : Wi-Fi Robot Tank Hack


tatwood
01-14-2006, 05:12 PM
The following exchanges between George Mitsuoka and our readers reflect the interest generated by his Wi-Fi Tank Hack article in our first issue. You’ll find discussion below on the following topics:

-- UDP protocol for tank control
-- Processing video feed as sensor—going beyond telepresence
-- retrieving JPEG format still images using the camera server's CGI API
-- open source robotics software
-- Wi-Fi control of 1/48th scale Battleship model
-- WRT54G mods and new firmware issues
-- controlling camera pan and tilt via web interface
-- original RC IC vs. RabbitCore's outputs

--the editors


Hello!

I just finished reading your article in the premiere issue of Robot, and I found it very interesting and entertaining on several levels. For one, I am a big fan of the WRT-54G... I use one as a router, and have been planning to do some hacks to both the firmware and the hardware (I plan to add a SanDisk reader, to give it enough extra storage to act as a caching HTTP-proxy server). For another thing, I have a friend here in the Silicon Valley area who works as a prototyper for 21st Century Toys. He has created almost all of the paint-masters for their aircraft line (he builds the aircraft in a smaller scale, with the planned paint/marking scheme, and they use that to program their assembly-line painting machines). I don't know how involved he was in the M5 Stuart project, but I know he was demonstrating it at a convention in Phoenix last year. I plan on showing him your article next time I see him. I'm sure he'll get a kick out of it.

Randy

rjray@blackperl.com
www.svsm.org
www.rjray.org

--------------------


Hello George,
I only recently discovered the Robot mag, and thus your article in it about controlling a tank via a computer over a network (this also prompted a subscription and a drive across town to get an issue). My hobby is RC tank combat using IR battle system. We've experimented with using wireless cameras, but the frequency band is crowded. Your article was like light over the horizon.

I look forward to your solution to the real-time control problem. You’ve probably already heard this from some network geeks out there, but why not investigate the use the UDP protocol to control the tank?

I have the same tank you modded. Mine is being converted to shoot paintballs. There is a club in Maryland that battle 1/6th-ish scale tanks with paintballs. We had this conversation about 2 years ago about controlling and driving the tanks via a network device, but the technology just wasn’t there yet.

Now, thanks to you, I am reminded of that conversation and alerted to the fact it is possible now. I plan to make the mods you made to my tank this winter. I had also, in a parallel effort, been wanting to build a remote controlled mower so I could mow my lawn from my easy chair in the house. However, getting reliable RF signal in 75mhz FM band and a camera was problematic at best. Again, thanks to you, I can combine both projects into one. I can build a device that uses the connection point on the front of the tank where the hedgerow cutter goes (that mean looking jagged piece), and push a custom mower attachment around the yard.

Please keep up the effort, and let me know if you need assistance or just how the project is going.

T'anks
Keith Graybeal
rctankboy@aim.com


Hello Tankboy,

Thanks for writing and for your suggestions. I'm glad my article was of use to you.

Yes, I've looked at using UDP as the transport protocol, but it is only part of the solution. There needs to be a higher-level protocol on top of UDP which defines how the control bits are laid out and how to handle data loss and timing. When I have time I'll be working on defining the protocol and testing it. I'm also exploring a different approach using some modern web-based techniques which would be much easier to implement and should be responsive enough for ground vehicles (I wouldn't try using it for aerobatics). You may read about it in Robot soon [see ROBOT Spring ’06, available in February --the editors].

Battling with paintball-equipped tanks sounds like a lot of fun. I'd like to see that someday. Let us know if you mod your tank with the network control and maybe we can get a picture of it in Robot. You'll probably be interested to know that 21st Century Toys has a new 1/9th scale M1 Abrams tank that looks very nice and there’s a write-up on it in this issue of Robot.

T'anks a lot,

-- George Mitsuoka

P.S. Good luck on the mower as well. Be careful where you drive that thing!

--------------------


Hi George,

I loved your article in Robot magazine. I'm going to use your approach for wirelessly enabling my own controller. I want to do some CPU intensive processing for autonomous control of my robot, and I need high bandwidth feedback from the robot's sensors. So your pointers to the Imagine Tools ESK were timely and useful. Thanks.

I am also going to try out the network camera you recommended. With the configuration you describe, it will be useful as is. I'd like to go beyond telepresence, though, and process the video feed as another sensor for autonomous control. So, I'd like to bypass the web browser and even the server on the camera if possible to get at the video feed directly. Have you tried anything like that? Any pointers you might have would be greatly appreciated.

Sincerely,
Doug

Hi Doug,

Thanks for writing and I'm glad you liked the article. I don't know of a way to bypass the server on the BL-C10A, but you can retrieve JPEG format still images using the camera server's CGI API. This API allows you to control many camera parameters as well. You can find documentation at the following URL:

http://panasonic.co.jp/pcc/products/en/netwkcam/download/us/document/new_cam_cgi_v105.pdf

If you need help decoding JPEG images, take a look at www.imagemagick.com.

--George
--------------------


Hello!

Just discovered Robot Magazine this weekend and read your article on WiFi control of a robotic test platform.

It was very interesting to me as I have been playing with similar concepts on a much simpler scale. I am testing the use of a Playstation 2 wireless controller with a Basic Atom microcontroller to remotely pilot a small, semi-autonomous platform.

I started with this as a means to control a small fighting “robot” as an alternative to four-channel RC. As I learned more about the microcontroller and its capabilities, I realized I could create a more effective bot by making some functions autonomous and letting the microcontroller handle those. I’ve had so much fun playing with the platform, getting basic communication working, and learning about microcontrollers that I’m not sure I’ll ever get back to the original goal of simple remote control. :)

When I read your article, it clicked. The idea of “telemetry for free” is especially interesting.

I am going to start poking around on the ‘Net today for components for a WiFi platform like yours. Not only would the technology work well for moving robots – it would also work well as a means of controlling an astronomical observatory. (Amateur digital astrophotography is another of my hobbies, and I’ve built myself a small domed observatory in my back yard that is currently all manually controlled.)

Have you considered an “open source” style project around this platform and the development of the protocol? I’m no expert on the development of network protocols, but I would like to volunteer to help if there is anything I could do.

Thanks for a great article and some great inspiration!

Mike McKenney
Software Engineer,
Pierce County Library System
Wk: mmckenney@pcl.lib.wa.us
Hm: memcki@comcast.net

Hi Mike,

Thanks for writing and I'm glad you liked the article. Please let me know if you have success using this technique with either your fighting robot or for controlling your observatory (which is very cool!)

I've been thinking about creating a web site for open-source robotics software in general, not just the network control protocol. Stay tuned…

Thanks,

--George

--------------------


George,

Thrilled to see your premier issue...youll get my subscription card any day now.

I am totally interested in your wi-fi article as it directly applies to my current project under construction...The possibilities are endless.
I didnt have a solution for its control as yet and its seems I now do.
I have some limited experience with networking and associated hubs, routers and peripherals. Mostly hardwired systems though.

Actually I am surprised that this type of robot control has not been tried before, but am excited to be able to follow the progress of your testing.
You had mentioned what the issues would be with size, weight and power supply...
These are not issues with my project as it is much larger than the usual robot project. About 19 feet long.

It has a 12-volt power source which is endless.(on board generated)
My issue would be range...I need about 2 miles of range...
Since I have unlimited space relatively What could I use as the transmitter/reciever setup...??? Just what is the reliable range for wireless???
Mechanically there are no issues with the project as I have a pretty solid idea how all the systems will function...The issue has always been control..

The project is as follows.

A 1/48th scale model of the projected Battleship USS Montana BB-67

Systems that need control are numerous
The obvious are
1. steering (twin rudders)
2. Engines (four screws) separately controlled.

The not so obvious are:
Turret controls
1 channel each for traverse..elevation of each barrel...loading and firing of each barrel. there are four turrets with 3 guns each.

Gunfire control systems (GFCS)
This subsystem includes video telemetry for two primary optical rangefinders as well as turret status information. Plus three turret mounted optical rangefinders in the event the main systems are damaged.

Telemetry for at least 6 navigation cameras.
There would also be systems for anchors and secondary battery(5 inch guns).
and searchlights(4)

Autonomous sytems include a very elaborate system for damage control such as flooding and counter flooding, fire suppression, and power management.

Also I need to know where I can get syncro-servos.
These are motors that "follow" the movements of a control motor...
Example--Rotate the main battery rangefinder to the left 90 degrees...and the turrets "follow." This system is very important.
My idea until I read your article was to use some sort of Receiver/Transmitter that used a digital signal superimposed on a carrier wave signal.FM modulation of sorts. With each frame having four bits. That would give every assigned frame 16 possible control states.
Any thoughts??

Matt Chaiser
keijser55@aol.com


Hi Matt,

Thanks for writing and subscribing. I'm glad you liked the article.

"Wow" is right, that's quite a project you're working on!

I think you might be able to use Wi-Fi, but the 2-mile range requirement would be a challenge. Do you really need that much range? Typical Wi-Fi equipment usually only has a range of a few hundred feet, but there are a number of ways to extend the range using high-power transmitters, directional and high-gain antennas, repeaters, and mesh networks. Of these, I think your best bet would be a combination of high-power transceivers, a directional "ground-based" antenna and a high-gain omni directional antenna mounted on the ship. You would have to point the directional antenna at the ship as it moved either by hand or using some sort of automated tracking mechanism.

If you can solve the range problem, Wi-Fi should easily provide you with enough bandwidth to handle all the controls you mentioned. There might be a telemetry bandwidth issue if you want to view all of your video cameras simultaneously.

I suspect you'll have to build your own 'synchro-servo' system using motors and positions sensors controlled by the microcontroller(s).

Please keep us updated on your progress and lotsa luck!

--George

--------------------


Great article on the WiFi control of a Stuart. I have a couple of Stuarts and am converting them with better radios and controllers and also would like to replicate and expand on what you have done..

A couple of questions..
I read sometime back that the WRT54G mods might be subject to serial number. i.e. some or all of the later SN units could not be easily modified with new firmware? Can you shed light on this? I went to the openwrt.org site and was a bit overwhelmed and could not sort out that issue. Have you any further thoughts on suitable units or is the WRT54G still the best bet?

I noticed that you did not include control of the pan and tilt of the camera?

Could you provide access to the firmware you developed so I could get up to speed faster?

Thanks for any consideration. The Magazine is great....

Lance Ginner
lance@ginner.com


Hi Lance,

Thanks for writing. I'm glad you liked the article and Robot Magazine. If you like it enough, please tell your friends about it and consider subscribing.

You're right; the WRT54G Version 5 can no longer be easily modified with new firmware. See http://en.wikipedia.org/wiki/WRT54G for a chart of serial numbers and upgradeability. However, Linksys now sells the WRT54GL which is essentially a version 4 WRT54G.

The OpenWRT site isn't the easiest to navigate, but if you look here: http://wiki.openwrt.org/TableOfHardware you'll find a list of all the various routers currently supported.

You actually can use any wireless router and don't need to modify the firmware at all. I ended up using the WRT54G in stock form (other than removing the case). All the custom firmware is on the ESK microcontroller. The source code is available on the Robot Magazine website at www.botmag.com/issue1. That said, I would still recommend a firmware-upgradeable router to give the most flexibility. One thing I want to try with multiple units is to build a mesh network and that will require custom router firmware.

I can control pan and tilt of the camera through my web interface. The camera provides a live video feed and also accepts mouse clicks on the video image to control pan/tilt of the lens.

Please keep me informed of your progress on modifying your tanks and feel free to ask any questions. I'll be happy to help.

--George

--------------------


Dear Mr. Mitsuoka,
I enjoyed your article about the conversion of the RC Stuart vehicle to WiFi control, and I'm impressed with your magazine. I had a simple question: was the existing on-board RC board powered while you were under WiFi control so that the remote could take over? I assume this on-board IC did not have any problem being driven high from the RabbitCore external source, and conversely the RabbitCore would not care if it saw a high caused by the remote control.

Thanks,

Gary Vigen
gary.vigen@lmco.com


Hi Gary,

Thanks for writing and I'm glad you liked the article.

As you correctly surmised, I simply wire-or'd the GPIOs from the RabbitCore to the outputs of the existing remote control IC. I'm not too proud of this, but it was fast, easy, and it worked.

When that tank is initially powered-on, the original radio control still works, but once the RabbitCore's GPIOs are configured for output, the original RC IC can no longer drive the logic levels against the RabbitCore's outputs. I've been thinking of fixing this using some simple resistor circuits, but haven't really found the need

The other issue is that the original radio has limited range and the new circuitry seems to cause some interference.

--George


Maybe you could break the RC IC output and use as input to the microcontroller which would have a "WiFi/manual remote" mode switch and feed corresponding microcontroller output to the other side of the break. . Perhaps the receiver board needs to be shielded, see http://www.hamtv.com/pdffiles/R-C.pdf).

Gary Vigen
gary.vigen@lmco.com

TheDuck
01-23-2006, 01:05 PM
In the emails above, there is one by Matt Chaisser about 1/48th scale battle ships...robot wars on the not-extremely-high seas.

Servo magazine (Dec 2005, Model Warhips Combat: "Battlebots" in the Water) has an article about them. Although they are remote controlled, I can only imagine how insanely exciting it would be to have a somewhat autonomous version of these things. The article says you can even have a submarine though it is just this side of impossible to expect to be proficient at controlling something you can't see. Now imagine the autonomous version of same lurking about at periscope depth....

dlb
04-23-2006, 02:18 PM
These ranges are addressed by solutions in the remote sensing/control domain.

e.g. http://www.google.com/search?hl=en&lr=&safe=off&rls=com.microsoft%3Aen-US&q=+remote+sensing+control+gsm+gprs+&btnG=Search

&

http://www.google.com/search?hl=en&lr=&safe=off&rls=com.microsoft%3Aen-US&q=gsm+gprs+solution

You might look into hacking a cell phone. Newer phones will provide an IP network stack, a mature programming environment, and the ability to adapt services such as GPS. This approach also the advantage of being able to hop networks.

zbend
07-04-2006, 04:24 PM
A virtual plug and play solution to any range issues would be one of these cool EVDO routers

http://www.evdoinfo.com/EVDO_Products/EVDO_Routers/Kyocera_KR1_EVDO_Router_with_WiFi_20050427264/

Now the range would be extended to anywhere with CDMA cell coverage, at which point I suspect the battery would die before you went out of range. This could make it a great spying robot.

jhphelan
10-29-2006, 10:15 AM
Robot fans,
I, too, have wanted to build some kind of long-range telepresence robot using WiFi or cell phone. While poking around www.cmu.edu last night in persuit of some things I'd read in the fabulous "How to Survive a Robot Uprising" by Daniel H. Wilson I stumbled on the Telepresence Robot Kit TeRK invented by CMU and provided by Charmed Labs. This $330 controller appears to have all the necessary features for web cam, WiFi (requires a USB dongle) and enough motor and servo controllers for a tank, battleship or even a RobotOne with multiple sensors. Has anybody had any experience with this?
Jim
Texas

TheDuck
10-30-2006, 11:37 PM
Robot fans,
...I stumbled on the Telepresence Robot Kit TeRK invented by CMU and provided by Charmed Labs...Has anybody had any experience with this?
Jim
Texas
Not yet. ;)

hondaboy945
11-18-2006, 04:45 AM
I am in the process of converting the M1A2 Abrams tank from 21st century toys. I was wondering what would be involved in using the PSP (Playstation Portable) instead of the laptop fpr control. The PSP has Wifi. Please advise.

TheDuck
11-19-2006, 10:24 PM
Where to start? Are you familiar with programming the PSP? If not, there are a few resources including the strange and rather evangelical http://en.wikibooks.org/wiki/PSP_Programming that includes some links to other resources.

If you have a handle on that then perhaps you are looking for the WiFi tank hack source code at www.botmag.com. Look down the right-hand side of the webpage and click on WiFi links.

If you know about both of those, then your questions must be more specific and I look forward to you posting them. This sounds like an INSANELY fun alternative to the original idea!

dporter
11-20-2006, 09:44 AM
Botball uses a similar idea. They use a gameboy for the processor and can attach a number of sensors, motors, and servos. They also use C base programming.

Malicom
12-07-2006, 11:27 PM
I have been dreaming up using a WRT-54gs unit as a robotic/RC controller. I do a google search and find people already doing it.:)
First off, i am a huge WRT enthusiast. I love the sveasoft firmware. The Sveasoft has a firmware compatable with some of the newer Linksys Wrt54g and gs units, and now lots of other routers. Some asus's and Dlinks. In my opinion the wrt-54gl is the best option for now. Its openwrt, and sveasoft compatible, as linksys is making some of their newer g and gs units incompatible. I saw a mod for the wrt that allowed addition of a DB9 serial port. Im a robot newbie. I hope this does not sound elementary. Ive seen serial port servo controllers. The controllers used simple ascii text commands sent directly to the com device through telnet. you hook the servo controller to the serial port mod on the wrt, and voila. Use telnet as your primary control. In summation you could just use simple shell scripts to control the robot. I read in earlier posts using UDP protocol to control the wrt. Im not sure what type of programming your doing for that, but I imagine the script interface would be an easier out of the box solution.
For design I was thinking of a pneumatic air hyraulic system, tank treads.
You could use an IP cam which you can connect to, over the wireless network, coupled with an airsoft, or really whatever type of (Harmless):rolleyes: weapon. A wireless laptop connected to the network could send commands or be a remote brain, and monitor the cam. You could use server style computers on a network act as a remote brain.

The mad scientist in me says to create an Openmosix Cluster, coupled with a Spiking Neural Network, to control the robot. Add some learning capabilities. Ive seen a ton of Open source Ai projects. I imagine some neat stuff could be brewed up.

One last thing I wanted to add an RC gasoline engine with a generator to run it all. Id have to figure out a powerful enough engine to use. When and if i ever get a chance to build it, my first try would be pretty limited in capability. I bet a more adequate programmer than myself could do some really cool stuff.

Im really glad to see a community dedicated to this sort of thing.

TheDuck
12-12-2006, 07:56 PM
The cluster is just overkill. :D lol

The mad scientist in you is echoed in many folks on this forum, especially Mr. Willets who doesn't need to imagine nightmares, he just goes and builds them.

Everything you mention is completely plausible and, in parts, has been done so I look forward to you investigating this project further. Certainly look into the WiFi tank project on Robot and also do a search for the guy that allows you to operate his tank over the Internet -- complete with paintball munitions!

I like the idea of a Neural Net controlling the works. If you train these things to track and attack as a swarm you would have a formidable entry into an intriguing contest (team batllebots!). Perfect your Friend or Foe identification system and you just landed a multi-million dollar contract with the Department of Defense. ;)

hondaboy945
01-18-2007, 03:52 PM
Where to start? Are you familiar with programming the PSP? If not, there are a few resources including the strange and rather evangelical http://en.wikibooks.org/wiki/PSP_Programming that includes some links to other resources.

If you have a handle on that then perhaps you are looking for the WiFi tank hack source code at www.botmag.com. Look down the right-hand side of the webpage and click on WiFi links.

If you know about both of those, then your questions must be more specific and I look forward to you posting them. This sounds like an INSANELY fun alternative to the original idea!

Sorry for the long pause between posts, I have been super busy with school. I think I have help on the PSP programming, but if not I will use the link you gave me. Thanks by the way. I already have the source code for the tank from the site. I have a WRT54G with SD card mod, and serial mod.

The serial mod is for a GPS unit that I found on the internet, The SD card is for loading soure code for autonomy, and possible saving path progrss through the video camera? ( not sure about that one).

What I am trying to find help on is setting up a few ultrsonic sensors, a temp sensor, and a humidity sensor also maybe IR. Kind of like a VEX sensor selection, not VEX of course. This is goingto be a project for teaching myself,and for school practice. I go to schoolfor simulation design, and was thinking about getting my masters in robotics.

Feel free to give all the info you can, it would be a great help.

Thanks

hondaboy945
02-02-2007, 12:21 PM
I am still looking fora bit of feedback on sensor programming,and using a GPSunit on the tank.

BaronVonRich
05-12-2007, 11:10 PM
using DD-WRT you can actually set this up on a lot of routers, including the WRT54G V1-6 (V7 isn't supported) also the WRT300n routers work too, there are also a lot of compatible ones made by Buffalo Technologies.

hondaboy945
05-17-2007, 11:23 AM
Thanks for the help. I really would like a bit more help on the projext but have been disappointed with the lack of help on this forum. I hope that it all comes together in the end, but anyone that can help with this project would be great.

hondaboy945
06-03-2007, 10:17 PM
Was hoping to get in contact with George, the gentleman that built the tank found in Robot magazine, I ran into a few snags and I have a few questions.

HarryBotter
06-04-2007, 07:36 AM
georgem@botmag.com should get you in touch with him.

hondaboy945
06-04-2007, 03:53 PM
Thank you for the advice.

holtzbocker
07-08-2007, 08:10 PM
I'm just starting to build the tank bot. Can anyone tell me where I can get the imagine tools start kit list in mag? The site sends me to mouser. and mouser says to buy 50? mmmmm I just want one.