Let's Make Robots!

Raspberry Pi Robot

Hopefully I didn't get your guys' hopes up, but I don't actually have a Raspberry Pi yet. However, it's on its way to my door (although I'm currently on vacation, so I'll have to wait a week). Now I'm filling up my time thinking of ways to use it. Most likely, I plan to make a robot from it. Since the Raspberry Pi has a lot more computational oomph than the Arduino, I want to make something more advanced than what I've done before. It'll probably be a mobile computer, with a keyboard, mouse, small screen, and perhaps some sort of manipulator to interact with the world. In addition, maybe I'll put a webcam on it and fool around with computer vision. 

Maybe I could use my Butler Bot platform? It needs to be stabilized, and I need to get stronger motors (it was way too slow before). I'm sure you all have some ideas, so lets here 'em!

Update, new idea: Maybe I could use an iRobot Create as the base platform? It seems to have a serial interface that I could use to communicate with the Raspberry Pi. It includes good sensors for obstacle avoidance (which I believe it handles on its own). I think it would be able to hold a raised platform with the Pi, monitor, input (mouse/small keyboard), and maybe a webcam on a pan/tilt mechanism (telepresence maybe?). I'll have to do more research though.

Update #2: Don't need an iRobot Create, my dad has an old Dirt Dog which he got replaced for free by iRobot when it started acting erratically. I bet some of the sensors are just dirty or something. Anyways, I believe it has the same serial interface as the Create/Roomba, so it will make a nice base for some mobile computer experiments. 

 

UDATE #3, 8/5/2012:

Thanks to the help of this tutorial and another, I now have my Raspberry Pi talking to my Arduino Uno (salvaged from MAEP). So far, my serial protocol only consists of commands for digital write, but I plan to add the abillity to control servos and get information from sensors.

I tried getting the Pi talking to the Dirt Dog over UART, but I had trouble getting the pySerial library to work (although I finally did in order to talk to the Arduino, maybe I should give it another go?). Also, the serial protocol for the Dirt Dog seems extremely complicated, whereas I can write my own and program it on the Arduino. 

I have a "blink" program written in Python, blinking the LED on pin 13 on and off every second just like the Arduino blink. A problem I noticed was the Arduino seemed to be randomly assigned a port everytime it was plugged into the Raspberry Pi. I'm not sure why this is, and may mess up my programs when it tries to connect to the port that happens to not have the Uno attached. If I can do a "try... catch..." type thing in Python, then maybe I can try to connect to either serial port, rather than crashing the program when it fails.

Finally, I need something to do with this future robot. I don't want to dedicate my Pi to a robot where it won't have any use that the Arduino can't handle itself. I'm thinking of adding a webcam and microphone for voice recognition/video navigation and tracking. Hopefully I can find a way to easily implement either one, preferably in Python as that was working for sending serial data easily. I've managed to do easy voice recognition in Processing by using Google Voice. However, that will require an internet connection, meaning I'll have to get a Wifi adapter for my Pi if I want the robot untethered... 

I've got quite a lot of hurdles to clear, and hopefully all that made some sense to you guys. I welcome feedback in the comments, 'cause I really don't know what I'm doing right now :D

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
merser's picture

This is a very interesting article for anyone interested in using the pi's GPIO.

http://codeandlife.com/2012/07/03/benchmarking-raspberry-pi-gpio-speed/

GeneralGeek's picture

Thanks for the link! 

TinHead's picture

... it has Linux on it and while Linux runs pretty fast it is not as realtime as a microcontroller doue to reasons such as latency, bottle necks and so on.

I'm waiting for a Pi myself and I plan to use it as a high level brain doing the hard stuff like detecting faces or colors using a webcam, do text to speech and speech recognition, record a map of environment ... and finally act on inputs by controlling a lower level board trough serial connection for example which takes care on driving motors, reading sensors etc.

The low level stuff can be handled by an arduino without problems.

6677's picture

Although it isn't just limited to linux, you can write raw ARM assembly for it

TinHead's picture

... but then why bother paying for a pi? you could just get one of those cortex m0 or m3 

6677's picture

In the UK the average price for a low end ARM processor dev board is roughly £15 to £25. The pi is around £25 board only without postage. Plus you get 2 USB's, the SD card, ethernet, sound and graphics and soon to come is a camera mounting to the CSI connector on the board (although you can of course get a serial camera module or a USB webcam).

TinHead's picture

bah double post

GeneralGeek's picture

That seems way over my head at this point... I'm going to go with an iRobot base (my dad's old Dirt Dog), and send commands over serial. I may need another board like an Arduino for extra sensors/actuators though. 

6677's picture

Just bear in mind only 1 pin is capable of PWM although you could dedicate a microcontroller over serial to controlling your servo's for you. Just send servo positions to it. The sensors should be able to donnect straight to the pi though