diff -urdN ../../Tekkotsu_2.2/project/Environment.conf ./Environment.conf
--- ../../Tekkotsu_2.2/project/Environment.conf	Wed Dec 31 19:00:00 1969
+++ ./Environment.conf	Tue Nov 16 14:02:46 2004
@@ -0,0 +1,93 @@
+###########  ENVIRONMENT VARIABLES  ###############
+# If you need to modify these, you should set them as environment
+# variables instead of changing them here - that way other tools (such
+# as mntmem and crashDebug) can use these as well.
+
+# Directory the Tekkotsu framework is stored
+TEKKOTSU_ROOT ?= /usr/local/Tekkotsu
+
+# Location where the memstick will be mounted
+# If you're using cygwin, you probably want something like
+# '/cygdrive/e' instead. 
+MEMSTICK_ROOT ?= /mnt/memstick
+
+# Directory where the OPEN-R SDK was installed
+# See http://www.tekkotsu.org/SDKInstall.html
+# or the OPEN-R website: http://openr.aibo.com/
+OPENRSDK_ROOT ?= /usr/local/OPEN_R_SDK
+
+# in case your memory stick drivers use uppercase, you'll need to
+# set 'FILENAME_CASE' to 'upper'
+FILENAME_CASE ?= lower
+
+# this will delete files from the memory stick that aren't also in
+# your build image - except files at the root level of the memstick,
+# like memstick.ind
+# default: OFF (empty string) - any non-empty string is ON
+STRICT_MEMSTICK_IMAGE ?=
+
+# What model are you targeting?  This will look at the
+# $TEKKOTSU_ROOT/TARGET_MODEL file to find out.  If the file is not
+# found, it is created with the default setting TGT_ERS2xx.  change
+# the target model, make will automatically recompile everything for
+# you.
+# Legal values: TGT_ERS210 TGT_ERS220 TGT_ERS2xx TGT_ERS7
+TEKKOTSU_TARGET_MODEL ?= TGT_ERS7
+
+# What OS is this going to be running under?
+# Choices are:
+#   PLATFORM_APERIOS - the AIBO's OS
+#   PLATFORM_LOCAL - the current desktop environment (*Under development*)
+# If you need to do platform specific stuff in your code, best
+# to check #ifdef PLATFORM_APERIOS, and otherwise assume a UNIX-style
+# environment.  Note that non-Aperios implies no OPEN-R headers.
+TEKKOTSU_TARGET_PLATFORM ?= PLATFORM_APERIOS
+
+# This can be nice if you want to use 'more' to page through errors
+# if they occur.  Otherwise, try using 'cat' instead.
+# The default value below uses 'more', except on Mac OS X which uses 'cat'
+# since 'more' on OS X doesn't handle the console colors.
+TEKKOTSU_LOGVIEW ?= $(if $(findstring Darwin,$(shell uname)),cat,more)
+
+# These control the location that the temporary object files will
+# be stored.
+TEKKOTSU_BUILDDIR ?= $(TEKKOTSU_ROOT)/build
+PROJECT_BUILDDIR ?= build
+# or perhaps you would like one/both of these better:
+# puts build directory in local tmp, but avoids conflicts between
+# multiple frameworks or multiple projects
+#TEKKOTSU_BUILDDIR ?= $(shell echo /tmp/`cd $(TEKKOTSU_ROOT); pwd | tr / _`_build_$(USER) | sed "s/ /\\ /g")
+#PROJECT_BUILDDIR ?= $(shell echo /tmp/`pwd | tr / _`_build_$(USER) | sed "s/ /\\ /g")
+
+
+##########  TOOL SELECTION VARIABLES  #############
+# You probably don't really want to edit these unless you've
+# got something better in mind.
+ifeq ($(TEKKOTSU_TARGET_PLATFORM),PLATFORM_APERIOS)
+  CC=$(OPENRSDK_ROOT)/bin/mipsel-linux-gcc
+  CXX=$(OPENRSDK_ROOT)/bin/mipsel-linux-g++
+  LD=$(OPENRSDK_ROOT)/bin/mipsel-linux-ld
+  STRIP=$(OPENRSDK_ROOT)/bin/mipsel-linux-strip
+  MKBIN=$(OPENRSDK_ROOT)/OPEN_R/bin/mkbin
+  MKBINFLAGS=-p $(OPENRSDK_ROOT)
+  AR=$(OPENRSDK_ROOT)/bin/mipsel-linux-ar rcs
+  AR2=touch
+  FILTERSYSWARN=$(TEKKOTSU_ROOT)/tools/filtersyswarn/filtersyswarn $(OPEN_R_SDK)
+else
+  CC=gcc
+  CXX=g++
+  LD=ld
+  STRIP=strip
+  AR=ar rcs
+  AR2=touch
+  FILTERSYSWARN=$(TEKKOTSU_ROOT)/tools/filtersyswarn/filtersyswarn /usr/include
+endif
+STUBGEN=$(OPENRSDK_ROOT)/OPEN_R/bin/stubgen2
+COLORFILT=$(TEKKOTSU_ROOT)/tools/colorfilt
+
+#These will be the actual build directories used for the current target
+TGT_BD:=$(TEKKOTSU_TARGET_PLATFORM)_$(TEKKOTSU_TARGET_MODEL)
+TK_BD:=$(TEKKOTSU_BUILDDIR)/$(TGT_BD)
+PROJ_BD:=$(PROJECT_BUILDDIR)/$(TGT_BD)
+$(shell mkdir -p $(TK_BD))
+$(shell mkdir -p $(PROJ_BD))
diff -urdN ../../Tekkotsu_2.2/project/Makefile ./Makefile
--- ../../Tekkotsu_2.2/project/Makefile	Thu Oct 14 16:22:51 2004
+++ ./Makefile	Tue Nov 16 21:52:45 2004
@@ -4,67 +4,11 @@
 ###################################################
 ##             ENVIRONMENT SETUP                 ##
 ###################################################
-
-
-###########  ENVIRONMENT VARIABLES  ###############
-# If you need to modify these, you should set them as environment
-# variables instead of changing them here - that way other tools (such
-# as mntmem and crashDebug) can use these as well.
-
-# Directory the Tekkotsu framework is stored
-TEKKOTSU_ROOT ?= /usr/local/Tekkotsu
-
-# Location where the memstick will be mounted
-MEMSTICK_ROOT ?= /mnt/memstick
-
-# Directory where the OPEN-R SDK was installed
-# See http://www.tekkotsu.org/SDKInstall.html
-# or the OPEN-R website: http://openr.aibo.com/
-OPENRSDK_ROOT ?= /usr/local/OPEN_R_SDK
-
-# in case your memory stick drivers use uppercase, you'll need to
-# set 'FILENAME_CASE' to 'upper'
-FILENAME_CASE ?= lower
-
-# this will delete files from the memory stick that aren't also in
-# your build image - except files at the root level of the memstick,
-# like memstick.ind
-# default: OFF (empty string) - any non-empty string is ON
-STRICT_MEMSTICK_IMAGE ?=
-
-# What model are you targeting?  This will look at the
-# $TEKKOTSU_ROOT/TARGET_MODEL file to find out.  If the file is not
-# found, it is created with the default setting TGT_ERS2xx.  change
-# the target model, make will automatically recompile everything for
-# you.
-# Legal values: TGT_ERS210 TGT_ERS220 TGT_ERS2xx TGT_ERS7
-TEKKOTSU_TARGET_MODEL ?= TGT_ERS7
-
-# What OS is this going to be running under?
-# Right now, the only choice is Aperios, but in the future we may
-# support running under linux systems, either as simulation for
-# AIBOs, or direct support for linux-based robots.
-TEKKOTSU_TARGET_PLATFORM ?= PLATFORM_APERIOS
-
-# This can be nice if you want to use more to page through errors
-# if they occur.  Otherwise, try using cat instead.
-TEKKOTSU_LOGVIEW ?= $(if $(findstring Darwin,$(shell uname)),cat,more)
-
-# These control the location that the temporary object files will
-# be stored.
-TEKKOTSU_BUILDDIR ?= $(TEKKOTSU_ROOT)/build
-PROJECT_BUILDDIR ?= build
-# or perhaps you would like something like this better:
-#TEKKOTSU_BUILDDIR ?= /tmp/tekkotsu_build_$(USER)
-#PROJECT_BUILDDIR ?= /tmp/project_build_$(USER)
-
+TEKKOTSU_ENVIRONMENT_CONFIGURATION?=$(shell pwd | sed 's/ /\\ /g')/Environment.conf
+include $(TEKKOTSU_ENVIRONMENT_CONFIGURATION)
 
 
 #############  MAKEFILE VARIABLES  ################
