Wrapping Up WALL-E II

Well, that’s it for the ol’ robot.

We had a little presentation last week of all the projects our class had been working on. They certainly seemed impressed by WALL-E and I’s little back and forth. More on that further down.

I promised in my last post a more in-depth discussion of how I programmed my WALL-E animatronic, and here it is.
Now that the program (or ‘patch’, as Max 7 likes to call them) is fully completed, I can finally show it and explain how it all works.

scott-servo-example

Here you can see just how large this patch has grown. All this is required for a show lasting about a minute- and that’s with me providing most of the dialogue! WALL-E II mostly reacts to what I say- or, rather, I time my questions so that his movements appear to correspond to what I ask. Voice recognition was, I felt, perhaps a little too ambitious for this project. Since the patch is so large, I will break it down into four sub-sections, to make the explanation a little easier.

servo 1

This is the first section of the patch. Here you can see how the entire program is activated, and the first set of WALL-E’s movements. No.1. is a keyboard input, which allows Max to register which keys are being pressed on my computer. The Indicator connected to it shows which key Max is currently detecting. Each key on the keyboard is assigned a number (even the letters. confusing, no?) and the four numbers on No.2 (28, 29, 30, 31) represent the four arrow keys, specifically left, right, up and down, in that order. As you can see, four connecting lines leave the route function and move further down into the patch. Each one is connected to one of WALL-E’s four sets of movement commands. The route function allows the input from the key function to be sorted based on what that input is. As you can see, when the left arrow key (which has 28 as its corresponding number) is depressed, route sends that signal to the button that you can see on screen at No.3.

The button is one of two switches that I experimented with. The button, like its real world namesake, stays active for only as long as someone is acting upon it while the toggle (not shown here) is like a switch- it stays flipped even after you walk away. Since I only needed to ‘jump-start’ each sequence of actions, I used a button.

No.3 is a counter function. This particular counter has been set to count to seven. It will count to seven (0,1,2,3,4,5,6,7), looping back to zero after seven is reached. When controlled by a button, the counter counts forward once for each ‘press’. With a toggle, it would continue to count forward without ending until the toggle was switched off. Since I wanted to have to use the keyboard as little as possible (so as to sustain the illusion that I was not directly controlling WALL-E), I preferred the button. If you look at No.4, the line function has two sets of connectors coming from its outputs. One set travels down to the bottom of the patch, where it connects to what actually outputs the control signals to the servo control board on WALL-E himself. The other set of connections returns to the counter function above. This allows the patch to send each set of instructions automatically, without requiring an operator to press a key after each movement.

It works like this. Normally, the counter is resting on seven. With no inputs from anywhere, this is a neutral state. Once the operator presses the corresponding key, the counter resets to zero. You will have noticed the route function connected to this counter. When the counter resets to zero, it sends a signal to the button connected to hit. When this button is hit, it momentarily activates the ‘message’ attached to it. Each of these messages (the rounded gray rectangles with numbers in them) is one of the servo commands. The first two numbers represent the start and end positions for the servo and the third is the amount of time this movement will take in milliseconds. For reference, 1000 milliseconds is 1 second. This command is then passed through the line function, which helps smooth out the movement of the servos and down to the servo output functions. A command passing through the line function sends a signal through the connectors leading back to the counter, causing it to jump to the next number, which is 1. This, of course, triggers the commands connected to 1. The counter can no longer rest on any number besides seven (which does not have any actions connected to it) since any other number will trigger the counter to move forward until it hits seven, which is now its rest state.

There are two line functions because they each control a different servo. One controls the vertical movement of WALLE’s eyes, the other the horizontal movement of his head.

Servo 2

Here’s the second part of the patch. No.1,2 and 4 are very much the same as the last one. This button corresponds to the right arrow key and the counter goes to 10 since this is a slightly longer sequence. No. 3 is the big change here, since this is a new action, unrelated to the servo movements. It is actually very straightforward. It consists of an mp3 sound file, an audio output function and a toggle (a button doesn’t work here- I need the file to play all the way through) connected to the route function. When the counter reaches the right number, it activates the sound, which plays through my computer’s speakers. You may notice that there is more than one connector coming from the same route output. This is so that WALL-E can move his head in time with the sound file, so to make it look like he is speaking to his audience. Also note that not all the messages have the same duration time. If I want WALL-E to perform an action quickly or slowly, I must alter the timing until the movement emulates the feeling I want him to convey. Also, one can connect multiple lines from several route outputs to the same button so that WALL-E performs the same action several times. I found this very useful when I wanted him to shake or nod his head.

