Intermediate 3D: Designing Models

If you’ve been reading my Xpider posts, you may have noticed that the Xpider “Fatty” doesn’t come with a nice 3D printed “head”; most of the electronics are completely exposed. This is fine in most cases, particularly during building and development, but I’ve always been a “finishing touches” kind of person, so I decided to try my hand and designing some sort of cover for my finished product.

Model designed in TinkerCAD

Not wanting to spring hundreds of dollars for a design suite that I may or may not like, I tested out a few online applications, and finally found one I fell in love with. It’s called TinkerCAD, and it’s so easy to use I was able to show my kids how to design basic shapes. I took a little time and some measurements from the hexagonal shape that makes up the frame of the Xpider, and extrapolated it out into a shell that looks very much like the head of R2-D2 (unintentionally).

The tabs are there so I can attach it to the frame with screws. I could have been fancy and put pilot holes in, but I figured I’d just drill them out. Once you finish your design, you can download the STL file, open it in Cura, and do everything else you need to do, like generate your GCode, or setup supports or brims.

Model rendered in Cura

So while I may not be ready yet to design my own full scale model, this is at least a good start, and fun to use.

Giving Xpider a Brain

As part of the development of the Xpider (now affectionately named G.A.J.E.T. by my 11-year-old daughter, which stands for “Gadgetized Analytic Just-so-cute Exploratory Technology) I wanted to give it the semblance of a “personality”. Years ago I had written a sample Markov chain algorithm first in C++ and then ported to Javascript. It was just a fun experiment to see how well a Markov chain could generate human-like text from some training data.

After learning that the Edison board that powers GAJET would run Node.js, I decided to work on some social aspects of the little robot. I ported what I had from my earlier algorithm into Node.js, and found 2 sources of training data; the complete text of “The Hitchhiker’s Guide to the Galaxy” and the script from “Monty Python and the Holy Grail“. Using these texts, I “trained” the application to format the Markov chains and to properly normalize the responses. Not finished, I created a Twitter account for the robot called @MontyHitchhiker, and leveraged the Twitter API to have the application post tweets every 10-60 minutes (randomly). Additionally, I leveraged the API to fetch the top trends for the United States, so GAJET will tag a post with a random trending topic.

It all turned out pretty comedic, and while the little guy still has some work to do regarding refining the chains, I’m fairly happy with it overall.

The next step is to incorporate a speaker into the system, and utilize a text-to-speech service (probably MaryTTS) to have the ‘bot actually “speak” its “mind”.

If you’re interested in seeing the workings of the Node.js app, I’ve attached the current working application to this post, so feel free to download and use it. You’ll want to sign up for a Twitter account and create an application in order to get the requisite keys, but everything else should be there.

Click the link to download the MontyHitchhiker source code.