-# Change these right here in the Makefile
-
-# Want any other libraries passed to the compiler?  Put them here.
-LIBS=-lObjectComm -lOPENR -lInternet -lantMCOOP -lERA201D1
 
 # Would you like some more compiler flags?  We like lots of warnings.
 # There are some files with exceptions to these flags - MMCombo*.cc
@@ -72,24 +16,27 @@
 # have -Weffc++ and -DOPENR_DEBUG turned off.  If you want to modify
 # these exceptions, look in the middle of the 'Makefile Machinery'
 # section. (grep/search for the file name)
+
+ifeq ($(TEKKOTSU_TARGET_PLATFORM),PLATFORM_APERIOS)
+  PLATFORM_FLAGS= \
+	  -isystem $(OPENRSDK_ROOT)/OPEN_R/include/MCOOP \
+	  -isystem $(OPENRSDK_ROOT)/OPEN_R/include/R4000 \
+	  -isystem $(OPENRSDK_ROOT)/OPEN_R/include \
+	  -DOPENR_DEBUG
+else
+  PLATFORM_FLAGS=
+endif
+
 CXXFLAGS= \
 	-g -pipe -fno-inline \
-  -O2 -frename-registers -fomit-frame-pointer -ffast-math -fno-common \
+	-O2 -frename-registers -fomit-frame-pointer -ffast-math -fno-common \
 	-Wall -W -Wshadow -Wlarger-than-8192 -Wpointer-arith -Wcast-qual \
 	-Woverloaded-virtual -Weffc++ -Wdeprecated -Wnon-virtual-dtor \
-	-I"`pwd`" -I$(TEKKOTSU_ROOT) -I$(TEKKOTSU_ROOT)/Motion/roboop -I$(TEKKOTSU_ROOT)/Shared/newmat \
+	-I$(TEKKOTSU_ROOT) -I$(TEKKOTSU_ROOT)/Motion/roboop \
+	-I$(TEKKOTSU_ROOT)/Shared/newmat \
 	-isystem $(TEKKOTSU_ROOT)/Shared/jpeg-6b \
-	-isystem $(OPENRSDK_ROOT)/OPEN_R/include/MCOOP \
-	-isystem $(OPENRSDK_ROOT)/OPEN_R/include/R4000 \
-	-isystem $(OPENRSDK_ROOT)/OPEN_R/include \
-	-D$(TEKKOTSU_TARGET_PLATFORM) -DDEBUG -DOPENR_DEBUG -D$(TEKKOTSU_TARGET_MODEL) $(GLOBAL_MAP) \
-
-#These will be the actual build directories used for the current target
-TGT_BD:=$(TEKKOTSU_TARGET_PLATFORM)_$(TEKKOTSU_TARGET_MODEL)
-TK_BD:=$(TEKKOTSU_BUILDDIR)/$(TGT_BD)
-PROJ_BD:=$(PROJECT_BUILDDIR)/$(TGT_BD)
-$(shell mkdir -p $(TK_BD))
-$(shell mkdir -p $(PROJ_BD))
+	-D$(TEKKOTSU_TARGET_PLATFORM)  -D$(TEKKOTSU_TARGET_MODEL) \
+	-DDEBUG $(PLATFORM_FLAGS)
 
 
 ###################################################
@@ -106,10 +53,16 @@
 # into MMCombo.
 MAIN_SRCS:=$(PROJ_SRCS)
 
-# We can also link in third-party libraries
-USERLIBS:= $(TEKKOTSU_ROOT)/Shared/jpeg-6b/libjpeg.a \
-           $(TEKKOTSU_ROOT)/Motion/roboop/libroboop.a \
-           $(TEKKOTSU_ROOT)/Shared/newmat/libnewmat.a \
+# We can also link in third-party libraries (path relative to Tekkotsu root)
+# You'll need to specify which processes need which libraries in the next section
+USERLIBS:= $(TK_BD)/Shared/jpeg-6b \
+           $(TK_BD)/Motion/roboop \
+           $(TK_BD)/Shared/newmat \
+
+# These system libs are expected to already be compiled, will be linked
+# into all processes... if you only want to link into a single process,
+# see the *_LIBS variables of the next section
+LIBS=-lObjectComm -lOPENR
 
 
 ###################################################
@@ -125,9 +78,14 @@
 
 # These all are relative to TEKKOTSU_ROOT
 PROCESS_OBJS=MMCombo TinyFTPD SoundPlay
+
+# These specify the components of each process - list either individual
+# object files or entire directories
 MMCombo_COMP=MMCombo MMCombo/MMComboStub.o Behaviors Events Motion Shared SoundPlay/SoundManager.o SoundPlay/WAV.o Vision Wireless
 TinyFTPD_COMP=TinyFTPD TinyFTPD/TinyFTPDStub.o
 SoundPlay_COMP=SoundPlay SoundPlay/SoundPlayStub.o Shared/Config.o Shared/ProcessID.o Events/EventRouter.o Events/EventTranslator.o Events/EventBase.o Events/LocomotionEvent.o Events/TextMsgEvent.o Events/VisionObjectEvent.o Shared/LoadSave.o Shared/get_time.o
+
+# These just set up the automatically generated stub files
 STUB_FILES:=$(addprefix $(TEKKOTSU_ROOT)/,$(addsuffix /stub.cfg,$(PROCESS_OBJS)))
 STUB_CHECK_FILES:=$(addprefix $(TK_BD)/,$(subst /,-,$(STUB_FILES)))
 
@@ -139,56 +97,56 @@
 # vs. make install)
 
 ifeq ($(FILENAME_CASE),lower)
