Software Updates

From Tekkotsu Wiki

Revision as of 23:33, 14 February 2012 by Touretzky (Talk | contribs)
Jump to: navigation, search

Contents

General Update Procedure

This page contains tips for updating the Tekkotsu software on your workstation or robot. Make sure you have the necessary dot files installed (see below). The basic instructions for doing an update are:

sudo -s
cd /usr/local/Tekkotsu
cvs update
cd project
make -j4
exit

Note: the "-j4" above tells make to run 4 simultaneous processes. This is perfect for a dual-core machine with 2GB of RAM. If you have an older machine with 1GB of RAM then you may experience thrashing, so use "-j2" or leave the switch off entirely. You can tell if your machine is thrashing, or paging heavily, by listening to the hard drive, or by running "top" and looking at the amount of swap space used.

If you have the Mirage simulator installed, you should update that as well:

sudo -s
cd /usr/local/Tekkotsu/tools/mirage
make -j4
exit

Occasionally there are updates made to the Tekkotsu system files in the project directory, so it's a good idea to update the user project directory as well. Don't do this as root! Do it as "user". The steps are similar to the ones above:

cd ~/project
cvs update
make

If you mess up and do the update of ~/project as root instead of as user, you will need to go back and fix the file ownership information or you won't be able to compile anything as user. Click here for an explanation of how to fix the ownership information.

Recent Changes to the Software Configuration

2/14/2012: CVS dotfiles available

Use these dotfiles to make cvs updating go more smoothly.

cd
wget http://Chiara-Robot.org/download/dot-cvsrc
mv dot-cvsrc .cvsrc
cat /dev/null >.cvspass

7/21/2010: New dotfiles available

We've added dotfiles (.profile and .bashrc) to the Create/ASUS install instructions that make your Create/ASUS robot easier to use. The .profile puts /usr/local/Tekkotsu/tools/bin and /usr/local/Tekkotsu/tools/sbin on your search path so, for example, you can just type "ControllerGUI <host>" to run a ControllerGUI. The .bashrc file gives the shell a red and blue prompt string so that, when you have a terminal window on a workstation with multiple tabs, some of which are ssh connections to the robot and some of which are shells on the workstation, you can easily tell the difference. To upgrade an already-setup robot, follow these steps:

cd
wget http://Chiara-Robot.org/download/dot-profile
mv dot-profile .profile
wget http://Chiara-Robot.org/download/dot-bashrc
mv dot-bashrc .bashrc

2/2010: Change to Startup and UserBehavior Conventions

As of February 2010 the startup files in the ~/project directory have changed, and when you do a cvs update, you need to take the following steps to make Tekkotsu work again; otherwise you will get compilation errors:

cd ~/project
rm Startup*
cvs update

Then edit UserBehaviors.h and remove all conflict markers ("<<<<<<<<" and "========" and ">>>>>>>>") and any references to HelloWorldBehavior in Part 1 or Part 2.

With this change to Tekkotsu, you no longer need to register behaviors in UserBehaviors.h. Instead of creating, e.g., MyDemo.h.fsm, call the file MyDemo.cc.fsm and on the last line, write: REGISTER_BEHAVIOR(MyDemo);

Besides eliminating the need to edit UserBehaviors.h every time you write a new behavior, this change also makes compilations faster. If you choose to convert your existing behaviors to .cc.fsm files with REGISTER_BEHAVIOR calls then you can delete UserBehaviors.h and UserBehaviors.cc entirely.

9/2009: Install libasound-dev Sound Library

As of September 2009 you need to install libasound-dev due to enhancements to Tekkotsu's sound support under Linux. If you don't do this, Tekkotsu will report compilation or linking errors during the make process. To install it, type:

sudo apt-get install libasound2-dev

6/2009: Install Perl package Parse::RecDescent

You need to install the Perl module Parse::RecDescent in order to make use of the new stateparser released in June 2009. Tekkotsu now depends on this module, so installation is not optional. To install it, type:

sudo perl -MCPAN -e "install Parse::RecDescent"

The CPAN program may ask you if you want manual or automatic configuration; select automatic. It may also ask for permission to connect to the Internet; tell it "yes". If you get into any other kind of dialog with CPAN, just keep hitting Enter to accept the defaults and everything will be fine.