telepresence

The Telepresence Roombot
We've detailed here the workings of the telepresence robot demonstrated in class; our initial platform can hopefully serve as the basis for your more involved projects.

Contents
The Basics Available Hardware The Code Getting Started

The Basics
Any good telepresence robot needs both a control mechanism and a feedback mechanism. For our Roombot, the systems were simple: a virtual trackpad to remotely drive the robot, and a live video stream of where we were going.

Generally, you'll want to implement these two components separately, as we have. Your end user-interface should seamlessly merge the two, but don't hesitate to hack different technologies together--it's often the easiest solution.

Available Hardware
Though we have an entire project dedicated to interfacing with this nifty little device, basic remote control is dead simple. The sample project includes code (just a few lines!) for motor control and bump sensor detection--for most projects, that's all the functionality you'll need exposed. Can interface directly through a serial connection, or with Serial-over-Bluetooth using the ElementDirect Bluetooth Access Module. (See iRobot Create page for details.)
 * iRobot Create**

The Create's cargo bay is also an excellent mount for additional hardware--we used the mount holes to build a cradle for the MacBook out of the VeX Robotics Kit.

Bluetooth, 802.11g WiFi, and decent battery life. Makes for an excellent server--Bluetooth for iRobot Create control, and WiFi for long-range control. Note that hardwiring the link between to the Create may increase battery life. The MacBook does not include a serial port, so you'll need a USB to serial converter.
 * MacBook**

Our demo was only tested on an iPhone with Mobile Safari, though an Android or Windows Mobile phone are certainly possibilities if you have access to one.
 * Smartphone**

Due to the nature of the UR wireless networks, direct communication between machines is impossible. Instead, you'll need to create an ad-hoc wireless network between the MacBook and any controlling computers. The process is unreliable and finicky at best, especially between platforms. View detailed setup instructions.
 * Ad-Hoc Wireless Network**

The Code

 * Download**: [|chatty-roomba.zip »]

To supplement the mostly-documented code, here's provide a brief, high-level overview of how the project is composed.

The hardware is simple: a MacBook server mounted onto an iRobot Create. The server controls the Create through Bluetooth, and hosts a Python webserver. Other machines can connect to the webserver to access an AJAX-based webpage "trackpad," which converts mouse coordinates into motor speeds. These commands are continuously sent back to the webserver, which forwards them to the Create.

The feedback system utilizes Apple's free QuickTime Broadcaster, capable of unicasting the MacBook's webcam across the network. The standard QuickTime Plugin is used for playback and is embedded into the control webpage.

Ready to dig in? The Mobile Webapps page has specifics on the technologies used and how to implement them yourself.

Getting Started

 * 1) Make sure the Roomba is turned on, and the Bluetooth Access Module is plugged in.
 * 2) In terminal, run ls /dev/tty.* to discover the device name. Should be /dev/tty.roombot, but occasionally reverts to /dev/tty.ElementSerial-Ele  or similar.
 * 3) cd into the program's directory and run sudo python roombot.py
 * 4) When prompted, enter the device name (from step 2), and the server port (80).
 * 5) The web server should boot up and start listening for connections on the specified port.
 * 6) Determine the IP address of that machine on whatever network configuration you're using. Ad-hoc or infrastructure WiFi will work fine, just make sure the computers can ping each other.
 * 7) From the other machine, navigate to http://se.rv.er.ip/ in any web browser (Safari is preferable). You should see the trackpad page (working, this time), and the webcam feed will automatically initialize.
 * 8) Refresh the page once or twice--for some reason, this decreases video stream lag.
 * 9) To control the robot, simply move the mouse over the trackpad. You can also send messages through the textbox at the bottom of the screen, which will be displayed on the robot's screen and spoken out loud.