Roomba Robot Upgrade

Building Robots and Engineers

Controlling the Robots Using RoboRealm, a LAN, and a Java-based Server

  • May
  • 16

The Spring 2008 semester involved setting up a kind of structure where the robots could communicate with a centralized server that sends commands such as move, snap photos, and download processed photos. It was chosen to use RoboRealm software on the robot computers, and set up some Java software on the server machine to control the robots.

Here’s the files created for this effort

I. Setting up the client machines
The client machines are the computers running on top of each robot. They provide control to the Roomba and the webcam, and interface to the server that controls them. They are mini-computers running minimal versions of Windows XP Professional. It is recommended to remove any and all unnecessary software from these machines, and leave behind an extremely basic, clean install of the operating system. This includes disabling the Windows Firewall in order for the server to log into the machines and assume control.
Install the RoboRealm software onto the client machine. At the time of writing this document, version 1.8.12.3 is the latest available, however there are quite frequent releases of newer versions with more bugfixes. Check http://www.roborealm.com/ for the latest version of the software.
The first time you run RoboRealm, you will need to click “Open” and choose the custom-tailored RoboFile “client_config.robo” that has been written to match the desired functionality of the robots (more on this later). Also, click the “Options” button, and ensure that the appropriate video format is selected, as well as the API Server being active. Once these things have been done on the first run, they should be remembered and do not need to be done again unless a change is required. The machine is now ready to be logged into by the server.

II. Setting up the server
The server can be any computer that is on the same network connection as the client machines. This can be via direct cable connection, wireless network (either infrastructure or ad-hoc), or even via the internet! The development environment chosen was the Eclipse IDE for Java Developers. Eclipse was chosen because it is freely available for download, provides a simple yet powerful IDE, and utilizes the ever-common Java programming language. Visit http://www.eclipse org/downloads to download this IDE. Once Eclipse has been installed, open the software and close out of any “first-run” help wizards that may appear. You will be left with an empty project space. From the “File” menu, choose “New->Java Project.” Enter a project name such as “RoboControl” leaving the rest of the options in the window as they are. Click “Finish” at the bottom of the window. Now in your project pane on the left side of the screen, you should see a folder for your new project. Expand it until you can see the “src” folder beneath it (it should be empty). Now in your Widows explorer, you can navigate to the location of the four source files used in this project, Dimension.java, RoboControl.java, RR_API.java, and XML.java. Select all four of these files and drag them directly over to this “src” directory in the Eclipse project window. They should appear under a “default package” icon within the src directory. You are now ready to run/debug/alter the software!
Open the RoboControl.java file from within Eclipse. Read through it and understand the available commands to you. The full suite of them are defined from within the RR_API.java file, but the examples in RoboContol.java show some that might be useful for the purposes of this project. To run the software, simply go to the “Run” menu and choose “Run As -> Java Application.” Ensure that the IP address listed in RoboControl.java represents the IP address of the host machine you are trying to connect to. Also make sure that the host machine is up and running, with RoboRealm started and API server enabled. The commands set up in RoboControl.java should execute sequentially, and then disconnect from the host machine.

III. Examining the RoboFile
A key component in this project is to have a working RoboFile that provides the necessary parameters. RoboFiles are written in XML, and there are many examples available from the RoboRealm website. Basically, the file determines which features are enabled within RoboRealm and defines system variables and min/max limits for certain parameters.
Our RoboFile contains setup information for the iRobot Create, the Creative Live Motion camera, and a Math difference image processing function. The robot currently has three variables mapped to it, “left_motor” “right_motor” and “laser”. Setting the first two variables to the value of 128 stops the robot. Anything less than 128, and the motors will turn backwards; conversely, anything greater will move them forward. Setting the laser variable to 0 turns the laser off, while 1 turns the laser on.
The camera currently has only one variable mapped to it, called “move”. Setting this variable to 0 stops the camera from panning, tilting or zooming. Setting to 1 tilts up, 2 tilts down, 4 pans left, 8 pans right, and 16 returns the camera to home.

Leave a comment!


e-mail (required, but will not be published)


Message

 

© 2007 Roomba Robot Upgrade. Blog theme by blogstheme.com, debt consolidation.