Chapter 2. Quickstart

Fisrt, make sure your iRobot Create is operational. You may have to have a look at irobot.com/create if you need help with this step...

Once you have a working robot you can install the iRobot engine. The installation procedure may vary depending on your system, but it should not be unfamiliar to you. Once it is completed, you will be provided with a bin directory in which you will find the urbi-server-irobot binary. Other important files are located in the data directory.

Before launching the engine, you may need to change the system.comport value in the data/config.u file. It should have a value like COM1 on MS Windows, /dev/cu.SLAB_USBtoUART on Mac OS X or /dev/ttyUSB0 on Linux. The engine will abort if the port specified is incorect or doesn't have the proper permissions.

Go to your iRobot install directory, change to the bin directory and launch urbi-server-irobot. The following help message should appear :

usage: ./urbi-server-irobot [options] period [path1 path2 ...]
  period : base URBI interval in milliseconds
  path items are absolute or relative path elements searched in order
    for files when 'load' is called.
  options:
    -p port : specify the tcp port URBI will listen to.
    -b address: bind to a specific ip address.
    -n      : disable networking.
    -r      : enable reporting of time taken by URBI loop to execute
    -s <period>: shell-mode (no network) with given period
    -f      : enable fast mode: the server will run as fast
              as possible and emulate the period specified

To quickly launch the iRobot engine, just type :

./urbi-engine-irobot 50 ../data

The engine will display a header and say it is ready. If all is right, nothing more should happen. If your robot is switched off, or unreachable, the engine should say Waiting for robot initialisation.

At this time, your engine should be running. To test the connection, use either a tool specialy provided by Gostai, or a simple telnet client (please note that all URBI engine ports default to 54000).

telnet localhost 54000

If no error occurs, your telnet client should receive the same kind of header you saw in the engine window. The last line should give your connection id and be of the form :

[65000000:ident] *** ID: U135766920
[65000011:notag] *** Connected to robot

If this is not the case, please make sure you correctly installed the engine and followed the previous steps. Please refer to Troubleshooting and FAQ if you still have problems launching the server afterwards.

You are now ready to send commands to your robot through the iRobot URBI engine. For example try :

vars;
...
[00004004:notag] *** ledPlay = OBJ
...

The first line asks for all variables known by the server and the following lines, which you don't have to take care of for now, list symbols and their respective values.