servo 3

The third part is not very interesting. Note the gaps in the route function output. I found, while programming, that when I have both servos performing actions simultaneously each line function sends a signal back to the counter, moving it ahead two spots instead of one. When I tested this section, I found that the counter would automatically roll over as too many signals came in, putting it in a permanent loop. I solved this by making the counter go to a higher number (it was originally seven) and spacing out the lines on the route function. Now it goes only to ten and stays there until I reset it manually. At the bottom of this section there is yet another set of line functions, which will join all the rest at the bottom of the patch.

servo 4

Here’s the bottom of the patch. It’s a been a bit of a ride, hasn’t it? Here we see the last set of line functions (No.1). They, along with the other six we’ve seen, connect to that set of indicators that tell the operator what the positions of the servos are (No.2). From there the signals travel to the output functions, which were pulled directly from the servomotor patch that comes with every copy of Max 7 (No. 3 & 4).

Four sets of line functions may seem a bit redundant, but they were necessary. First, this patch grew so large that rather than try to scroll through it to connect all together in one place, I created several pairs of line functions to act as local ‘outlets’ that went directly to the servo outputs. That way, I didn’t have to thread all my lines down to the bottom of the page. Given the number of commands, this would have been messy, hard to inspect and impossible to troubleshoot. As well, each counter required a separate input. If all four counters wee attached to the same line four would have activated at once, sending the servos a confusing array of conflicting commands.

WHAT COULD HAVE BEEN
I’m reasonable happy with how WALL-E turned out. For my first attempt at something like this, I feel that he was a success and that his movements added something to the little ‘talk’ I had with him. If I ever rebuild him, or make another animatronic, there are a few things on my wish-list. The first is a great range of motion. I was very pleased with how expressive the movement of his eyes was, but I found that WALL-E could only really turn his read to the left, not to the right. In the future, bigger servos, or ones with great ranges of motion would be preferred. I also wish that I had time to design a few more servos into WALL-E. My original plan from January included an arm that WALL-E could wave up and down. Thanks to time constraints, I decided to leave the arm (which I had made) off the final body. As well, I would have liked to put a motor controlling some eyebrows (for added expressiveness) on WALL-E’s head, but the motor for his eye movements bent his head frame badly by itself and I did not feel it could stand another motor. A longer show, of course, goes without saying, but since this was meant to be a demo, I feel a minute of showtime was adequate. I had also hoped to install a few LEDs in WALL-E, to flash on and off with his speech. This was to make it more clear to the audience who was ‘speaking’ when the audio files played. In the end, that turned out to be unnecessary- WALL-E bobbing his head was an obvious enough effect. To sum up, WALL-E II was a good demo and testbed, and as a first try I feel he was very successful. If I ever try to make another animatronic, a sturdier frame, a few more servos and more time to play around would be very nice!

Why Use Animatronics in History?
In closing, I’d just like to point out a few words about how something like WALL-E II could be useful in an exhibit. My presentation consisted of myself asking WALL-E questions, his answers and my responses to those answers. What made it work, despite WALL-E having only two lines, was that we made it interesting. WALL-E ignored me, had to be woken up, refused to say his name (at first) and looked away from me while I tried to speak with him. The net result was that it seemed my own creation was not interested in listening to me at all. This is maybe a rather strange version of interactivity- the animatronic is not really responding to what I say, but it certainly looks like I am to the audience. Though I was the middleman between WALL-E and his audience, the show was nevertheless for them, and involved actors who were decidedly non-human. This, as I’ve argued before in this blog, is the usefulness of the animatronic in designing exhibits. The animatronic can be a rare bird, a wise old tree, a replicate of an artefact that comes to life before one’s very eyes (imagine being able to listen to a totem pole tell it’s own story). It may only be the illusion of life, but we can make it seem pretty real.

DSC01729

Keepin’ it Unreal,
Scott W.E. Dickinson

(P.S.- this blog will be undergoing yet another change as Summer term starts- tune in near the beginning of May to find out why!)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s