Balancer/README : manifest for the files for the CMU Balancing robot project
Copyright (c) 2005-2007 Garth Zeglin

This file is part of ArtLPC, distributed under the terms of
the GNU General Public License version 2 or later.

/****************************************************************/

The code in this directory implements controllers for the Balancer
robot.  It includes both the firmware code and host-side control
programs.  The firmware runs on the robot to read sensors, operate the
motor amplifiers, and communicate with a host.  The host programs
receive sensor values, compute control, and send torque data back.  At
115kbaud, this can achieve a 100Hz control rate, which is sufficient
to balance the robot.

There are several different linear models included to implement Kalman
estimators for different sensor configurations.  These are not yet
fully tested or tuned.

There is a sample LQR controller which can balance the robot using the
ground angle encoder and wheel encoders.

The firmware can be recompiled using a gcc configured as an arm-elf
cross-compiler, and downloaded across the serial port using a simple
downloader tool; this is documented separately.

The host software has been tested under OS X using gcc, but should be
easily ported to other POSIX targets.

Host software configuration:  
1. the name of the serial port is hardcoded in serial-robot-interface.c
2. the linear controllers have a MODEL symbol to select a linear model
3. to build just the host software:   make -f Makefile-POSIX

The communications uses a simple ASCII format; it would be
straightforward to write a host-side controller using a different
language or libraries.

  [Garth Zeglin]

--------------------------------------------------------------------------

  Makefile			general Makefile
  README			this file

Code for the embedded board:
  Makefile-OP03			Makefile for the embedded target
  Makefile-OP03-deps
  main.c			embedded application as I/O server over serial port for host
  config.h			source code configuration for setting library features 
  encoder_counter.c		basic support for polled quadrature decoding
  encoder_counter.h
  imu.c				basic support for polled analog IMU input and filtering
  imu.h				      
  sabertooth.c			motor amplifier interface		     
  sabertooth.h
  timer_interrupt.c		the timer interrupt entry which manages hardware polling
  timer_interrupt.h

Code for the host computer:
  Makefile-POSIX		Makefile for host side tools and tests
  Makefile-POSIX-deps

  example-controller.c		a trivial test controller to regulate wheel angle
  lqr-test.c			a LQR balancing control with estimator
  kalman-test.c			a LQR balancing controller which can use a Kalman estimator
  simulate-kalman.c		sanity check on the Kalman filter

  linear-control-no-gyro.c	linear systems for various sensor configurations
  linear-control-pitch-encoder.c
  linear-control.c

  matrix.c			basic matrix operations
  sensors.c			sensor calibration
  sensors.h
  serial-robot-interface.c	host interface to robot

--------------------------------------------------------------------------
