Using the Lab Machines

Machines in the lab
We have 7 machines available for use: beorn, denethor, elrond, galadriel, sauron, theoden and thranduil.

Setting up your Andrew account
Before logging in for the first time, you will need to do the following:
 * 1) Connect to unix.andrew.cmu.edu (or log in to a Clusters Linux box)
 * 2) Run the following command:
 * 3) * /afs/cs.cmu.edu/project/weh5336/SetupAndrewAccountREL

Logging into the machines
Your username when you log in will be andrew_id@ANDREW.CMU.EDU (case sensitive). For example, if your Andrew ID is foo, then your username will be foo@ANDREW.CMU.EDU.

Using Choregraphe
Run 'choregraphe' from the command line.

Generating Modules
Run 'naomodulegenerator.sh' from the command line. The module will be created in the current directory. Be sure to use a different name for the project and the module.

Compiling Code
Naoqi is installed in /opt/naoqi and the cross tool chain is installed in /opt/naoctc.

The lab machines are currently not able to compile code to run offboard, but they can compile code to run onboard the robots.

You must set the environment variable AL_DIR to /opt/naoqi. In bash, this can be done with the command

export AL_DIR=/opt/naoqi

or as

setenv AL_DIR /opt/naoqi

in csh. You should add this line to your ~/.bashrc or ~/.cshrc so that you won't have to enter it in each new shell.

To compile code for the robot, from the project directory:


 * 1) mkdir robot_build
 * 2) cd robot_build
 * 3) sh ../crosscompile.sh /opt/naoctc ..
 * 4) cmake ..
 * 5) ccmake . (ccmake, not cmake)
 * 6) Within ccmake, set the MODULE_IS_REMOTE option to OFF
 * 7) Type 'c', 'c', and 'g' within ccmake to generate the Makefile
 * 8) make

This will create a .so file in the robot_build/src directory which contains your code. Note that an error message will appear that it failed to copy the file to the naoqi directory. This can be ignored, it is just because you don't have write access to this direcotry.

To run the code, copy it to the robot in the /opt/naoqi/modules/lib directory and edit /opt/naoqi/modules/lib/autoload.ini file to start your module. Your module will be called libxyz.so, put xyz at the end of the [extra] section in autoload.ini. Then restart Naoqi ('nao restart' on the robot via ssh, or click restart Naoqi via the Web Interface).