-
-PROCESSES=mmcombo tinyftpd sndplay
-mmcombo_OBJS:=$(addprefix $(PROJ_BD)/,$(MAIN_SRCS:$(SRCSUFFIX)=.o)) $(TK_BD)/MMCombo.o
-mmcombo_OCF:=$(TEKKOTSU_ROOT)/MMCombo/MMCombo.ocf
-tinyftpd_OBJS:=$(TK_BD)/TinyFTPD.o
-tinyftpd_OCF:=$(TEKKOTSU_ROOT)/TinyFTPD/TinyFTPD.ocf
-sndplay_OBJS:=$(TK_BD)/SoundPlay.o
-sndplay_OCF:=$(TEKKOTSU_ROOT)/SoundPlay/SoundPlay.ocf
-CONVERTCASE=$(TEKKOTSU_ROOT)/tools/makelowercase
-
-BINSUFFIX=.bin
-MSIMGDIR=ms
-INSTALLDIR=$(MSIMGDIR)/open-r/mw/objs
-MMCOMBOBIN=mmcombo.bin
-MAINFORK=mainobj.bin
-MOTOFORK=motoobj.bin
-
+  PROCESSES=mmcombo tinyftpd sndplay
+  mmcombo_OBJS:=$(addprefix $(PROJ_BD)/,$(MAIN_SRCS:$(SRCSUFFIX)=.o)) $(TK_BD)/MMCombo/MMComboStub.o
+  mmcombo_LIBS:=$(addprefix $(TK_BD)/,MMCombo.a Motion/roboop/libroboop.a Shared/newmat/libnewmat.a Shared/jpeg-6b/libjpeg.a) -lInternet -lantMCOOP -lERA201D1 
+  mmcombo_OCF:=$(TEKKOTSU_ROOT)/MMCombo/MMCombo.ocf
+  tinyftpd_OBJS:=$(TK_BD)/TinyFTPD/TinyFTPDStub.o
+  tinyftpd_LIBS:=$(addprefix $(TK_BD)/, TinyFTPD.a ) -lInternet -lantMCOOP
+  tinyftpd_OCF:=$(TEKKOTSU_ROOT)/TinyFTPD/TinyFTPD.ocf
+  sndplay_OBJS:=$(TK_BD)/SoundPlay/SoundPlayStub.o
+  sndplay_LIBS:=$(addprefix $(TK_BD)/, SoundPlay.a )
+  sndplay_OCF:=$(TEKKOTSU_ROOT)/SoundPlay/SoundPlay.ocf
+  CONVERTCASE=$(TEKKOTSU_ROOT)/tools/makelowercase
+  BINSUFFIX=.bin
+  MSIMGDIR=ms
+  INSTALLDIR=$(MSIMGDIR)/open-r/mw/objs
+  MMCOMBOBIN=mmcombo.bin
+  MAINFORK=mainobj.bin
+  MOTOFORK=motoobj.bin
 else
-
-PROCESSES=MMCOMBO TINYFTPD SNDPLAY
-MMCOMBO_OBJS:=$(addprefix $(PROJ_BD)/,$(MAIN_SRCS:$(SRCSUFFIX)=.o)) $(TK_BD)/MMCombo.o
-MMCOMBO_OCF:=$(TEKKOTSU_ROOT)/MMCombo/MMCombo.ocf
-TINYFTPD_OBJS:=$(TK_BD)/TinyFTPD.o
-TINYFTPD_OCF:=$(TEKKOTSU_ROOT)/TinyFTPD/TinyFTPD.ocf
-SNDPLAY_OBJS:=$(TK_BD)/SoundPlay.o
-SNDPLAY_OCF:=$(TEKKOTSU_ROOT)/SoundPlay/SoundPlay.ocf
-CONVERTCASE=$(TEKKOTSU_ROOT)/tools/makeuppercase
-
-BINSUFFIX=.BIN
-MSIMGDIR=MS
-INSTALLDIR=$(MSIMGDIR)/OPEN-R/MW/OBJS
-MMCOMBOBIN=MMCOMBO.BIN
-MAINFORK=MAINOBJ.BIN
-MOTOFORK=MOTOOBJ.BIN
-
+  PROCESSES=MMCOMBO TINYFTPD SNDPLAY
+  MMCOMBO_OBJS:=$(addprefix $(PROJ_BD)/,$(MAIN_SRCS:$(SRCSUFFIX)=.o)) $(TK_BD)/MMCombo/MMComboStub.o
+  MMCOMBO_LIBS:=$(addprefix $(TK_BD)/,MMCombo.a Motion/roboop/libroboop.a Shared/newmat/libnewmat.a Shared/jpeg-6b/libjpeg.a) -lInternet -lantMCOOP -lERA201D1 
+  MMCOMBO_OCF:=$(TEKKOTSU_ROOT)/MMCombo/MMCombo.ocf
+  TINYFTPD_OBJS:=$(TK_BD)/TinyFTPD/TinyFTPDStub.o
+  TINYFTPD_LIBS:=$(addprefix $(TK_BD)/, TinyFTPD.a ) -lInternet -lantMCOOP 
+  TINYFTPD_OCF:=$(TEKKOTSU_ROOT)/TinyFTPD/TinyFTPD.ocf
+  SNDPLAY_OBJS:=$(TK_BD)/SoundPlay/SoundPlayStub.o
+  SNDPLAY_LIBS:=$(addprefix $(TK_BD)/, SoundPlay.a )
+  SNDPLAY_OCF:=$(TEKKOTSU_ROOT)/SoundPlay/SoundPlay.ocf
+  CONVERTCASE=$(TEKKOTSU_ROOT)/tools/makeuppercase
+  BINSUFFIX=.BIN
+  MSIMGDIR=MS
+  INSTALLDIR=$(MSIMGDIR)/OPEN-R/MW/OBJS
+  MMCOMBOBIN=MMCOMBO.BIN
+  MAINFORK=MAINOBJ.BIN
+  MOTOFORK=MOTOOBJ.BIN
 endif
 
-# creates process build target names: MMCombo -> build/MMCombo.o
-BUILDS:=$(foreach proc,$(PROCESS_OBJS),$(TK_BD)/$(proc).o)
+# creates process build target names: MMCombo -> build/MMCombo.a
+BUILDS:=$(foreach proc,$(PROCESS_OBJS),$(TK_BD)/$(proc).a)
 
 # Each process build target depends on the component object files that
 # should be linked together.  These live in the $TK_BD directory and
 # should be fairly static unless you're editing the framework itself.
 # The automatic way of creating these dependancies automatically is
 # too messy, just add a rule for each process by hand: (skip lines!)
-$(word 1,$(BUILDS)): $(foreach comp,$($(word 1,$(PROCESS_OBJS))_COMP), $(if $(suffix $(comp)),$(TK_BD)/$(comp),$(patsubst $(TEKKOTSU_ROOT)%.cc,$(TK_BD)%.o,$(shell find $(TEKKOTSU_ROOT)/$(comp) -name "*.cc") )))
+$(word 1,$(BUILDS)): $(foreach comp,$($(word 1,$(PROCESS_OBJS))_COMP), $(if $(suffix $(comp)),$(TK_BD)/$(comp),$(patsubst $(TEKKOTSU_ROOT)%.cc,$(TK_BD)%.o,$(shell find "$(TEKKOTSU_ROOT)/$(comp)" -name "*.cc") )))
 
-$(word 2,$(BUILDS)): $(foreach comp,$($(word 2,$(PROCESS_OBJS))_COMP), $(if $(suffix $(comp)),$(TK_BD)/$(comp),$(patsubst $(TEKKOTSU_ROOT)%.cc,$(TK_BD)%.o,$(shell find $(TEKKOTSU_ROOT)/$(comp) -name "*.cc") )))
+$(word 2,$(BUILDS)): $(foreach comp,$($(word 2,$(PROCESS_OBJS))_COMP), $(if $(suffix $(comp)),$(TK_BD)/$(comp),$(patsubst $(TEKKOTSU_ROOT)%.cc,$(TK_BD)%.o,$(shell find "$(TEKKOTSU_ROOT)/$(comp)" -name "*.cc") )))
 
-$(word 3,$(BUILDS)): $(foreach comp,$($(word 3,$(PROCESS_OBJS))_COMP), $(if $(suffix $(comp)),$(TK_BD)/$(comp),$(patsubst $(TEKKOTSU_ROOT)%.cc,$(TK_BD)%.o,$(shell find $(TEKKOTSU_ROOT)/$(comp) -name "*.cc") )))
+$(word 3,$(BUILDS)): $(foreach comp,$($(word 3,$(PROCESS_OBJS))_COMP), $(if $(suffix $(comp)),$(TK_BD)/$(comp),$(patsubst $(TEKKOTSU_ROOT)%.cc,$(TK_BD)%.o,$(shell find "$(TEKKOTSU_ROOT)/$(comp)" -name "*.cc") )))
 
 # Each of the executable binaries depends on the corresponding
 # framework build target(s) plus any project files which were
