tanks a lot

I decided to build a very cool-looking robotic tank kit which is made by OSEPP. They have a variety of grown-up toys like this in the geekspace.

I guess I’ve been inspired lately by some of the local meetups which involve races with autonomously-driven cars.

To build this, I find that a surprising amount of hardware is going into this project as well as several programming languages all at once. I’ve had to bounce back and forth between Python and C as I interface the Raspberry Pi Zero W computer with the Arduino Mega 2560 R3 Plus board. This Arduino doesn’t come with Bluetooth, wi-fi or even an Ethernet jack so I opted to add in the Pi since it’s inexpensive and comes with a full operative system. The Pi of course includes a webcam for initially allowing the remote control features to be easy. Later, that same camera will be used to generate images to be processed for autonomous driving.

DSC_0072

Repository

Update:

I decided to design some plastic parts for the tank. It’s now looking awesome, has some quick-release pins and I’ve purchased a 12-battery AA charger and batteries for the project since it seems to be hungry for power.

DSC_0073

DSC_0074

Screen Shot 2018-09-12 at 2.00.44 PM

The first three attempts at managing the tracks for steering didn’t seem accurate enough for my own driving-related expectations at least. I finally had to resort to trigonometry in the last set of calculations; this appears to be a more natural steerage interface.

It looks like the first two phases of the project are now complete and I’m well into the third (autonomous) phase now.

Autonomous (Self-Driving) Mode

Next up is the part where a service is taking snapshots from the camera and then using this to make steering decisions. The strategy here is to use data image processing to find the road, so to speak, our position relative to the path ahead as well as any competitors also on the track.

The first interesting piece of the data processing involves some linear algebra and a variety of matrices which perform distinct functions, if you will. You basically multiply a particular matrix for a 3×3 array of pixels to replace the center pixel’s color in each case. The first and most useful matrix is named findEdgesKernel and looks like this:

-1 -1 -1
-1  8 -1
-1 -1 -1

This will allow a new, simpler image which should highlight only the track (masking tape) for the path ahead. This part is working quite well so the next step is to process this resulting path image to determine how the tank should steer both now and in the near future.

Screen Shot 2018-09-12 at 2.03.10 PM

a robot which builds robots

I suppose the problem with buying a 3D plastic printer is that it makes the owner imagine all sorts of modifications to that very same printer, especially so when it’s largely open-sourced in the first place.

robo

I must admit that owning this Robo C2 printer has been a blast. I’m now past the let’s print some demos phase to the let’s print our own designs next step. And part of that design process is envisioning a better printer from this one. And what better way to modify it than printing some 3D parts, right?

So, here’s a list of some of the current things I’m doing with it.

Sound Events

It’s a wonderful printer and often, just because of the sounds you get from its collection of servo/stepper motors, it vaguely sounds a bit like R2D2, the cute robot of Star Wars fame. I’m working up a modification to add sound events from a variety of Star Wars WAV files related to R2D2.

As themes go, the movie Iron Man includes an AI character named J.A.R.V.I.S. (as voiced by Paul Bethany) who had some fun dialog with the Tony Stark character (as played by Robert Downing, Jr.) I’ve often thought that it would be sweet to add a sound event theme set based around Paul Bethany’s voicing of J.A.R.V.I.S. as well.

Video Feed and Time-Lapse Photography

I’ve just picked up a Pi NiOR camera which I’ll be adding to the printer. Next, I’ll need a longer ribbon cable, some suction cups and a designed/printed part to hold the camera itself inside the chassis.

Given the resolution of the camera, I’ll likely need to upgrade the microSD card inside to accommodate the files from the streaming activities.

Enhanced Spool Feeder

The out-of-box spool feeder seems a bit minimalistic to me. I’d like to upgrade that with a feeder which allows the spool to spin more freely. I imagine that the part needs to be more rounded at the top.

Heated Bed

The Robo C2 doesn’t include a heated bed in its design like some of its more-expensive Robo alternatives. So I’d like to machine an aluminum bed with a heating element and add this to the system.

Side-to-side Conveyor Bed

The maximum build size for the Robo C2 is a mere 5″x5″ square at the base so that’s a bit restrictive. There are techniques for joining a series of smaller parts (say, to make a sword) but I’m guessing that a possible approach is to remove the two blue side windows and rig up a conveyor system which is accurately positioned left/right as required. In this way, a very long part could be printed.

Remote Control via Joystick

I’ve purchased a Raspberry Pi Sense Hat which includes a small joystick control. I think I’d like to write something so that, using remote GPIO, I could then control the stepper motors of the printer indirectly via wi-fi.

OctoPrint Plugins

The underlying web server which runs on the printer is called OctoPrint and since it’s open-source, there are a variety of plugins for this already. I think I’d be interested in writing some plugins, especially so that someone may pause jobs in the middle so that internal components may then be assembled inside.

I’ll likely add some SMS notifications so that I can remotely know how a print job is going.

Voice Control

I also like the idea of adding voice control to the printer. How awesome would it be to just tell the printer to do something?

So basically, since the Amazon Alexa code is completely available and can be setup on a Raspberry Pi 3 computer, I can imagine then interacting with this piece (as installed on a Raspberry Pi) and having it direct activities on the printer itself.