About two weeks ago I challenged myself to build a pumpkin robot. Not having a lot of time I had to keep it pretty simple. Maybe next year I’ll do one of my more elaborate ideas. This year’s pumpkin robot looks at people who get close to it:
It looks great in the dark too but it’s a lot harder to capture with video.
Now I will be the first to admit that this more of a pumpkin on a robot than a pumpkin robot but that doesn’t change the fact that I had a lot of fun making it. Some of of the non-technical things I really liked about this project were:
- Built in deadline (Halloween)
- Some obvious requirements (has to include pumpkin)
- Interaction is a must
- People understand it when I tell them about it
- Fun decoration when it’s done
A lot of my robots end up being a bit too abstract to describe, whereas this one is immediately clear in purpose — the pumpkin looks at you!
Some of the technical problems I had to solve made this fun too:
- How to move with the weight of pumpkin
- How to mount a pumpkin on a robot so won’t roll away
- How to get the robot to look at a person
- How to get it to perform reliably
I think one of the best parts was that I could easily tell if it was working because I had such a clear test: Does it look at me? Yes or no.
- Vex Robot
- Wood piece to hold pumpkin
- Foam mat to keep pumpkin in place
- Ultrasonic range sensor for finding a person
How it works:
This is a behavior based robot so instead of listing out a sequence of steps to perform it’s a matter of defining the right set of behaviors to get the overall desired effect (check out Rodney Brook’s papers for more info). The two key behaviors are lookBackAndForth and pauseRotate. There are some other support behaviors that you can see in the diagram below.
The lookBackAndForth behavior uses the body angle estimate to decide if the robot has turned too much and reverses the turning direction. The limits are +/- 60 degrees from where ever the robot starts at.
The pauseRotate behavior uses the range estimate from the ultrasonic range sensor to trigger a pause in the motion when something is close enough (less than a meter). It also will only trigger another pause if the robot has rotated enough from the last pause (about two degrees). The pause is 1000 cycles through the main while loop and then the counter returns to zero and the robot can move again.
I tried more elaborate behaviors before I settled on the simple pause but they didn’t work because they required constant movement to create a model of where the person was. For me to feel like the robot was looking at me required the robot to stop moving altogether. The key take away I got from this project was that I could get an emergent behavior by combining two simple component behaviors. I perceive the robot is performing this more complex behavior when it really is just simple pausing at the right moment. I intentionally magnified this effect by carving the pumpkins eyes to look straight forward at the person.
An ultrasonic range sensor is a terrible way of detecting a person because fabric doesn’t really return an echo. You can see me holding a book in the video to get it to see me better. An IR distance sensor would work much better but i don’t have one yet.
I used an LED candle. I think it would be a bad idea to use an actual candle.