Compiling and Running your Code

The purpose of this page is to explain how to run your client program. Of course, the first step is to compile your code. Once, you have a bug-free program, start the simulator. Then run your program. You should be able to run your program over and over without having to restart the simulator.

Compiling

The Aria software is not installed on the Winthrop network. Instead it is installed on the linux box in Dannelly's office named calgary. To compile and run your software, you must secure shell (ssh) to that machine.

Copy this file into the directory where your source code is located and name the file Makefile. To complile the code in the file named lab10.cpp type
        make lab10
This should create an executable file named lab10.

Running the Simulator

Running the simulator causes a new window to pop up (showing the vitual robot in its virtual world). Of course, you will want this window to appear on your machine's screen, not on calgary's screen. So, after you ssh to calgary and before you try to start up the simulator:
          DISPLAY=mymachine:0
          export DISPLAY
where mymachine is the name of your machine. Note that is a colon zero, not the letter O.

Calgary is a linux box and can only create new windows on other linux boxes. So, be sure that you are ssh-ing from a Linux machine, not from a MS Windows machine.

The simulator is located in the directory and file named
          /usr/local/Aria/bin/SRIsim
When this program starts, by default, it connects to TCP communication port 8101. When you start the program be sure to change the port number. Only one client program should connect to the simulator. And, a communication port can only be used by one simulator. Because it is likely that someone else might be running a copy of the simulator on calgary, you need to pick your own distinct port number that will be used by your copy of the simulator server and your client program. Pick a port number between 8000 and 8200, but don't use the default port number of 8101.

To run the simulator on port 8080, type
/usr/local/Aria/bin/SRIsim -p 8080 &
If you ever forget the port number that you picked for your copy of the simulator program, it is listed on the window's title.

Once you start the simulator, select "Load -> Params" and pick amigo. Then select "Load -> World" to load a virtual world.