Getting Started with the rUNSWift AIBO system
An older version of these notes is in GettingStarted.
Automated Script for Setup
This script has not been updated for use with git
An auto setup script can be run from:
/home/group09/public/cs3431_setup
Notes:
- Your existing ~/trunk directory will be deleted
- trunk will be checked out to ~/trunk
- Assumes your .bashrc does not already contain the required environmental variables
- Will compile code
- Provides a step by step guide to building/setting up a memory stick
- Will always setup a pForward
There is another script that just performs compilation and memory stick copying in:
/home/group09/public/new_stick
Getting the code
Use git to check out the code.
git clone http://www.cse.unsw.edu.au/~cs3431/rUNSWift.git trunk
If you ran this command in your home directory, you should now have a directory called 'trunk' in your home directory.
Remember that you can type:
git help
To get help on using git. You can also look at the git documentation page for more help.
Setting up your home directory
You'll need to edit the login scripts to set some environment variables. Login scripts are scripts like ".profile", ".bashrc", etc. If you checked out the source into your home directory, then adding the following lines to the end of your login script should work:
export ROBOCUP_DIR=~/trunk
export PATH=$PATH:${ROBOCUP_DIR}/bin:${ROBOCUP_DIR}/robot/bin
Setting up a git repository for a team
Login one of the workstations in robolab by the username of one of your team members (e.g: group07)
Make your team's bare repository with:
git clone --bare http://www.cse.unsw.edu.au/~cs3431/rUNSWift.git ~/git_repository
Now the other member can login to any of the workstations (or on their own laptop) and use the following command to access the repository of your team:
git clone [username]@robolab.ai.cse.unsw.edu.au:git_repository trunk
[username] is the account that you choose to keep the repository (e.g: group07)
Notes:
You (group07) doesn't need to specify group07@robolab..., it's easier to do:
check out from your own repository:
git clone ~/git_repository trunk
Building the robot binaries
Change into the trunk/robot directory and type 'make'.
If you get a lot of distcc errors, then either configure distcc, or stop the system from using it. To turn off distcc, edit robot/Makefile.config. Comment out the distcc line to turn this:
CXX = distcc $(PREFIX)/bin/mipsel-linux-g++
into this:
#CXX = distcc $(PREFIX)/bin/mipsel-linux-g++
CXX = $(PREFIX)/bin/mipsel-linux-g++
Making a memory stick
Insert a memory stick into the computer. If the computer mounts the memory stick itself, then you'll need to check it is mounted in the right spot. Run "memstick_path" to get the directory where the build system is expecting to find the memory stick. If this is incorrect, then you can either remount the memory stick in the right location, or edit the "memstick_path" script so that it gives the correct location. The standard location is "/media/ms".
If the computer doesn't mount the memory stick itself, then you should be able to mount the memory stick with the 'mountms' script. If this doesn't mount the memory stick, then you'll need to figure out why.
You should never eject a memory stick without unmounting it first. Most of the robocup scripts will do this for you. You should never eject the memory stick before the scripts have finished unmounting it.
The first time you use a memory stick
The very first time you use a memory stick, you should format it if you can. You should only do this with a Sony brand device. We've had problems with sticks breaking when formatted with non-Sony devices. If you re-format a memory stick, you should rename it to 'ms'.
Once formatted, you can copy the Aperios operating system onto the memory stick with the command 'os'. This command will delete everything on the memory stick and copy the operating system onto the memory stick.
Configuring the robot
The command 'spip' is used to Set the Player and IP.
spip playerModule IP_Postfix [playerNum] [teamNum]
e.g.
spip pForward 142
Choose IP addresses of the form 1TP there T is the team number, and P is the player number (usually 1-4).
Copying the rUNSWift code to the memory stick
The "ins" command copies the compiled binaries and config files to the memory stick.
Notes
- I removed the calls to coverage.py as many systems don't have this and it is not very useful for the class.
- Everything above was originally written for the subversion version control system. To help with the groupwork in the class, I've since moved to the git version control system (starting Semester 2 2009). I've tried to update things, but if I missed a reference to svn, please substitute it yourself.
- by default it would be nice to call the cloned git repository something other than 'trunk', but that's what it was called by default with the old subvserion based system so I've left it the same to reduce the chance I'll miss a change in these notes or one of the helper scripts.
- More information about the computer network in the Robotics Laboratory is available on the Robolab wiki, particularly on the Computers page.