University of Calgary
Rob Kremer
Getting CASA and iRobot code

CPSC 601.68/599.68: Agent Communication
Fall 2011
Department of Computer Science
Computer
Science

Table of Contents:


Be forewarned that there will be occasional updates to the JAR files that you may need to re-download.


Download the jar file

You can download a complete copy of the iRobotCreate3, CASA, and abcl-src-0.25.0 projects from the archive file, iRobotCreate_src.jar. You can create your own project in eclipse and include this jar file in your project.

You can run CASA directly from the jar file as follows (assuming the jar file is in your current directory):

  java -jar iRobotCreate-src.jar [-?lLtT] [-help] [casa-runtime-command] 
For example, if I want to get help on the command line I type:
  java -jar iRobotCreate_src.jar -?
    Usage:
    casa [-lLtT?] [-LAC []] [-help] []
    where:
      l: Suppress automatically stating a LAC if there isn't one
      L: Automatically start a LAC at port 9000 if there isn't one
      LAC []: Automatically start a LAC at port  if there isn't one (defaults to 9000)
      t: turn tracing-to-file on
      T: Use a text interface if there's no command on the command line
      ?, help: Prints this help text
      <lisp-command>: any legal agent run-time command (runs dialogue mode if this is missing)
If I want to run a default LAC and then load a file called "x.lisp", I'd type:
  java -jar iRobotCreate_src.jar -L (load \"x.lisp\")
If I just want to interact with CASA on the command line, I'd type:
  java -jar iRobotCreate_src.jar

Configuration Issues

Several issues have arisen in the Eclipse configuration, and this section explains them.

iRobotCreate_src.jar updates

I recommend reloading the newest version of the casa jar file whenever a new one is available. I will let you know.

JVM and JDK versions

CASA is built for JVM 6.0, So you should make sure that that JDK compliance is set to 6.0 in the Eclipse preferences for the Java compiler:

You must also make sure the JVM is set to version 6.0 (aka: version 1.6) in the project preferences (last line of the centre panel):

Builder errors

Some people have had trouble with additional builders getting in the way. Check the builders in your project preferences, and make sure that any builders that are not the Java Builder are either removed or unchecked:

Loading the ontologies and init files

Each agents's initialization needs to load ontologies and initialization files to initialize it's ontology, policies, and conversation templates. These files are packaged into the project jar file. To make sure that the system can find the init.lisp in your resources, your properties for the CASA project should look like this (second line of the centre panel):

The 2nd line "CASA/dataFiles (class folder)" will allow the JVM to find the init.lisp file.

Still can't load init.lisp

Windows doesn't seem able to find the ontology and init files as a resource. If this is a problem for you, you might try unpacking these files in to your home directory. Do the following:

  1. In your home directory create a directory named "casa".
  2. Create a subdirectory in your "casa" directory called "dataFiles": ~/casa/dataFiles/
  3. Copy the the following files from inside the iRobotCreate_src.jar file into your new "casa" directory:

You should now be able to load the ontology and init files when you run CASA.

Including ABCL (the lisp interpreter) and Jdom (the XML interpreter)

Problems with timezone

It appears that in Java 6.0 no longer supports three-letter representations for time zones, but various O/Ss (eg: Mac O/S 10.5, Leopard and lower). This is important because several subsystems in casa have to format dates, and this uses the time zone. I believe I have fixed the problem in the code by resorting to a long millisecond representation whenever the formatting fails, but this won't be particularly pretty on your agent traces. If you are on Mac O/S 10.5 or lower, you could upgrade to Snow Leopard (10.6).

Doesn't seem to be a problem in Windows.

Can't see the LAC interface or agent windows appear outside of LAC MDI window

Occasionally CASA will not display the large MDI window for the LAC but agent windows appear as top-level windows, or the LAC MDI window will appear but some agent windows will appear as top-level windows outside the LAC MDI window. Agent windows start asynchronously with respect to both the creating agent and the created agent, and occasionally the GUI interface fails. So there can be a race condition between the LAC starting and the it's interface being available to to other agents to start their MDI windows. If an agent does not find the LAC interface (because it hasn't finished initializing), it will start a top-level window instead. Nothing to worry about.

Solution: In you lisp script, increase the wait time, "(sleep <seconds>)", between starting the LAC agent and starting the other agents. You might also try using (sleep-ignoring-interrupts <seconds>).


UofC
CPSC 601.68/599.68: Agent Communication
Department of Computer Science

Last updated 2009-11-13 18:31
Rob Kremer