Tank Day 17: What’s Missing

At the end of Day 16, I mentioned that there a couple of issues preventing me from putting the Raspberry Pi back in the tank and driving it around via the web interface. They are:

Power consumption. Although the Pi can just about cope with supplying power to the WiFi dongle, the addition of the webcam tips it over the edge. Although my wall-socket USB supply can push enough power for the Pi, dongle and camera, the switching DCDC that I use internally cannot. Many users on the Raspberry Pi forums have mentioned the need for an externally powered USB hub, so to be honest I was surprised that I got this far without one.

Smartphone browser press-and-hold. The tank’s web interface, with its “press and hold” control buttons, has one very important flaw – “press and hold” is a mobile browser’s equivalent of a right click. The user can’t actually hold a button down for more than half a second without being presented with a menu by the browser itself.

These issues will be addressed over the next few days on the Raspberry Tank Build Diary.

There are also some more improvements to make in the future (excluding the development of the autonomy software and associated sensors). They are:

Audio output. The Pi has a “line out” audio output, which is not powerful enough to directly drive the tank’s speaker. Adding an audio amplifier circuit would allow the Pi to make noise, including text-to-speech.

Video recording. We can currently stream video from the tank to the web interface, but it would be good if the tank could simultaneously save video to its own storage or an attached memory stick.

Raspbian Linux. A new Linux distro has been released that offers substantial performance improvements as it has been tailored specifically for the Raspberry Pi. Although performance is satisfactory at the moment, we may need to upgrade at some point in the future.

Dual mode WiFi. If the tank cannot see a wireless network that it knows, I would like it to start its own that users can connect to using their phones/tablets.

An App of its own. Writing a dedicated Android or iOS app for the tank would allow me to get over the web interface’s “click and hold” problem, and would also allow for multiple simultaneous controls (e.g. turn left & turret right) via multi-touch.

And finally, the road to autonomy:

GPS. GPS is certainly an option, and it’s easy to integrate. However, GPS accuracy is around 10-20m which is itself a significant journey for the tank, so this kind of large-scale outdoor autonomy may be out of the question.

Indoor mapping. Ultrasound rangefinders could be added to the vehicle to allow it to map its surroundings. They would have to be combined with an inertial navigation system consisting of a solid state magnetometer, accelerometer and gyroscope. These can be purchased as a single device with many protocol options. I2C is supported by the Raspberry Pi’s GPIO, so this seems a logical choice.

Machine vision. If the Pi’s processing power is up to the job, machine vision can be used to allow behaviours such as following a laser pointer dot. Target recognition (facial recognition?) may also be possible.

Plus whatever else the internet can think of for me to do with this thing! 🙂

8 replies on “Tank Day 17: What’s Missing”

Hello Ian,Thanks very much for sharing your Raspberry Pi Tank build, I enjoyed reading it very much. I’ve also been working on a project for the past while (http://clikire.snappages.com/farmboz-3.htm). and I’m hoping to get it connected to the internet in the near future using 3G Wireless Broadband Dongle/WiFi and a Raspberry Pi. I’m sure a lot of what you have done will come in very useful.

Greetings Ian,this is a very inspiring project for me! I follow it closely, since it has so many solutions for lots of interesting tasks.I would also like to make a suggestion for future plans and that is to have the tank go recharge itself when the battery is low. Basically when the navigation is reliable enough, the tank would know its position and how to return to the charging station, where it would manoeuvre to a charging position. That way you could have a truly autonomous entity monitoring the house.

I am very ashamed but I can not read all the pages of Raspberry Tank Build Diary, from day 1 to 15 I download a file, not open page, the filetype is “.Part”, as it opens?The 16 and 17 days diary open as usual with a browser.

Maks: That would be a good trick – it would require a decent inertial navigation system to be up and running first, or it could use Roomba-style “beacons” to help it find its way back to the charging station.

Andres: Thanks for pointing that out! It was a problem with my Apache configuration that only seems to affect Firefox (which I’m assuming is what you are using). It should now be fixed.

Hello Ian,first of all – thank you very much for this very inspiring and interesting project in your blog/site.It caused me to buy a Raspberry Pi (and prior an Arduino) ~ 2 months ago. Currently I am in the “phase” of testing and getting the parts for my “autonomous-raspi-tank”-project. Thanks to your blog I got confirmation that nearly everything is possible with Raspberri Pi. Hopefully once I will be able to provide any near informational site like yours and try currently to document my project (-progress) on my site. I am looking forward to see new inspirations on your blog especially regarding “Autonomy”-part / interacting with sensors.Thank you again and regards from Dublin,Henning

Instead of click and hold, it is pretty popular to have buttons toggled. Tap will toggle and hold ON, re tap will toggle off.

There needs to be some kind of logical chekcing here, because you dont want the user to top forward and back to be on the same time. But you want possibly to go forward left, while turning the turret. And while going forward left you can simply switch to forward right? (I assume you can go forward and turn, I have not seen any video of you where the tank does this)

Any way , If I expected an interface like where I can control so many things, I would let my tank go lock my tank to go forward, while controlling the turrets. That is like 4 fingers holding a buttons. Not great on small phones.

Also have a clear all button. To stop the tank in case of emergency or getting confused.

Simon: Yeah, Since doing the tank, I’ve used touch events in the All-Terrain Pi project and learned a lot about them in the process, so when I get chance to return to the tank I hope to use what I’ve learned to improve the web interface a lot.