@@ -201,11 +159,11 @@
 # hand: (skip lines!)
 PROC_BINS:=$(addprefix $(PROJ_BD)/,$(addsuffix $(BINSUFFIX),$(PROCESSES)))
 
-$(word 1,$(PROC_BINS)): $($(word 1,$(PROCESSES))_OBJS) $($(word 1,$(PROCESSES))_OCF)
+$(word 1,$(PROC_BINS)): $($(word 1,$(PROCESSES))_OBJS) $(filter-out -l%,$($(word 1,$(PROCESSES))_LIBS)) $($(word 1,$(PROCESSES))_OCF)
 
-$(word 2,$(PROC_BINS)): $($(word 2,$(PROCESSES))_OBJS) $($(word 2,$(PROCESSES))_OCF)
+$(word 2,$(PROC_BINS)): $($(word 2,$(PROCESSES))_OBJS) $(filter-out -l%,$($(word 2,$(PROCESSES))_LIBS)) $($(word 2,$(PROCESSES))_OCF)
 
-$(word 3,$(PROC_BINS)): $($(word 3,$(PROCESSES))_OBJS) $($(word 3,$(PROCESSES))_OCF)
+$(word 3,$(PROC_BINS)): $($(word 3,$(PROCESSES))_OBJS) $(filter-out -l%,$($(word 3,$(PROCESSES))_LIBS)) $($(word 3,$(PROCESSES))_OCF)
 
 
 ###################################################
@@ -233,16 +191,7 @@
 # memstick image directory
 INSTALL_BINS:=$(addprefix $(INSTALLDIR)/,$(MAINFORK) $(MOTOFORK) $(addsuffix $(BINSUFFIX),$(filter-out mmcombo MMCOMBO,$(PROCESSES))))
 
-CXX=$(OPENRSDK_ROOT)/bin/mipsel-linux-g++
-LD=$(OPENRSDK_ROOT)/bin/mipsel-linux-ld
-STRIP=$(OPENRSDK_ROOT)/bin/mipsel-linux-strip
-MKBIN=$(OPENRSDK_ROOT)/OPEN_R/bin/mkbin
-STUBGEN=$(OPENRSDK_ROOT)/OPEN_R/bin/stubgen2
-COLORFILT=$(TEKKOTSU_ROOT)/tools/colorfilt
-FILTERSYSWARN=$(TEKKOTSU_ROOT)/tools/filtersyswarn/filtersyswarn $(OPENRSDK_ROOT)
-MKBINFLAGS=-p $(OPENRSDK_ROOT)
-
-.PHONY: all compile install clean cleanDeps cleanProj cleanTemps Tekkotsu reportTarget newstick update docs dox doc cleandoc updateTools checkInstalledTimestamp
+.PHONY: all compile install clean cleanDeps cleanProj cleanTemps Tekkotsu reportTarget newstick update docs dox doc cleandoc updateTools updateLibs $(USERLIBS) checkInstallBinTimestamp test
 
 all: compile
 	@echo "Build successful."
@@ -251,45 +200,46 @@
 	@echo "  or: '$(TEKKOTSU_ROOT)/tools/{ftpinstall,ftpupdate} <ipaddr> ms' might also be useful"
 
 reportTarget:
-	@echo " ** Targeting $(TEKKOTSU_TARGET_MODEL) for build ** ";
+	@echo " ** Targeting $(TEKKOTSU_TARGET_MODEL) for build on $(TEKKOTSU_TARGET_PLATFORM) ** ";
 
 updateTools:
 	cd $(TEKKOTSU_ROOT)/tools && $(MAKE);
 
-updateLibs:
-	@echo "Updating libraries..."
-	@$(foreach x,$(USERLIBS),make -C $(dir $(x)) $(notdir $(x)) && ) true
+updateLibs: $(USERLIBS)
+
+$(USERLIBS):
+	@printf "$(notdir $@): "; \
+	export TEKKOTSU_ENVIRONMENT_CONFIGURATION="$(TEKKOTSU_ENVIRONMENT_CONFIGURATION)"; \
+	$(MAKE) -C $(patsubst $(TK_BD)%,$(TEKKOTSU_ROOT)%,$@)
+
+$(TK_BD)/%.a:
+	@export TEKKOTSU_ENVIRONMENT_CONFIGURATION="$(TEKKOTSU_ENVIRONMENT_CONFIGURATION)"; \
+	$(MAKE) -C $(patsubst $(TK_BD)%,$(TEKKOTSU_ROOT)%,$(dir $@))
 
 #the touch at the end is because memsticks seem to round time to even seconds, which screws up updates.  Grr.
-compile: reportTarget cleanTemps updateTools updateLibs checkInstalledTimestamp $(PROJ_BD)/installed.timestamp
+compile: cleanTemps updateTools updateLibs checkInstallBinTimestamp $(PROJ_BD)/installbin.timestamp
 	@image="$(PROJ_BD)/$(notdir $(MEMSTICK_ROOT))" ; \
-	if [ "$(TEKKOTSU_ROOT)/TARGET_MODEL" -nt "$$image" ] ; then \
-		echo "Deleting old cached OPEN-R binaries"; \
-		rm -rf "$$image" ; \
-	fi; \
 	if [ \! -d "$$image" ] ; then \
 		if [ \! -d "$(SYSTEM_BINARIES)" ] ; then \
-v			echo "Could not find OPEN-R system binaries" ; \
+			echo "Could not find OPEN-R system binaries" ; \
 			exit 1 ; \
 		fi ; \
 		echo "Copying system files..." ; \
 		cp -r "$(SYSTEM_BINARIES)" "$$image" ; \
 		chmod -R u+w "$$image" ; \
-		cur=`pwd`; \
-		cd "$$image"; \
-		$(CONVERTCASE) -r *; \
-		cd "$$cur"; \
+		$(CONVERTCASE) -r $$image/*; \
 		rm -f "$$image/open-r/mw/conf/connect.cfg" "$$image/open-r/mw/conf/object.cfg" "$$image/open-r/system/conf/wlandflt.txt" ; \
 		curt=`date +%Y%m%d%H%M`; \
 		find "$$image" -exec touch -ft $$curt \{\} \; ; \
 	fi;
 
-checkInstalledTimestamp:
+checkInstallBinTimestamp:
 	@for x in $(INSTALL_BINS) ; do \
-		if [ "$$x" -nt "$(PROJ_BD)/installed.timestamp" ] ; then \
+		if [ "$$x" -nt "$(PROJ_BD)/installbin.timestamp" ] ; then \
 			printf "Target switch detected, cleaning binaries..." ; \
 			rm -f $(INSTALL_BINS) ; \
 			printf "done.\n" ; \
+			exit 0; \
 		fi; \
 	done;
 
@@ -410,12 +360,6 @@
 		test $$retval -eq 0; \
 	fi;
 
-#This is for external libraries which we are including, such as libjpeg
-%.a:
-	export OPENRSDK_ROOT=$(OPENRSDK_ROOT) ;\
-	export TEKKOTSU_ROOT=$(TEKKOTSU_ROOT) ;\
-	$(MAKE) -C $(dir $@) $(notdir $@)
-
 #BUILDS:   (framework object files, one per process - resides in framework)
 $(BUILDS):
 	@if [ -r dist_hosts.txt -a -r $(PROJ_BD)/joblist.txt ] ; then \
@@ -429,34 +373,28 @@
 	else \
 		echo "$@ <- $(sort $(foreach comp,$(addprefix $(TK_BD)/,$(filter-out %.a,$($(basename $(notdir $@))_COMP))), $(if $(suffix $(comp)),$(comp),$(shell find $(comp) -name "*.o") )))" | sed 's@$(TK_BD)/@@g'; \
 	fi;
-	@$(LD) -i     $(sort $(foreach comp,$(addprefix $(TK_BD)/,$(filter-out %.a,$($(basename $(notdir $@))_COMP))), $(if $(suffix $(comp)),$(comp),$(shell find $(comp) -name "*.o") ))) -o $@ ; \
-		if [ $$? -ne 0 ] ; then exit 1; fi;
+	@rm -f $@;
+	@$(AR) $@ $(sort $(foreach comp,$(addprefix $(TK_BD)/,$(filter-out %.a,$($(basename $(notdir $@))_COMP))), $(if $(suffix $(comp)),$(comp),$(shell find $(comp) -name "*.o") )));
+	@$(AR2) $@
 
 #PROC_BINS:    (executable binaries, uncompressed)
 # we have to do a couple extra steps to cd into the builddir because
 # mkbin doesn't support -o target in a different directory... drops an
 # intermediate file in . and then complains (as of 1.1.3 anyway)
-$(PROJ_BD)/%$(BINSUFFIX): $(USERLIBS)
+$(PROJ_BD)/%$(BINSUFFIX):
 	@if [ -r dist_hosts.txt -a -r $(PROJ_BD)/joblist.txt ] ; then \
 		echo "Distributing compiles..."; \
 		../tools/pm.pl dist_hosts.txt $(PROJ_BD)/joblist.txt ; \
 	fi
 	@rm -f $(PROJ_BD)/joblist.txt; #this is so we don't rebuild multiple times
 	@echo "Creating executable binary..."
-	@echo "$@ <- $($(basename $(notdir $@))_OBJS), $($(basename $(notdir $@))_OCF), $(LIBS) $(USERLIBS)" | sed 's@ $(PROJ_BD)/@ @g';
-	@#we'll need to do some filtering on USERLIBS below because now we'll be in builddir below
-	@$(LD) -i $($(basename $(notdir $@))_OBJS) -o $(PROJ_BD)/tmp.o
-	@cp $($(basename $(notdir $@))_OCF) $(PROJ_BD)/tmp.ocf
-	@pt=`pwd`;\
-	cd $(PROJ_BD) ; \
-	$(MKBIN) $(MKBINFLAGS) -o $(notdir $@) tmp.o -m tmp.ocf $(LIBS) $(filter /%,$(USERLIBS)) $(addsuffix \",$(addprefix \"$$pt/,$(filter-out /%,$(USERLIBS)))) ; \
+	@echo "$@ <- $($(basename $(notdir $@))_OBJS), $($(basename $(notdir $@))_OCF), $($(basename $(notdir $@))_LIBS) $(LIBS)" | sed 's@ $(PROJ_BD)/@ @g';
+	@$(MKBIN) $(MKBINFLAGS) -o $@ $($(basename $(notdir $@))_OBJS) -m $($(basename $(notdir $@))_OCF) $($(basename $(notdir $@))_LIBS) $(LIBS) ; \
 	if [ $$? -gt 0 ] ; then \
 		echo "Build failed."; \
 		exit 1; \
 	fi; \
-	$(STRIP) $(notdir $@) ; \
-	rm tmp.o tmp.ocf;
-
+	$(STRIP) $@ ;
 
 #INSTALL_BINS:     (compressed executables, in proper location in image directory)
 $(INSTALLDIR)/%$(BINSUFFIX): $(PROJ_BD)/%$(BINSUFFIX)
@@ -485,16 +423,17 @@
 	@$(TEKKOTSU_ROOT)/tools/binstrswap/binstrswap $< MMCombo MotoObj | gzip -c > $@
 #	@sed 's/MMCombo/MotoObj/g;s/mmcombo/motoobj/g' $< | gzip -c > $@
 
-$(PROJ_BD)/installed.timestamp: $(INSTALL_BINS)
+$(PROJ_BD)/installbin.timestamp: $(INSTALL_BINS)
 	@touch $@
 
 install: compile
 	@echo "Installing files to memory stick at $(MEMSTICK_ROOT)"
 	@$(TEKKOTSU_ROOT)/tools/cpymem --all --img $(MSIMGDIR) --tgt $(MEMSTICK_ROOT) --tools $(TEKKOTSU_ROOT)/tools
+	@touch .copiedtomemstick.timestamp
 
 update: compile $(TEKKOTSU_ROOT)/tools/evenmodtime/evenmodtime
 	@echo "Syncing $(MSIMGDIR) and $(MEMSTICK_ROOT)"
-	@$(TEKKOTSU_ROOT)/tools/evenmodtime/evenmodtime `find $(MSIMGDIR)` $(PROJ_BD)/installed.timestamp
+	@$(TEKKOTSU_ROOT)/tools/evenmodtime/evenmodtime `find $(MSIMGDIR)` $(PROJ_BD)/installbin.timestamp
 	@$(TEKKOTSU_ROOT)/tools/mntmem $(MEMSTICK_ROOT)
 	@if [ $(STRICT_MEMSTICK_IMAGE) ] ; then \
 		echo "Strict image copy is on." ; \
@@ -503,6 +442,7 @@
 		rsync -rLtWCv $(MSIMGDIR)/* $(PROJ_BD)/$(notdir $(MEMSTICK_ROOT))/* $(MEMSTICK_ROOT) ; \
 	fi;
 	@$(TEKKOTSU_ROOT)/tools/umntmem $(MEMSTICK_ROOT)
+	@touch .copiedtomemstick.timestamp
 
 newstick:
 	$(TEKKOTSU_ROOT)/tools/mntmem $(MEMSTICK_ROOT)
@@ -523,7 +463,6 @@
 	rm -f $(foreach proc,$(PROCESS_OBJS),$(TEKKOTSU_ROOT)/$(proc)/$(proc)Stub.cc $(TEKKOTSU_ROOT)/$(proc)/$(proc)Stub.h $(TEKKOTSU_ROOT)/$(proc)/def.h $(TEKKOTSU_ROOT)/$(proc)/entry.h)
 	rm -rf $(TEKKOTSU_BUILDDIR)
 	cd $(TEKKOTSU_ROOT)/tools ; $(MAKE) clean
-	$(foreach lib,$(USERLIBS),$(MAKE) -C $(dir $(lib)) clean ;)
 
 cleanDeps:
 	@printf "Cleaning all .d files corresponding to .cc files..."
diff -urdN ../../Tekkotsu_2.2/project/StartupBehavior.cc ./StartupBehavior.cc
--- ../../Tekkotsu_2.2/project/StartupBehavior.cc	Mon Oct 18 13:01:38 2004
+++ ./StartupBehavior.cc	Wed Nov 10 20:45:37 2004
@@ -24,7 +24,7 @@
 BehaviorBase& ProjectInterface::startupBehavior=theStartup; //!< used by MMCombo as the init behavior
 
 StartupBehavior::StartupBehavior()
-	: BehaviorBase(), spawned(),setup(),
+	: BehaviorBase("StartupBehavior"), spawned(),setup(),
 		stop_id(MotionManager::invalid_MC_ID),
 		pid_id(MotionManager::invalid_MC_ID)
 {
diff -urdN ../../Tekkotsu_2.2/project/StartupBehavior.h ./StartupBehavior.h
--- ../../Tekkotsu_2.2/project/StartupBehavior.h	Mon Feb  9 17:45:29 2004
+++ ./StartupBehavior.h	Wed Nov 10 20:45:37 2004
@@ -49,8 +49,8 @@
 	virtual void DoStart();
 	virtual void DoStop();
 	virtual void processEvent(const EventBase&);
-	virtual std::string getName() const { return "StartupBehavior"; }
 	static std::string getClassDescription() { return "The initial behavior, when run, sets up everything else"; }
+	virtual std::string getDescription() const { return getClassDescription(); }
 	//@}
 protected:
 	//! Initializes the Controller menu structure - calls each of the other Setup functions in turn
diff -urdN ../../Tekkotsu_2.2/project/StartupBehavior_SetupBackgroundBehaviors.cc ./StartupBehavior_SetupBackgroundBehaviors.cc
--- ../../Tekkotsu_2.2/project/StartupBehavior_SetupBackgroundBehaviors.cc	Mon Oct 18 19:53:37 2004
+++ ./StartupBehavior_SetupBackgroundBehaviors.cc	Mon Nov 15 17:22:36 2004
@@ -16,6 +16,7 @@
 #include "Behaviors/Demos/CameraBehavior.h"
 #include "Behaviors/Demos/MotionStressTestBehavior.h"
 #include "Behaviors/Demos/ASCIIVisionBehavior.h"
+#include "Behaviors/Nodes/TailWagNode.h"
 
 #include "Shared/WorldState.h"
 #include "Shared/ERS210Info.h"
@@ -25,28 +26,29 @@
 	addItem(new ControlBase("Background Behaviors","Background daemons and monitors"));
 	startSubMenu();
 	{ 
-		addItem(new BehaviorSwitchControl<SimpleChaseBallBehavior>("SimpleChaseBallBehavior",false));
-		addItem(new BehaviorSwitchControl<StareAtBallBehavior>("StareAtBallBehavior",false));
-		addItem(new BehaviorSwitchControl<HeadLevelBehavior>("HeadLevelBehavior",false));
+		addItem(new BehaviorSwitchControl<SimpleChaseBallBehavior>("Simple Chase Ball",false));
+		addItem(new BehaviorSwitchControl<StareAtBallBehavior>("Stare at Ball",false));
+		addItem(new BehaviorSwitchControl<HeadLevelBehavior>("Head Level",false));
 		if(state->robotDesign & WorldState::ERS220Mask)
-			addItem(new BehaviorSwitchControl<ToggleHeadLightBehavior>("ToggleHeadLightBehavior",false));
-		addItem(new BehaviorSwitchControl<RelaxBehavior>("RelaxBehavior",false));
-		addItem(new BehaviorSwitchControl<CameraBehavior>("CameraBehavior",false));
-		addItem(new BehaviorSwitchControl<ASCIIVisionBehavior>("ASCIIVisionBehavior",false));
+			addItem(new BehaviorSwitchControl<ToggleHeadLightBehavior>("Toggle Head Light",false));
+		addItem(new BehaviorSwitchControl<TailWagNode>("Wag Tail",false));
+		addItem(new BehaviorSwitchControl<RelaxBehavior>("Relax",false));
+		addItem(new BehaviorSwitchControl<CameraBehavior>("Camera",false));
+		addItem(new BehaviorSwitchControl<ASCIIVisionBehavior>("ASCIIVision",false));
 		addItem(new ControlBase("Debugging Tests","Stress tests"));
 		startSubMenu();
 		{
-			addItem(new BehaviorSwitchControl<MotionStressTestBehavior>("MotionStressTestBehavior",false));
-			addItem(new BehaviorSwitchControl<CrashTestBehavior>("CrashTestBehavior",false));
-			addItem(new BehaviorSwitchControl<FreezeTestBehavior>("FreezeTestBehavior",false));
+			addItem(new BehaviorSwitchControl<MotionStressTestBehavior>("Motion Stress Test",false));
+			addItem(new BehaviorSwitchControl<CrashTestBehavior>("Crash Test",false));
+			addItem(new BehaviorSwitchControl<FreezeTestBehavior>("Freeze Test",false));
 		}
 		endSubMenu();
 		addItem(new ControlBase("System Daemons","Provide some common sensor or event processing"));
 		startSubMenu();
 		{
-			addItem((new BehaviorSwitchControl<AutoGetupBehavior>("AutoGetupBehavior",false)));
-			addItem((new BehaviorSwitchControl<WorldStateVelDaemon>("WorldStateVelDaemon",false))->start());
-			addItem((new BehaviorSwitchControl<BatteryMonitorBehavior>("BatteryMonitorBehavior",false))->start());
+			addItem((new BehaviorSwitchControl<AutoGetupBehavior>("Auto Getup",false)));
+			addItem((new BehaviorSwitchControl<WorldStateVelDaemon>("World State Vel Daemon",false))->start());
+			addItem((new BehaviorSwitchControl<BatteryMonitorBehavior>("Battery Monitor",false))->start());
 		}
 		endSubMenu();
 	}
diff -urdN ../../Tekkotsu_2.2/project/StartupBehavior_SetupModeSwitch.cc ./StartupBehavior_SetupModeSwitch.cc
--- ../../Tekkotsu_2.2/project/StartupBehavior_SetupModeSwitch.cc	Mon Oct 18 15:57:52 2004
+++ ./StartupBehavior_SetupModeSwitch.cc	Tue Nov 16 19:01:14 2004
@@ -20,6 +20,7 @@
 #include "Behaviors/Demos/LookForSoundBehavior.h"
 #include "Behaviors/Demos/SimpleChaseBallBehavior.h"
 #include "Behaviors/Demos/StareAtBallBehavior.h"
+#include "Behaviors/Demos/WallTestBehavior.h"
 
 #include "Shared/ProjectInterface.h"
 
@@ -33,32 +34,33 @@
 		BehaviorSwitchControlBase::BehaviorGroup * bg = new BehaviorSwitchControlBase::BehaviorGroup();
 
 		//put behaviors here:
-		addItem(new BehaviorSwitchControl<HelloWorldBehavior>("HelloWorldBehavior",false));
+		addItem(new BehaviorSwitchControl<HelloWorldBehavior>("Hello World",false));
 		if(state->robotDesign&(WorldState::ERS210Mask|WorldState::ERS7Mask)) //this one only really works on the 210 or 7
-			addItem(new BehaviorSwitchControl<AlanBehavior>("AlanBehavior",bg,false));
-		addItem(new BehaviorSwitchControl<FollowHeadBehavior>("FollowHeadBehavior",bg,false));
-		addItem(new BehaviorSwitchControl<StareAtBallBehavior>("StareAtBallBehavior",false));
-		addItem(new BehaviorSwitchControl<SimpleChaseBallBehavior>("SimpleChaseBallBehavior",false));
-		addItem(new BehaviorSwitchControl<ChaseBallBehavior>("ChaseBallBehavior",bg,false));
-		addItem(new BehaviorSwitchControl<SoundTestBehavior>("SoundTestBehavior",bg,false));
-		addItem(new BehaviorSwitchControl<LookForSoundBehavior>("LookForSoundBehavior",bg,false));
+			addItem(new BehaviorSwitchControl<AlanBehavior>("Alan's Behavior",bg,false));
+		addItem(new BehaviorSwitchControl<FollowHeadBehavior>("Follow Head",bg,false));
+		addItem(new BehaviorSwitchControl<StareAtBallBehavior>("Stare at Pink Ball",false));
+		addItem(new BehaviorSwitchControl<SimpleChaseBallBehavior>("Simple Chase Ball",false));
+		addItem(new BehaviorSwitchControl<ChaseBallBehavior>("Chase Ball",bg,false));
+		addItem(new BehaviorSwitchControl<SoundTestBehavior>("Sound Test",bg,false));
+		addItem(new BehaviorSwitchControl<LookForSoundBehavior>("Look at Sound",bg,false));
 		addItem(new ControlBase("State Machine Demos","More fully developed demo applications"));
 		startSubMenu();
 		{
 			addItem(new BehaviorSwitchControlBase(new WalkToTargetMachine(ProjectInterface::visPinkBallSID),bg));
-			addItem(new BehaviorSwitchControl<BanditMachine>("BanditMachine",bg,false));
-			addItem(new BehaviorSwitchControl<ExploreMachine>("ExploreMachine",bg,false));
-			addItem(new BehaviorSwitchControl<PaceTargetsMachine>("PaceTargetsMachine",bg,false));
+			addItem(new BehaviorSwitchControl<BanditMachine>("Bandit State Machine",bg,false));
+			addItem(new BehaviorSwitchControl<ExploreMachine>("Explore State Machine",bg,false));
+			addItem(new BehaviorSwitchControl<PaceTargetsMachine>("Pace Targets State Machine",bg,false));
 		}
 		endSubMenu();
 		addItem(new ControlBase("Kinematics Demos","Showcases some of the newly developed kinematics code"));
 		startSubMenu();
 		{
-			addItem(new BehaviorSwitchControl<KinematicSampleBehavior>("KinematicSampleBehavior",bg,false));
-			addItem(new BehaviorSwitchControl<KinematicSampleBehavior2>("KinematicSampleBehavior2",bg,false));
-			addItem(new BehaviorSwitchControl<StareAtPawBehavior>("StareAtPawBehavior",bg,false));
-			addItem(new BehaviorSwitchControl<StareAtPawBehavior2>("StareAtPawBehavior2",bg,false));
-			addItem(new BehaviorSwitchControl<GroundPlaneBehavior>("GroundPlaneBehavior",bg,false));
+			addItem(new BehaviorSwitchControl<KinematicSampleBehavior>("Kinematic Sample 1",bg,false));
+			addItem(new BehaviorSwitchControl<KinematicSampleBehavior2>("Kinematic Sample 2",bg,false));
+			addItem(new BehaviorSwitchControl<StareAtPawBehavior>("Stare at Paw (pre-2.2)",bg,false));
+			addItem(new BehaviorSwitchControl<StareAtPawBehavior2>("New Stare at Paw",bg,false));
+			addItem(new BehaviorSwitchControl<GroundPlaneBehavior>("Ground Plane Test",bg,false));
+			addItem(new BehaviorSwitchControl<WallTestBehavior>("Wall Test",bg,false));
 		}
 		endSubMenu();
 	}
diff -urdN ../../Tekkotsu_2.2/project/StartupBehavior_SetupStatusReports.cc ./StartupBehavior_SetupStatusReports.cc
--- ../../Tekkotsu_2.2/project/StartupBehavior_SetupStatusReports.cc	Tue Dec 23 01:33:44 2003
+++ ./StartupBehavior_SetupStatusReports.cc	Thu Nov 11 15:35:00 2004
@@ -7,12 +7,14 @@
 #include "Behaviors/Controls/ProfilerCheckControl.h"
 #include "Behaviors/Controls/EventLogger.h"
 #include "Behaviors/Controls/SensorObserverControl.h"
+#include "Behaviors/Controls/BehaviorReportControl.h"
 
 ControlBase*
 StartupBehavior::SetupStatusReports() {
 	addItem(new ControlBase("Status Reports","Displays information about the runtime environment on the console"));
 	startSubMenu();
-	{ 
+	{
+		addItem(new BehaviorReportControl());
 		addItem(new BatteryCheckControl());
 		addItem(new ProfilerCheckControl());
 		addItem(new EventLogger());
diff -urdN ../../Tekkotsu_2.2/project/StartupBehavior_SetupTekkotsuMon.cc ./StartupBehavior_SetupTekkotsuMon.cc
--- ../../Tekkotsu_2.2/project/StartupBehavior_SetupTekkotsuMon.cc	Tue Aug 24 21:09:18 2004
+++ ./StartupBehavior_SetupTekkotsuMon.cc	Fri Nov 12 17:07:39 2004
@@ -12,6 +12,8 @@
 #include "Behaviors/Mon/RawCamBehavior.h"
 #include "Behaviors/Mon/SegCamBehavior.h"
 #include "Behaviors/Mon/WorldStateSerializerBehavior.h"
+#include "Behaviors/Mon/MicrophoneServer.h"
+#include "Behaviors/Mon/SpeakerServer.h"
 
 ControlBase*
 StartupBehavior::SetupTekkotsuMon() {
@@ -24,9 +26,11 @@
 		addItem((new BehaviorSwitchControl<WMMonitorBehavior>("Watchable Memory Monitor",false))->start());
 		addItem((new BehaviorSwitchControl<Aibo3DControllerBehavior>("Aibo 3D",false)));
 		addItem((new BehaviorSwitchControl<WorldStateSerializerBehavior>("World State Serializer",false)));
-		addItem((new BehaviorSwitchControl<RawCamBehavior>("RawCamServer",false)));
-		addItem((new BehaviorSwitchControl<SegCamBehavior>("SegCamServer",false)));
+		addItem((new BehaviorSwitchControl<RawCamBehavior>("Raw Cam Server",false)));
+		addItem((new BehaviorSwitchControl<SegCamBehavior>("Seg Cam Server",false)));
 		addItem((new BehaviorSwitchControlBase(new EStopControllerBehavior(stop_id)))->start());
+		addItem(new BehaviorSwitchControlBase(MicrophoneServer::GetInstance()));
+		addItem(new BehaviorSwitchControlBase(SpeakerServer::GetInstance()));
 	}
 	return endSubMenu();
 }
diff -urdN ../../Tekkotsu_2.2/project/StartupBehavior_SetupWalkEdit.cc ./StartupBehavior_SetupWalkEdit.cc
--- ../../Tekkotsu_2.2/project/StartupBehavior_SetupWalkEdit.cc	Fri May 14 03:18:19 2004
+++ ./StartupBehavior_SetupWalkEdit.cc	Fri May 14 03:18:19 2004
@@ -9,7 +9,7 @@
  * @author PA Gov. School for the Sciences 2003 Team Project - Motion group: Haoqian Chen, Yantian Martin, Jon Stahlman (creators)
  * 
  * $Author: ejt $
- * $Name: HEAD $
+ * $Name: HEAD $
  * $Revision: 1.1 $
  * $State: Exp $
  * $Date: 2004/11/17 04:36:48 $
diff -urdN ../../Tekkotsu_2.2/project/ms/config/ers210.kin ./ms/config/ers210.kin
--- ../../Tekkotsu_2.2/project/ms/config/ers210.kin	Mon Oct 18 19:11:05 2004
+++ ./ms/config/ers210.kin	Tue Nov 16 22:37:00 2004
@@ -721,10 +721,10 @@
 
 [IR_LINK3]
 joint_type: 0
-theta:     -1.570796326794895
+theta:      1.570796326794895
 d:         48.0
 a:          0.0
-alpha:     -1.570796326794895
+alpha:      1.570796326794895
 theta_min: -1.616175
 theta_max:  1.616175
 m:          0.0
@@ -741,10 +741,10 @@
 
 [IR_LINK4]
 joint_type: 0
-theta:     -2.02003
+theta:      1.12156
 d:         26.5
-a:          0.0
-alpha:     16.2027
+a:         16.2027
+alpha:      0.0
 theta_min: -0.558505
 theta_max:  0.558505
 m:          0.0
@@ -762,7 +762,7 @@
 [IR_LINK5]
 joint_type: 0
 immobile:   1
-theta:      1.26156
+theta:      1.20771
 d:          0.0
 a:          0.0
 alpha:     -0.0215808
diff -urdN ../../Tekkotsu_2.2/project/ms/config/ers220.kin ./ms/config/ers220.kin
--- ../../Tekkotsu_2.2/project/ms/config/ers220.kin	Mon Oct 18 19:11:05 2004
+++ ./ms/config/ers220.kin	Tue Nov 16 22:37:00 2004
@@ -611,10 +611,10 @@
 
 [IR_LINK3]
 joint_type: 0
-theta:     -1.570796326794895
+theta:      1.570796326794895
 d:         48.0
 a:          0.0
-alpha:     -1.570796326794895
+alpha:      1.570796326794895
 theta_min: -1.616175
 theta_max:  1.616175
 m:          0.0
@@ -631,10 +631,10 @@
 
 [IR_LINK4]
 joint_type: 0
-theta:     -2.02003
+theta:      1.12156
 d:         26.5
-a:          0.0
-alpha:     16.2027
+a:         16.2027
+alpha:      0.0
 theta_min: -0.558505
 theta_max:  0.558505
 m:          0.0
@@ -652,7 +652,7 @@
 [IR_LINK5]
 joint_type: 0
 immobile:   1
-theta:      1.26156
+theta:      1.20771
 d:          0.0
 a:          0.0
 alpha:     -0.0215808
diff -urdN ../../Tekkotsu_2.2/project/ms/config/tekkotsu.cfg ./ms/config/tekkotsu.cfg
--- ../../Tekkotsu_2.2/project/ms/config/tekkotsu.cfg	Mon Oct 18 17:57:13 2004
+++ ./ms/config/tekkotsu.cfg	Tue Nov 16 22:37:00 2004
@@ -1,6 +1,10 @@
-################################################################
-###################   Tekkotsu config   ########################
-################################################################
+##################################################################
+######################   Tekkotsu config   #######################
+##################################################################
+##################### $Name: HEAD $ ######################
+####################### $Revision: 1.1 $ ########################
+################## $Date: 2004/11/17 04:36:48 $ ##################
+##################################################################
 #
 # Format:
 #
@@ -30,9 +34,6 @@
 #     how it is being used...
 #
 ##################################################################
-####################### $Revision: 1.1 $ ########################
-################## $Date: 2004/11/17 04:36:48 $ ##################
-##################################################################
 
 
 
@@ -225,8 +226,18 @@
 [Motion]
 ##################################################################
 ##################################################################
+
+# Any motion related paths which are not absolute (i.e. do not
+# start with '/') will be assumed to be relative to this directory
 root=/ms/data/motion
+
+# This is the default set of walk parameters
 walk=walk.prm
+
+# The file specified by "kinematics" should define the kinematic
+# chains which form your robot.
+# "kinematic_chains" lists the names of the chains which should be
+# loaded from that file
 <ERS-2*>
 <ERS-210>
 kinematics=/ms/config/ers210.kin
@@ -250,6 +261,34 @@
 kinematic_chains=RBk
 kinematic_chains=Camera
 
+# These calibration parameters should specify the value to multiply a
+# desired position by in order to cause the joint to actually reach
+# that position.  This is then used both to calibrate joint values
+# which are sent to the system, and also sensor values which are
+# received back.
+# An unspecified joint is by default '1' which will then pass values
+# through unmodified.  Only PID joints are calibrated (i.e. LEDs and
+# ears are not)
+<ERS-7>
+#Only the knees and rotors have been calibrated
+#This is just kind of a rough calibration since
+#I don't know how well it will generalize across
+#individual robots anyway.
+calibrate:LFr:rotor=0.972
+calibrate:LFr:knee~=0.944
+calibrate:RFr:rotor=0.972
+calibrate:RFr:knee~=0.944
+calibrate:LBk:rotor=0.972
+calibrate:LBk:knee~=0.944
+calibrate:RBk:rotor=0.972
+calibrate:RBk:knee~=0.944
+</ERS-7>
+<ERS-2*>
+#ERS-2xx seems to be fairly well calibrated by system, but
+#you can always try to do better...
+</ERS-2*>
+
+# Sounds to play when turning estop on and off
 estop_on_snd=skid.wav
 estop_off_snd=yap.wav
 
@@ -292,4 +331,19 @@
 preload=skid.wav
 preload=yap.wav
 
+# Audio streaming settings
+# Audio from the AIBO's microphones
+streaming.mic_port=10070
+streaming.mic_sample_rate=16000
+streaming.mic_bits=16
+streaming.mic_stereo=true
+
+# Audio to the AIBO's speakers
+streaming.speaker_port=10071
+# Length of the speaker streaming buffer (ms)
+# Streamed samples are sent to the sound manager in packets of this length
+streaming.speaker_frame_length=64
+# Maximum delay (ms) during playback of received samples
+# If the playback queue gets longer it is emptied.
+streaming.speaker_max_delay=1000
 
diff -urdN ../../Tekkotsu_2.2/project/templates/behavior_header.h ./templates/behavior_header.h
--- ../../Tekkotsu_2.2/project/templates/behavior_header.h	Tue Aug 24 21:09:24 2004
+++ ./templates/behavior_header.h	Thu Nov 11 15:35:00 2004
@@ -12,7 +12,7 @@
 class CLASSNAME : public BehaviorBase {
 public:
 	//! constructor
-	CLASSNAME() : BehaviorBase() {}
+	CLASSNAME() : BehaviorBase("CLASSNAME") {}
 
 	virtual void DoStart() {
 		BehaviorBase::DoStart(); // do this first
@@ -29,9 +29,8 @@
 		// you can delete this function if you don't use any events...
 	}
 
-	virtual std::string getName() const { return "CLASSNAME"; }
-
 	static std::string getClassDescription() { return "DESCRIPTION"; }
+	virtual std::string getDescription() const { return getClassDescription(); }
 	
 protected:
 	
@@ -42,10 +41,10 @@
  * @author YOURNAMEHERE (Creator)
  *
  * $Author: ejt $
- * $Name: HEAD $
- * $Revision: 1.1 $
+ * $Name: HEAD $
+ * $Revision: 1.1 $
  * $State: Exp $
- * $Date: 2004/11/17 04:36:48 $
+ * $Date: 2004/11/17 04:36:48 $
  */
 
 #endif
diff -urdN ../../Tekkotsu_2.2/project/templates/header.h ./templates/header.h
--- ../../Tekkotsu_2.2/project/templates/header.h	Tue Aug 24 21:09:24 2004
+++ ./templates/header.h	Tue Aug 24 21:09:24 2004
@@ -15,7 +15,7 @@
  * @author YOURNAMEHERE (Creator)
  *
  * $Author: ejt $
- * $Name: HEAD $
+ * $Name: HEAD $
  * $Revision: 1.1 $
  * $State: Exp $
  * $Date: 2004/11/17 04:36:48 $
diff -urdN ../../Tekkotsu_2.2/project/templates/implementation.cc ./templates/implementation.cc
--- ../../Tekkotsu_2.2/project/templates/implementation.cc	Tue Aug 24 21:09:24 2004
+++ ./templates/implementation.cc	Tue Aug 24 21:09:24 2004
@@ -5,7 +5,7 @@
  * @author YOURNAMEHERE (Creator)
  *
  * $Author: ejt $
- * $Name: HEAD $
+ * $Name: HEAD $
  * $Revision: 1.1 $
  * $State: Exp $
  * $Date: 2004/11/17 04:36:48 $
