Recent changes to this wiki: (Note that diffs will appear in the atom feed, but not on this page.)

Note that I'm leaving.
diff --git a/index.mdwn b/index.mdwn
index 516575d..a9403fb 100644
--- a/index.mdwn
+++ b/index.mdwn
@@ -46,12 +46,12 @@ As noted above, this is a wiki and many of these pages are editable by people en
 Staff
 -----
 
-Lecturer-In-Charge: [Will Uther](http://www.cse.unsw.edu.au/~willu/).  Contact details are on my web page.
+Lecturer-In-Charge: Up through 2012 this course was taught by [Will Uther](http://www.cse.unsw.edu.au/~willu/).  As he's moved on to Google Australia, at this stage the future of COMP3431/9431 is unclear.
 
 Teaching style and other fuzzy stuff
 ------------------------------------
 
-I (Will) am a researcher at [NICTA](http://www.nicta.com.au/), who teaches at UNSW because I enjoy it (I hold a conjoint appointment at UNSW, and they do not pay me to teach).  My personal goal for this course is to teach top students how to build impressive intelligent systems, and possibly encourage some of them to go on to get PhDs (side note - I'm not suggesting that they all go into academia.  Australian industry needs more PhDs!).  For this reason, I teach to the top of the class - the motivated people who want to learn.
+I (Will) am a researcher at [NICTA](http://www.nicta.com.au/), who teaches at UNSW because I enjoy it.  My personal goal for this course is to teach top students how to build impressive intelligent systems, and possibly encourage some of them to go on to get PhDs (side note - I'm not suggesting that they all go into academia.  Australian industry needs more PhDs!).  For this reason, I teach to the top of the class - the motivated people who want to learn.
 
 The class has traditionally been fairly small (10-15 students).  I haven't found a textbook that covers the topics I cover in the right level of detail, so there is no set text.  I teach from my notes.  I do not use powerpoint or other projected slides.  I prefer to present ideas on the board and then discuss them.  The course is all about getting an intuitive feel for what is going on - you need to understand the algorithms in detail to implement them, but I assume you can all read those in a book.  I'm interested in making sure you know enough to know what you need to look up.  As of 2012 I've been putting videos of the lectures online at [UNSW TV](https://tv.unsw.edu.au/).  They are in the "Robot Software Architecture" collection in the [Computer Science and Engineering section](https://tv.unsw.edu.au/school/computer-science-and-engineering).
 

Add exam to wiki for posterity.
diff --git a/other/3431-exam-2012.pdf b/other/3431-exam-2012.pdf
new file mode 100644
index 0000000..50f3e99
Binary files /dev/null and b/other/3431-exam-2012.pdf differ

Extension
diff --git a/news/Assignment_1_extension_2012.mdwn b/news/Assignment_1_extension_2012.mdwn
new file mode 100644
index 0000000..4178c0e
--- /dev/null
+++ b/news/Assignment_1_extension_2012.mdwn
@@ -0,0 +1,7 @@
+Hi all,
+
+Today in class I granted an extension for Assignment 1.  You are welcome to demonstrate
+your code in the lab this Thursday with no loss of marks (the original due date).  If you wish you can also demonstrate
+your code in the lab next Thursday (1 week late) with a 10\% penalty.  You are allowed to try both and I'll take
+the best score.  There is an extension on the report until next Thursday with no loss of
+marks.

Add a news message about Leonardo working again.
diff --git a/news/Leonardo_working_9_2012.mdwn b/news/Leonardo_working_9_2012.mdwn
new file mode 100644
index 0000000..decffcf
--- /dev/null
+++ b/news/Leonardo_working_9_2012.mdwn
@@ -0,0 +1,3 @@
+Just a quick note to let everyone know that Leonardo has had its gyro/power board replaced and is now working.
+
+And you may want to look at the [[TurtleBot]] page that I've been populating with details on how to use the robots.  Feel free to add anything you discover.
\ No newline at end of file

More care and feeding
diff --git a/TurtleBot.mdwn b/TurtleBot.mdwn
index a126aff..a4be50b 100644
--- a/TurtleBot.mdwn
+++ b/TurtleBot.mdwn
@@ -19,16 +19,18 @@ I have put a simple recipe up on [[news/TurtleBot_Usage]].
 
 The laptops on the robots can be plugged in as expected.  Power on the iRobot Create base is a little more tricky.  The robots will only charge when in 'Passive' mode.  You can put the robot in Passive mode either with the TurtleBot Dashboard, or by making sure the robot is switched off when you plug it it.  *Note: Simply looking at the LEDs on the robot is not enough to tell if it is switched off.*
 
-When the robot is off, all LEDs are off.  When you turn it on, the main power LED will light.  If you plug in the serial conneciton, its centre LED will light.  If you then start the turtlebot software, the robot's LED will go out, and the two arrow LEDs on the white serial connector will light up as well as the centre LED.  You can now use the robot.
+When the robot is off, all LEDs are off.  (Remember, the opposite is not true: all LEDs being off does not mean the robot is off.)  When you turn it on, the main power LED will light up green.  If you plug in the serial conneciton, its centre LED will light.  If you then start the turtlebot software, the robot's LED will go out, and the two arrow LEDs on the white serial connector will light up as well as its centre LED.  You can now use the robot.
 
 To shut things down you need to:
 
-  * unplug the serial cable
+  * unplug the serial cable, and
   * turn the robot off with its power button.
   
 Note that if you simply unplug the serial cable, the robot will still be switched on even though no LEDs are lit.  To actively verify the robot is switched off you need to switch it on and then switch it off.
 
-The iRobot Create base will charge when plugged in (in Passive mode).  When charging the LED will pulse orange.  When finished charging the LED will sit green.  If the robot base has any power drain then it will charge, the LED will switch to green and then the battery will discharge.  The base will *not* switch back to charging until unplugged and re-connected to the power.  This is an easy way to have a flat battery when you go to use the robot.
+The iRobot Create base will charge when plugged in (when off/in Passive mode).  When charging the LED on the base will pulse orange.  When finished charging the LED will sit green.  If the robot base has any power drain then it will charge, the LED will switch to green and then the battery will discharge.  The base will *not* switch back to charging until unplugged and re-connected to the power.  This is an easy way to have a flat battery when you go to use the robot.
+
+If the robot is out of power then it will beep and turn itself off.
 
 See also the ROS Wiki [Care and Feeding](http://www.ros.org/wiki/turtlebot/Tutorials/TurtleBot%20Care%20and%20Feeding) page.
 

Add detail on care and feeding of turtlebots.
Add ROS link to sidebar.
diff --git a/TurtleBot.mdwn b/TurtleBot.mdwn
index f7f8291..a126aff 100644
--- a/TurtleBot.mdwn
+++ b/TurtleBot.mdwn
@@ -15,6 +15,23 @@ As the [[Pioneer]] robots also use ROS, until TurtleBot specific pages are gener
 
 I have put a simple recipe up on [[news/TurtleBot_Usage]].
 
+### Care and Feeding
+
+The laptops on the robots can be plugged in as expected.  Power on the iRobot Create base is a little more tricky.  The robots will only charge when in 'Passive' mode.  You can put the robot in Passive mode either with the TurtleBot Dashboard, or by making sure the robot is switched off when you plug it it.  *Note: Simply looking at the LEDs on the robot is not enough to tell if it is switched off.*
+
+When the robot is off, all LEDs are off.  When you turn it on, the main power LED will light.  If you plug in the serial conneciton, its centre LED will light.  If you then start the turtlebot software, the robot's LED will go out, and the two arrow LEDs on the white serial connector will light up as well as the centre LED.  You can now use the robot.
+
+To shut things down you need to:
+
+  * unplug the serial cable
+  * turn the robot off with its power button.
+  
+Note that if you simply unplug the serial cable, the robot will still be switched on even though no LEDs are lit.  To actively verify the robot is switched off you need to switch it on and then switch it off.
+
+The iRobot Create base will charge when plugged in (in Passive mode).  When charging the LED will pulse orange.  When finished charging the LED will sit green.  If the robot base has any power drain then it will charge, the LED will switch to green and then the battery will discharge.  The base will *not* switch back to charging until unplugged and re-connected to the power.  This is an easy way to have a flat battery when you go to use the robot.
+
+See also the ROS Wiki [Care and Feeding](http://www.ros.org/wiki/turtlebot/Tutorials/TurtleBot%20Care%20and%20Feeding) page.
+
 ### Setup
 
 You should already have [[ROS]] set up.
diff --git a/sidebar.mdwn b/sidebar.mdwn
index eaf69ae..512ea99 100644
--- a/sidebar.mdwn
+++ b/sidebar.mdwn
@@ -5,6 +5,7 @@ Quick Links
  - [[News]]
  - [[Lecture_plan]]
  - [[Assignments]]
+ - [[ROS]]
  - [[TurtleBot]]
  - [[Video]]
  - [[Site_Map|Map]]

Add assignments to wiki.
diff --git a/assignments.mdwn b/assignments.mdwn
index de31355..99474f7 100644
--- a/assignments.mdwn
+++ b/assignments.mdwn
@@ -10,12 +10,6 @@ HomeWork Assignments
 Large Assignments
 -----------------
 
-[[Robotics Assignment_1|assignments/2011/assign1.pdf]] and [[Beacon Pictures|assignments/2011/beacons]]
+[[Robotics Assignment_1|assignments/2012/assign1.pdf]]
 
-<!--
-Assignments 1 and 3 are practical assignments on the AIBOs and will be marked in lab.  The second assignment is a written assignment.
-
- * [[Assignment_1|assignments/2010/3431-assign1.pdf]]
- * [[Assignment_2|assignments/2010/3431-assign2.pdf]]
- * [[Assignment_3|assignments/2010/3431-assign3.pdf]]
--->
+Robotics assignment 2 will be due in the last lab of semester.  It will again be in groups of 4.  It will be to demonstrate something impressive on the turtlebots.  You may use code published on the web, but you must ackowledge this and use of third party code will be taken into account.  You will also need to write a report on your work.  The report will be worth 1/3 of the marks for the assignment.
diff --git a/assignments/2012/assign1.pdf b/assignments/2012/assign1.pdf
new file mode 100644
index 0000000..192af37
Binary files /dev/null and b/assignments/2012/assign1.pdf differ

Add units and coordinate conventions
diff --git a/ROS.mdwn b/ROS.mdwn
index 58825aa..04b40b2 100644
--- a/ROS.mdwn
+++ b/ROS.mdwn
@@ -5,6 +5,7 @@ Probably the best place to get information about ROS is the [ROS wiki](http://ww
  * [ROS Tutorials](http://www.ros.org/wiki/ROS/Tutorials)
  * [ROS API Documentation](http://www.ros.org/wiki/APIs), including
    * [Common ROS message types](http://www.ros.org/wiki/common_msgs)
+   * [Standard Units of Measure and Coordinate Conventions](http://www.ros.org/reps/rep-0103.html)
 
 ### Setup
 

Add more information about the robots.
diff --git a/TurtleBot.mdwn b/TurtleBot.mdwn
index cb75798..f7f8291 100644
--- a/TurtleBot.mdwn
+++ b/TurtleBot.mdwn
@@ -25,7 +25,23 @@ You can bring up the basic turtlebot software with the command `roslaunch turtle
 
 ### Notes
 
-The robot moves by receiving `Twist` messages on the `/cmd_vel` topic.
+##### Moving the Robot
+
+The robot moves by receiving `Twist` messages on the `/cmd_vel` topic.  These twist messages specify a velocity.  The robot doesn't go very fast, so if you send it a speed of 1 m/s it will not actually move that fast.  The robot will stop a short time after it receives its last message.  If you want it to keep moving, you need to keep sending it messages.
+
+###### Odometry
+
+The robot base (`/turtlebot_node`) publishes `Odometry` messages on `/odom`.  The `Twist` component of these contains the differential odometry.
+
+##### Sensing
+
+There are two sensors on the robot: a gyro and a kinect.
+
+###### Gyro
+
+The gyro information is published on `/imu/data`.
+
+###### Kinect
 
 A depth-map with colour information is published as a `PointCloud2` on the `/camera/rgb/points` topic (once the kinect is running).  This works better than trying to get images and depth maps and merge them yourself.  Accessing a PointCould2 from Python is messy.  There is some [code to help](https://code.ros.org/trac/ros-pkg/browser/stacks/common_msgs/trunk/sensor_msgs/src/sensor_msgs/point_cloud2.py).  Look at the `read_points` method.
 
@@ -33,4 +49,4 @@ Note that some elements of some of the fields can be NaN (Not a Number - the res
 
 The colour in a PointCloud2 is sometimes encoded strangely.  In particular, the header says that the `rgb` field is a float.  Really you should interpret it as 4 bytes, one byte for each of red, green and blue.  The fourth byte is generally 0.  One way to get this data out is to modify the `_get_struct_fmt()` function in the `point_cloud2.py` code above so that it gets three bytes for the rgb field rather than one float.
 
-I have also come across yellow and blue appearing swapped in the point cloud colours.  This appears to be because the red and green channels are swapped.  I couldn't see a way of detecting this from the PointCloud2 structure, but I will note that the ROS Image type has an `encoding` field that can take values of `rgb8` and `bgr8` amongst others.
+I have also come across yellow and blue appearing swapped in the point cloud colours.  This appears to be because the red and green channels are swapped.  I couldn't see a way of detecting this from the PointCloud2 structure, but I will note that the ROS `Image` type has an `encoding` field that can take values of `rgb8` and `bgr8` amongst others.

Fix spacing
diff --git a/ROS.mdwn b/ROS.mdwn
index 817f2c2..58825aa 100644
--- a/ROS.mdwn
+++ b/ROS.mdwn
@@ -1,6 +1,7 @@
 This page holds information about using the ROS Robot Operating System.
 
 Probably the best place to get information about ROS is the [ROS wiki](http://www.ros.org/wiki/).  Useful links in the ROS wiki include:
+
  * [ROS Tutorials](http://www.ros.org/wiki/ROS/Tutorials)
  * [ROS API Documentation](http://www.ros.org/wiki/APIs), including
    * [Common ROS message types](http://www.ros.org/wiki/common_msgs)
@@ -22,4 +23,4 @@ You'll also need to point the `ROS_MASTER_URI` environment variable at the ROS m
     echo "Opening local terminal with ROS_MASTER_URI = " $ROS_MASTER_URI
     gnome-terminal
 
-To use the script I type `usebot `&lt;robot name&gt; and then wait for two new terminals to open.
+To use the script I type `usebot ` &lt;robot name&gt; and then wait for two new terminals to open.

Fix some > signs
diff --git a/ROS.mdwn b/ROS.mdwn
index 465a2cf..817f2c2 100644
--- a/ROS.mdwn
+++ b/ROS.mdwn
@@ -7,7 +7,7 @@ Probably the best place to get information about ROS is the [ROS wiki](http://ww
 
 ### Setup
 
-ROS requires some environment variables to be set up.  These can be set in a shell by calling `source /opt/ros/`&lt;ROS version$gt;`/setup.bash`.  (This assumes you're using the default bash shell.  If you're using a different shell then look for an appropriate setup script in the same place.)  This command needs to run for each shell you're using ROS in.  The easiest way to do that is to make sure the line above appears in your `.bashrc` file which is read whenever a new shell is opened.
+ROS requires some environment variables to be set up.  These can be set in a shell by calling `source /opt/ros/`&lt;ROS version&gt;`/setup.bash`.  (This assumes you're using the default bash shell.  If you're using a different shell then look for an appropriate setup script in the same place.)  This command needs to run for each shell you're using ROS in.  The easiest way to do that is to make sure the line above appears in your `.bashrc` file which is read whenever a new shell is opened.
 
 If you're using your own ROS packages, you probably want to make a `ros_workspace` directory in your home directory.  You can then tell ROS about about it by appending it to the `ROS_PACKAGE_PATH` environment variable, e.g. add the line `export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:~/ros_workspace` to the end of your `.bashrc` file.
 
@@ -22,4 +22,4 @@ You'll also need to point the `ROS_MASTER_URI` environment variable at the ROS m
     echo "Opening local terminal with ROS_MASTER_URI = " $ROS_MASTER_URI
     gnome-terminal
 
-To use the script I type `usebot `&lt;robot name%gt; and then wait for two new terminals to open.
+To use the script I type `usebot `&lt;robot name&gt; and then wait for two new terminals to open.

Note that we're using i heart engineering parts.
diff --git a/TurtleBot.mdwn b/TurtleBot.mdwn
index 7e32240..cb75798 100644
--- a/TurtleBot.mdwn
+++ b/TurtleBot.mdwn
@@ -2,6 +2,7 @@ This page holds links useful for the COMP3431/9431 use of the TurtleBot robots.
 
  * We are using the [[ROS]] system for controlling our robots.
  * [TurtleBots](http://turtlebot.com/) have a web page, but that mostly describes the hardware.  There is also a page in the ROS wiki for [TurtleBot software](http://ros.org/wiki/Robots/TurtleBot), [tutorials](http://ros.org/wiki/turtlebot/Tutorials/) and some [simulations](http://ros.org/wiki/turtlebot_simulator).
+ * Our robots are using the [i heart engineering](http://iheartengineering.com/) parts.  This might be relevant as different suppliers use different gyroscopes.
 
 The turtlebots are called:
      Splinter, Leonardo, Donatello, Raphael, Michelangelo

Add notes on controlling and getting sensor data from the TurtleBot.
diff --git a/TurtleBot.mdwn b/TurtleBot.mdwn
index 11f1d48..7e32240 100644
--- a/TurtleBot.mdwn
+++ b/TurtleBot.mdwn
@@ -21,3 +21,15 @@ You should already have [[ROS]] set up.
 We do not have anything starting by default on the robots.  If anything robot related is running when you log in, that will cause problems.  The robots are set up to list everyone running a process on the robot when you log in.  If anyone apart from you is listed, then you probably want to reboot the robot's laptop.
 
 You can bring up the basic turtlebot software with the command `roslaunch turtlebot_bringup minimal.launch`.  Most of the ROS wiki instructions assume you have already done this (the standard setup has this happening automatically on boot, but we're not doing that).
+
+### Notes
+
+The robot moves by receiving `Twist` messages on the `/cmd_vel` topic.
+
+A depth-map with colour information is published as a `PointCloud2` on the `/camera/rgb/points` topic (once the kinect is running).  This works better than trying to get images and depth maps and merge them yourself.  Accessing a PointCould2 from Python is messy.  There is some [code to help](https://code.ros.org/trac/ros-pkg/browser/stacks/common_msgs/trunk/sensor_msgs/src/sensor_msgs/point_cloud2.py).  Look at the `read_points` method.
+
+Note that some elements of some of the fields can be NaN (Not a Number - the result of a division by 0).  The read_points code can filter these points out for you if you pass in the correct arguments.
+
+The colour in a PointCloud2 is sometimes encoded strangely.  In particular, the header says that the `rgb` field is a float.  Really you should interpret it as 4 bytes, one byte for each of red, green and blue.  The fourth byte is generally 0.  One way to get this data out is to modify the `_get_struct_fmt()` function in the `point_cloud2.py` code above so that it gets three bytes for the rgb field rather than one float.
+
+I have also come across yellow and blue appearing swapped in the point cloud colours.  This appears to be because the red and green channels are swapped.  I couldn't see a way of detecting this from the PointCloud2 structure, but I will note that the ROS Image type has an `encoding` field that can take values of `rgb8` and `bgr8` amongst others.

More information on setting up ROS and the turtlebots.
diff --git a/ROS.mdwn b/ROS.mdwn
new file mode 100644
index 0000000..465a2cf
--- /dev/null
+++ b/ROS.mdwn
@@ -0,0 +1,25 @@
+This page holds information about using the ROS Robot Operating System.
+
+Probably the best place to get information about ROS is the [ROS wiki](http://www.ros.org/wiki/).  Useful links in the ROS wiki include:
+ * [ROS Tutorials](http://www.ros.org/wiki/ROS/Tutorials)
+ * [ROS API Documentation](http://www.ros.org/wiki/APIs), including
+   * [Common ROS message types](http://www.ros.org/wiki/common_msgs)
+
+### Setup
+
+ROS requires some environment variables to be set up.  These can be set in a shell by calling `source /opt/ros/`&lt;ROS version$gt;`/setup.bash`.  (This assumes you're using the default bash shell.  If you're using a different shell then look for an appropriate setup script in the same place.)  This command needs to run for each shell you're using ROS in.  The easiest way to do that is to make sure the line above appears in your `.bashrc` file which is read whenever a new shell is opened.
+
+If you're using your own ROS packages, you probably want to make a `ros_workspace` directory in your home directory.  You can then tell ROS about about it by appending it to the `ROS_PACKAGE_PATH` environment variable, e.g. add the line `export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:~/ros_workspace` to the end of your `.bashrc` file.
+
+You'll also need to point the `ROS_MASTER_URI` environment variable at the ROS master you are using.  See the above tutorials if you don't know what a ROS master is.  For most robots, the MASTER runs on the robot.  To make using a robot and setting this variable easier, I use the following `usebot` script which opens new terminals locally and remotely with the appropriate variables set.  Any tabs you open in these new terminals will be set up correctly with no further action (assuming you have the above lines in your `.bashrc` files on both the lab machine and the robot).  The script relies upon having [ssh keys](https://help.ubuntu.com/community/SSH/OpenSSH/Keys) set up for the first ssh command to work.
+
+    #! /bin/sh
+    
+    echo "Opening terminal on robot"
+    ssh -X $1 gnome-terminal &
+    
+    export ROS_MASTER_URI=http://$1:11311/
+    echo "Opening local terminal with ROS_MASTER_URI = " $ROS_MASTER_URI
+    gnome-terminal
+
+To use the script I type `usebot `&lt;robot name%gt; and then wait for two new terminals to open.
diff --git a/TurtleBot.mdwn b/TurtleBot.mdwn
index 4bd1273..11f1d48 100644
--- a/TurtleBot.mdwn
+++ b/TurtleBot.mdwn
@@ -1,7 +1,7 @@
 This page holds links useful for the COMP3431/9431 use of the TurtleBot robots.
 
+ * We are using the [[ROS]] system for controlling our robots.
  * [TurtleBots](http://turtlebot.com/) have a web page, but that mostly describes the hardware.  There is also a page in the ROS wiki for [TurtleBot software](http://ros.org/wiki/Robots/TurtleBot), [tutorials](http://ros.org/wiki/turtlebot/Tutorials/) and some [simulations](http://ros.org/wiki/turtlebot_simulator).
- * We will be using [ROS](http://www.ros.org/), so the [ROS wiki](http://www.ros.org/wiki/) will be useful.
 
 The turtlebots are called:
      Splinter, Leonardo, Donatello, Raphael, Michelangelo
@@ -11,3 +11,13 @@ You can use ssh to connect to a robot:
     ssh z<studentid>@<robot>.ai.cse.unsw.edu.au
 
 As the [[Pioneer]] robots also use ROS, until TurtleBot specific pages are generated it might be useful to look at their notes.
+
+I have put a simple recipe up on [[news/TurtleBot_Usage]].
+
+### Setup
+
+You should already have [[ROS]] set up.
+
+We do not have anything starting by default on the robots.  If anything robot related is running when you log in, that will cause problems.  The robots are set up to list everyone running a process on the robot when you log in.  If anyone apart from you is listed, then you probably want to reboot the robot's laptop.
+
+You can bring up the basic turtlebot software with the command `roslaunch turtlebot_bringup minimal.launch`.  Most of the ROS wiki instructions assume you have already done this (the standard setup has this happening automatically on boot, but we're not doing that).

Add a pointer to the lecture recordings.
diff --git a/index.mdwn b/index.mdwn
index e9d1f49..516575d 100644
--- a/index.mdwn
+++ b/index.mdwn
@@ -53,7 +53,7 @@ Teaching style and other fuzzy stuff
 
 I (Will) am a researcher at [NICTA](http://www.nicta.com.au/), who teaches at UNSW because I enjoy it (I hold a conjoint appointment at UNSW, and they do not pay me to teach).  My personal goal for this course is to teach top students how to build impressive intelligent systems, and possibly encourage some of them to go on to get PhDs (side note - I'm not suggesting that they all go into academia.  Australian industry needs more PhDs!).  For this reason, I teach to the top of the class - the motivated people who want to learn.
 
-The class has traditionally been fairly small (10-15 students).  I haven't found a textbook that covers the topics I cover in the right level of detail, so there is no set text.  I teach from my notes.  I do not use powerpoint.  I prefer to present ideas on the board and then discuss them.  The course is all about getting an intuitive feel for what is going on - you need to understand the algorithms in detail to implement them, but I assume you can all read those in a book.  I'm interested in making sure you know enough to know what you need to look up.
+The class has traditionally been fairly small (10-15 students).  I haven't found a textbook that covers the topics I cover in the right level of detail, so there is no set text.  I teach from my notes.  I do not use powerpoint or other projected slides.  I prefer to present ideas on the board and then discuss them.  The course is all about getting an intuitive feel for what is going on - you need to understand the algorithms in detail to implement them, but I assume you can all read those in a book.  I'm interested in making sure you know enough to know what you need to look up.  As of 2012 I've been putting videos of the lectures online at [UNSW TV](https://tv.unsw.edu.au/).  They are in the "Robot Software Architecture" collection in the [Computer Science and Engineering section](https://tv.unsw.edu.au/school/computer-science-and-engineering).
 
 Assignments and labs are also run a little differently in my course to other Computer Science courses you may have encountered:
 
@@ -119,6 +119,6 @@ As an example of typical feedback, I'll post something from last year (2011):
 > the wiki do not suffice to cover the content of the class (and are out of date) and we should 
 > not have to rely of other peoples notes. 
 
-I agree this is an issue.  I will endeavour to clean up the notes on the wiki as the class is taught, but these will never be complete.  I will also try to get videos of the lectures online somehow.
+I agree this is an issue.  I will endeavour to clean up the notes on the wiki as the class is taught, but these will never be complete.  In 2012 I've been putting videos of the lectures online at [UNSW TV](https://tv.unsw.edu.au/).  They are in the "Robot Software Architecture" collection in the [Computer Science and Engineering section of UNSW TV](https://tv.unsw.edu.au/school/computer-science-and-engineering).
 
 I've also had feedback that the assignments are a bit disorganised.  This was because in 2011 we changed robots and operating systems.  In 2012 we will be changing robots again, but sticking with ROS.  After 2012 this should settle down again.

Add a missing 'export ROS_MASTER_URI=...'.
diff --git a/news/TurtleBot_Usage.mdwn b/news/TurtleBot_Usage.mdwn
index f27760f..8d254e6 100644
--- a/news/TurtleBot_Usage.mdwn
+++ b/news/TurtleBot_Usage.mdwn
@@ -25,11 +25,11 @@ In more detail:
    * Once started, the arrows pointing each direction on the white serial box should be lit.  They should stay lit continuously.
    * Check that the dashboard shows the diagnostic and output (leftmost two buttons) green
    * If something doesn't work, you might try killing and restarting your minimal bringup.  You'll also want to check that noone else is trying to use the same robot, and that noone else has left zomebie processes runnning on the robot.  If in doubt, reboot the laptop (This is currently a little tricky - I'll try to make it easier).
-* open a terminal on the desktop
-  * `export ROS_MASTER_URI=http://`&lt;robot&gt;`:11311/`
-  * `roslaunch turtlebot_teleop keyboard_teleop.launch`
-  * On the turtlebot dashboard, change the drive mode to full
-  * Check that you can control the robot base with the keyboard.
+ * open a terminal on the desktop
+   * `export ROS_MASTER_URI=http://`&lt;robot&gt;`:11311/`
+   * `roslaunch turtlebot_teleop keyboard_teleop.launch`
+   * On the turtlebot dashboard, change the drive mode to full
+   * Check that you can control the robot base with the keyboard.
 
 Now we'll get the Kinect going:
 
@@ -42,6 +42,7 @@ Now we'll get the Kinect going:
   * Again, if there are problems try restarting the kinect drivers (ctrl-c then re-run the command two lines up).  You also want to make sure there are no zombie kinect processes by you or anyone else
 * open another terminal on the desktop
   * We're now going to start rviz.  When you start rviz, you can supply a configuration.  If you don't supply one then it uses the last one you used.  For many of you this will be the turtlebot simulation.  For this demonstration, you want to start with a very basic config.  The easiest way to do this is the `rm -rf .rviz` in your home dir on the desktop.  A better way would be to make a simple config.
+  * `export ROS_MASTER_URI=http://`&lt;robot&gt;`:11311/`
   * `rosrun rviz rviz`
   * rviz should start up and not show much.
   * We can not view some data gathered by the kinect.  The wireless network in the lab is not high bandwidth.  Trying to send uncompressed video over it will not work well, and point clouds can be even larger.  We'll start by looking at a 'laser' that the kinect can simulate - this is one horizontal scan line of distance data rather than the full point cloud.

Add assignment dates and some turtlebot instructions.
diff --git a/news/Assignment_Dates_2012.mdwn b/news/Assignment_Dates_2012.mdwn
new file mode 100644
index 0000000..b476a24
--- /dev/null
+++ b/news/Assignment_Dates_2012.mdwn
@@ -0,0 +1,17 @@
+Hi all,
+
+As announced in class today, now that we have working robots I'm fixing assignment dates.
+
+Assignment 1 is similar to previous years: make a turtlebot move between 5 points on the field.  Due at the start of the lab of week 9.  There will be four beacons placed about the field - these will be the pink/yellow and pink/green robocup beacons.  Your team needs to implement three ROS objects:
+
+ * A Bayesian filter,
+ * A beacon detector,
+ * A control module
+
+Assignment 2 will be due in the last lab of semester, week 13.  It will be to do something interesting with the robots.  You can use any TurtleBot code you find on the web.  I've not played with these robots before - let's see what they can do.  If you're short of ideas, ask me.
+
+You should work in teams of 3 or 4 for these assignments.  You should have a different team for each assignment - i.e. if there are two people on a team for assignment 1, they would need my permission to be on the same team for assignment 2.  I only give permission in rare cases.
+
+Cheers,
+
+Will        :-}
diff --git a/news/TurtleBot_Usage.mdwn b/news/TurtleBot_Usage.mdwn
new file mode 100644
index 0000000..f27760f
--- /dev/null
+++ b/news/TurtleBot_Usage.mdwn
@@ -0,0 +1,66 @@
+After today's lab, where people were having trouble making the Kinect's work with the TurtleBots, I went though and checked them all.  They generally worked fine, but I've listed some useful points below.  Here are my notes:
+
+ * The Gyro on Leonardo was broken.  This showed up clearly in the Dashboard.
+ * The Kinect power connections were loose on a few robots.
+ * You need to be careful with your rviz setup.
+ * Generally you just need to follow the [turtlebot tutorials](http://ros.org/wiki/turtlebot/Tutorials/).
+
+In more detail:
+
+ * Log in to a lab desktop machine.
+ * Check that your '`.bashrc`' file contains the line '`source /opt/ros/electric/setup.bash`'  (or equivalent setup if you're using a different shell)
+ * Choose a robot
+   * Unplug the robot
+   * Check that the power light on the robot and on the white serial connector is off.
+   * Connect the white serial connector
+   * turn on the robot
+   * Check that the power is on on the robot and the white serial connector
+ * open a terminal on the desktop and ssh into the robot
+   * Check that your '`.bashrc`' file on the robot contains the line '`source /opt/ros/fuerte/setup.bash`'  (and if it didn't then log out and log back in again after you add it.  Remember that this file will be different on each robot as your robot home directories are not shared.)
+   * `roslaunch turtlebot_bringup minimal.launch`
+ * open a terminal on the desktop
+   * `export ROS_MASTER_URI=http://`&lt;robot&gt;`:11311/`
+   * `rosrun turtlebot_dashboard turtlebot_dashboard`
+   * Wait for everything to start.  This can take a little while.
+   * Once started, the arrows pointing each direction on the white serial box should be lit.  They should stay lit continuously.
+   * Check that the dashboard shows the diagnostic and output (leftmost two buttons) green
+   * If something doesn't work, you might try killing and restarting your minimal bringup.  You'll also want to check that noone else is trying to use the same robot, and that noone else has left zomebie processes runnning on the robot.  If in doubt, reboot the laptop (This is currently a little tricky - I'll try to make it easier).
+* open a terminal on the desktop
+  * `export ROS_MASTER_URI=http://`&lt;robot&gt;`:11311/`
+  * `roslaunch turtlebot_teleop keyboard_teleop.launch`
+  * On the turtlebot dashboard, change the drive mode to full
+  * Check that you can control the robot base with the keyboard.
+
+Now we'll get the Kinect going:
+
+* Check the power to the Kinect
+  * Check that Breaker 0 is green in the turtlebot dashboard.  If it isn't, click on it to make it green.
+  * On the robot, there is a small green LED on the Kinect cable.  This should now be lit indicating that the Kinect has power.  If it isn't then you may want to check that the kinect power cable is seated correctly.  If this happens and you're unsure what to do ask Will for help.
+* open another terminal on the desktop and ssh in to the robot
+  * `roslaunch turtlebot_bringup kinect.launch`
+  * Wait for everything to start.  This can take a while.
+  * Again, if there are problems try restarting the kinect drivers (ctrl-c then re-run the command two lines up).  You also want to make sure there are no zombie kinect processes by you or anyone else
+* open another terminal on the desktop
+  * We're now going to start rviz.  When you start rviz, you can supply a configuration.  If you don't supply one then it uses the last one you used.  For many of you this will be the turtlebot simulation.  For this demonstration, you want to start with a very basic config.  The easiest way to do this is the `rm -rf .rviz` in your home dir on the desktop.  A better way would be to make a simple config.
+  * `rosrun rviz rviz`
+  * rviz should start up and not show much.
+  * We can not view some data gathered by the kinect.  The wireless network in the lab is not high bandwidth.  Trying to send uncompressed video over it will not work well, and point clouds can be even larger.  We'll start by looking at a 'laser' that the kinect can simulate - this is one horizontal scan line of distance data rather than the full point cloud.
+  * Click 'add' and choose 'laser'
+  * in the laser section select the kinect's laser topic
+  * You should now be able to see some points in rviz.  Move in front of the robot and see how the points move.
+  * You can also add a camera and look at the camera topic.  As noted above, this takes a lot of bandwidth - it can take 30 seconds for a single frame.  I wouldn't leave this running.  Unchecking the checkbox next to 'camera' allows you to stop this without removing the entire configuration.
+  * You can also add a 'pointcloud2'.  For more details on how to add the camera or pointcloud2, see the turtlebot tutoral and the rviz documentation.
+
+Shutting down:
+
+* Close rviz
+* stop the Kinect.  (ctrl-c in the kinect bringup window)
+* turn off the 0'th breaker to make sure the kinect doesn't drain the robot's battery
+* stop the turtlebot dashboard
+* stop the turtlebot base (ctrl-c in the mininal bringup window)
+* turn off the turtlebot (press the robot's power button)
+* disconnect the white serial cable
+* connect the turtlebot power cable
+* connect the laptop power cable
+
+As noted above, I've used this approach to get all four working robots (not Leonardo) to move and see with the Kinect.  Some of them were a little temperamental, but any problems show up clearly in the diagnostics section of the turtlebot dashboard.

Update links to the robolab wiki now that it has moved.
Add more links to Turtlebot care and feeding.
diff --git a/Pioneer.mdwn b/Pioneer.mdwn
index 296d204..33d26f5 100644
--- a/Pioneer.mdwn
+++ b/Pioneer.mdwn
@@ -1,6 +1,6 @@
 This page holds links useful for the COMP3431/9431 use of the Pioneer robots.
 
- * The [RoboLab Wiki](http://robolab.ai.cse.unsw.edu.au/wiki/) is a useful resource.
+ * The [RoboLab Wiki](http://runswift.cse.unsw.edu.au/confluence/display/RaCSE/Robotics+at+CSE+Public+Access+Home+Page) is a useful resource.
  * We will be using [ROS](http://www.ros.org/), so the [ROS wiki](http://www.ros.org/wiki/) will be useful.
  * The [COMP4411 wiki](http://cgi.cse.unsw.edu.au/~cs4411/wiki/) has a useful [Pioneer guide](http://cgi.cse.unsw.edu.au/~cs4411/wiki/index.php?title=ActivMedia_Pioneer_Guide).
 
diff --git a/TurtleBot.mdwn b/TurtleBot.mdwn
index 5a3db34..4bd1273 100644
--- a/TurtleBot.mdwn
+++ b/TurtleBot.mdwn
@@ -1,8 +1,11 @@
 This page holds links useful for the COMP3431/9431 use of the TurtleBot robots.
 
- * [TurtleBots](http://turtlebot.com/) have a web page, but that mostly describes the hardware.  There is also a page in the ROS wiki for [TurtleBot software](http://ros.org/wiki/Robots/TurtleBot), including some [simulations](http://ros.org/wiki/turtlebot_simulator).
+ * [TurtleBots](http://turtlebot.com/) have a web page, but that mostly describes the hardware.  There is also a page in the ROS wiki for [TurtleBot software](http://ros.org/wiki/Robots/TurtleBot), [tutorials](http://ros.org/wiki/turtlebot/Tutorials/) and some [simulations](http://ros.org/wiki/turtlebot_simulator).
  * We will be using [ROS](http://www.ros.org/), so the [ROS wiki](http://www.ros.org/wiki/) will be useful.
 
+The turtlebots are called:
+     Splinter, Leonardo, Donatello, Raphael, Michelangelo
+
 You can use ssh to connect to a robot:
 
     ssh z<studentid>@<robot>.ai.cse.unsw.edu.au

Add Homework 1
diff --git a/assignments/2012/Homework1.pdf b/assignments/2012/Homework1.pdf
new file mode 100644
index 0000000..2327f25
Binary files /dev/null and b/assignments/2012/Homework1.pdf differ
diff --git a/news/Homework_1_2012.mdwn b/news/Homework_1_2012.mdwn
new file mode 100644
index 0000000..9229f78
--- /dev/null
+++ b/news/Homework_1_2012.mdwn
@@ -0,0 +1,7 @@
+Hi all,
+
+  I've just posted [[/assignments/2012/Homework1.pdf]].  It is due Friday of week 5.
+
+Be well,
+
+Will     :-}

Add links to the turtlebot simulator
diff --git a/TurtleBot.mdwn b/TurtleBot.mdwn
index 25202db..5a3db34 100644
--- a/TurtleBot.mdwn
+++ b/TurtleBot.mdwn
@@ -1,6 +1,6 @@
 This page holds links useful for the COMP3431/9431 use of the TurtleBot robots.
 
- * [TurtleBots](http://turtlebot.com/) have a web page, but that mostly describes the hardware.
+ * [TurtleBots](http://turtlebot.com/) have a web page, but that mostly describes the hardware.  There is also a page in the ROS wiki for [TurtleBot software](http://ros.org/wiki/Robots/TurtleBot), including some [simulations](http://ros.org/wiki/turtlebot_simulator).
  * We will be using [ROS](http://www.ros.org/), so the [ROS wiki](http://www.ros.org/wiki/) will be useful.
 
 You can use ssh to connect to a robot:

Change sidebar to point to TurtleBots and Video.
Add new pages for TurtleBots and Video.
diff --git a/TurtleBot.mdwn b/TurtleBot.mdwn
new file mode 100644
index 0000000..25202db
--- /dev/null
+++ b/TurtleBot.mdwn
@@ -0,0 +1,10 @@
+This page holds links useful for the COMP3431/9431 use of the TurtleBot robots.
+
+ * [TurtleBots](http://turtlebot.com/) have a web page, but that mostly describes the hardware.
+ * We will be using [ROS](http://www.ros.org/), so the [ROS wiki](http://www.ros.org/wiki/) will be useful.
+
+You can use ssh to connect to a robot:
+
+    ssh z<studentid>@<robot>.ai.cse.unsw.edu.au
+
+As the [[Pioneer]] robots also use ROS, until TurtleBot specific pages are generated it might be useful to look at their notes.
diff --git a/Video.mdwn b/Video.mdwn
new file mode 100644
index 0000000..0721f01
--- /dev/null
+++ b/Video.mdwn
@@ -0,0 +1,7 @@
+Lectures for COMP3431/9431 are being recorded and placed on [UNSW TV](http://tv.unsw.edu.au/).
+
+Currently the videos are only available to students and staff.  This is the first year I've run the videos and I don't have time to edit them at all, so I'm a little cautious about just sticking them on the web for all to see.
+
+There is a collection of videos called 'Robot Software Architecture' available in the [CSE](http://tv.unsw.edu.au/school/computer-science-and-engineering) part of UNSW TV.  I don't know how to make a direct link to that collection as yet.
+
+It takes a little while for me to transcode videos and get them displayed.  I hope to have all videos up by the following Monday, but I don't guarantee anything.  Currently I'm recording a separate video for each hour of lecture.  The videos are labelled by week, then 1/2 for Tuesday/Thursday and A/B for first hour/second hour.
diff --git a/sidebar.mdwn b/sidebar.mdwn
index bc6cbdd..eaf69ae 100644
--- a/sidebar.mdwn
+++ b/sidebar.mdwn
@@ -5,6 +5,6 @@ Quick Links
  - [[News]]
  - [[Lecture_plan]]
  - [[Assignments]]
+ - [[TurtleBot]]
+ - [[Video]]
  - [[Site_Map|Map]]
- - [[aibo]]
- - [[Pioneer]]

diff --git a/news/Change_of_rooms.mdwn b/news/Change_of_rooms.mdwn
new file mode 100644
index 0000000..790c79d
--- /dev/null
+++ b/news/Change_of_rooms.mdwn
@@ -0,0 +1,9 @@
+Hi all,
+
+Due to the cosyness of the room this morning I've arranged a change of room for the coarse.  We're now in the Australian School of Business room 216 on Tuesdays and room 130 on Thursdays.  Lecture times are unchanged.
+
+See you in the new location on Thursday :)
+
+Will      :-}
+
+P.S.  The lab location also changed from the draft timetable.  I'll go over that in class before the lab starts.  Next week the lab will be in the robotics lab on the 3rd floor of K17.

A few minor cleanups in formatting.
diff --git a/index.mdwn b/index.mdwn
index 5d24348..e9d1f49 100644
--- a/index.mdwn
+++ b/index.mdwn
@@ -10,13 +10,12 @@ Aims
 
 This course gives both a theoretical and a practical introduction to the control of robotic systems. The course is in two parts:
 
-<dl>
-<dt>Practical Robotics</dt>
-<dd>This part of the course gives students a practical introduction to some specific robot architectures; the main system architecture will be the Robot Operating System [ROS](http://www.ROS.org/).  We will be using older [Pioneer](http://www.mobilerobots.com/ResearchRobots/PioneerP3DX.aspx) robots and newer [TurtleBot](http://turtlebot.com/) Robots, or other robots as available.</dd>
-<dt>An overview of agent planning and learning systems</dt>
-<dd>This part of the course gives students an introduction to the theory of decision making: How can an agent build up knowledge of its world?  Having done that, how can an agent choose its actions? A variety of different decision making and planning architectures are covered; including classical planning, reinforcement learning and cognitive architectures. In labs, students will get hands on experience with some of these planning systems. Assessment of this part will be by quiz and final exam.</dd>
-</dl>
+* **Practical Robotics**
+
+ This part of the course gives students a practical introduction to some specific robot architectures; the main system architecture will be the Robot Operating System, [ROS](http://www.ROS.org/).  We will be using older [Pioneer](http://www.mobilerobots.com/ResearchRobots/PioneerP3DX.aspx) robots and newer [TurtleBot](http://turtlebot.com/) Robots, or other robots as available.
+* **An overview of agent planning and learning systems**:
 
+ This part of the course gives students an introduction to the theory of decision making: How can an agent build up knowledge of its world?  Having done that, how can an agent choose its actions? A variety of different decision making and planning architectures are covered; including classical planning, reinforcement learning and cognitive architectures. In labs, students will get hands on experience with some of these planning systems. Assessment of this part will be by quiz and final exam.
 
 At the end of this course, students should have:
 
@@ -25,7 +24,7 @@ At the end of this course, students should have:
  - an understanding of the practicalities of programming physical robots as opposed to purely software systems,
  - an understanding of a robot as a complete system, as well as its component parts.
 
-This course is being taught in conjunction with [National ICT Australia](http://www.nicta.com.au/)'s [Machine Learning Research Group](http://www.nicta.com.au/research/machine_learning/).
+This course is being taught in conjunction with [NICTA](http://www.nicta.com.au/)'s [Machine Learning Research Group](http://www.nicta.com.au/research/machine_learning/).
 
 Pre-requisites
 --------------
@@ -34,7 +33,7 @@ This course is for postgraduate students (COMP9431) and advanced undergraduates
 
 I expect students in this course to be able to program in C++ and Java, and to be prepared to learn Python.
 
-While not a formal pre-requisite or co-requisite, I highly recommend that students take a machine learning course if they are interested in artificial intelligence, eg COMP9417.  That course does not need to be taken before this one. The artificial intelligence course, COMP3411, is not a bad choice either (although it isn't going to give you the depth of Machine Learning knowledge I'd recommend).  While it isn't a formal pre-requisite, students who have already taken COMP3411 or an equivalent course often find this course easier.
+While not a formal pre-requisite or co-requisite, I highly recommend that students take a machine learning course if they are interested in artificial intelligence, eg [COMP9417](http://www.cse.unsw.edu.au/~cs9417/).  That course does not need to be taken before this one. The artificial intelligence course, [COMP3411](http://www.cse.unsw.edu.au/~cs3411/), is not a bad choice either (although it isn't going to give you the depth of Machine Learning knowledge I'd recommend).  While it isn't a formal pre-requisite, students who have already taken COMP3411 or an equivalent course often find this course easier.
 
 Because there are only a small number of robots, this class is limited in size.  As it is somewhat difficult, I have placed a WAM requirement on the course.  For people who have a WAM below the required WAM, there is a waiting list.  That waiting list is used to fill up any positions remaining just before the start of the semester.
 

Update for 2012.
diff --git a/index.mdwn b/index.mdwn
index 2f7d8e8..5d24348 100644
--- a/index.mdwn
+++ b/index.mdwn
@@ -11,8 +11,8 @@ Aims
 This course gives both a theoretical and a practical introduction to the control of robotic systems. The course is in two parts:
 
 <dl>
-<dt>The <a href="http://www.cse.unsw.edu.au/~robocup/">rUNSWift</a> architecture</dt>
-<dd>This part of the course gives students a practical introduction to some specific robot architectures; the main architecture will be that used by the rUNSWift UNSW/NICTA robot soccer team in 2006.  The <A HREF="http://orca-robotics.sourceforge.net/">Orca</A> architecture used by the Sydney-Berkeley Driving team will also be touched on. The elements of the robot's software are described. Assignments consist of re-implementing some simple soccer behaviours on the Sony AIBO robot hardware.</dd>
+<dt>Practical Robotics</dt>
+<dd>This part of the course gives students a practical introduction to some specific robot architectures; the main system architecture will be the Robot Operating System [ROS](http://www.ROS.org/).  We will be using older [Pioneer](http://www.mobilerobots.com/ResearchRobots/PioneerP3DX.aspx) robots and newer [TurtleBot](http://turtlebot.com/) Robots, or other robots as available.</dd>
 <dt>An overview of agent planning and learning systems</dt>
 <dd>This part of the course gives students an introduction to the theory of decision making: How can an agent build up knowledge of its world?  Having done that, how can an agent choose its actions? A variety of different decision making and planning architectures are covered; including classical planning, reinforcement learning and cognitive architectures. In labs, students will get hands on experience with some of these planning systems. Assessment of this part will be by quiz and final exam.</dd>
 </dl>
@@ -22,10 +22,10 @@ At the end of this course, students should have:
 
  - experience with the details of one robot architecture,
  - an overview of a range of other architectures and decision making systems,
- - an understanding of the practicalities of programming physical robots as opposed to software systems,
+ - an understanding of the practicalities of programming physical robots as opposed to purely software systems,
  - an understanding of a robot as a complete system, as well as its component parts.
 
-This course is being taught in conjunction with [National ICT Australia](http://www.nicta.com.au/)'s Making Sense of Data group.
+This course is being taught in conjunction with [National ICT Australia](http://www.nicta.com.au/)'s [Machine Learning Research Group](http://www.nicta.com.au/research/machine_learning/).
 
 Pre-requisites
 --------------
@@ -34,7 +34,7 @@ This course is for postgraduate students (COMP9431) and advanced undergraduates
 
 I expect students in this course to be able to program in C++ and Java, and to be prepared to learn Python.
 
-While not a formal pre-requisite or co-requisite, I highly recommend that students take a machine learning course if they are interested in artificial intelligence, eg COMP9417.  That course does not need to be taken before this one. The artificial intelligence course, COMP3411, is not a bad choice either (although it isn't going to give you the depth of Machine Learning knowledge I'd recommend).  While it isn't a formal pre-requisite, students who have already taken COMP3411 or an equivalent course often find my course easier.
+While not a formal pre-requisite or co-requisite, I highly recommend that students take a machine learning course if they are interested in artificial intelligence, eg COMP9417.  That course does not need to be taken before this one. The artificial intelligence course, COMP3411, is not a bad choice either (although it isn't going to give you the depth of Machine Learning knowledge I'd recommend).  While it isn't a formal pre-requisite, students who have already taken COMP3411 or an equivalent course often find this course easier.
 
 Because there are only a small number of robots, this class is limited in size.  As it is somewhat difficult, I have placed a WAM requirement on the course.  For people who have a WAM below the required WAM, there is a waiting list.  That waiting list is used to fill up any positions remaining just before the start of the semester.
 
@@ -58,9 +58,9 @@ The class has traditionally been fairly small (10-15 students).  I haven't found
 
 Assignments and labs are also run a little differently in my course to other Computer Science courses you may have encountered:
 
-The assignments are all group-work.  You're going to have to work in groups when you graduate so you may as well get used to it now.  Furthermore, the assignments are graded is a style more like a design class than a computer science class: you demonstrate your robot doing what it does, and then the class discusses why it behaved that way.
+The assignments are all group-work.  You're going to have to work in groups when you graduate so you may as well get used to it now.  Furthermore, the assignments are graded is a style more like a design class than a computer science class: you demonstrate your robot doing what it does, and then the class discusses why it behaved that way and whether that is, on balance, a good thing.
 
-The labs are also unusual.  I dislike busywork, so I have already implemented everything you need for the labs.  The goal of the labs is for you to play with the implementations to see for yourselves what happens when various parameters are changed.  Because there is not as much of a set script as I have seen in other labs, this style of lab requires the student to be inquisitive and adventurous.
+The labs are also unusual.  I dislike busywork, so I have already implemented much of what you need for the labs.  The goal of the labs is for you to play with the implementations to see for yourselves what happens when various parameters are changed.  Because there is not as much of a set script as I have seen in other labs, this style of lab requires the student to be inquisitive and adventurous.
 
 Syllabus
 --------
@@ -114,4 +114,12 @@ Feedback
 
 I very much appreciate constructive feedback on how the course might be improved.  The course does change based on this feedback (e.g. there used to be three robotics assignments, but one of them has been replaced with a written assignment so that students get more feedback about their performance on the written work before the exam.).  Feedback can be sent to me at any time.  I particularly encourage students to fill in the CATEI survey at the end of each semester.  A link to the online CATEI surverys is on your myUNSW page.
 
+As an example of typical feedback, I'll post something from last year (2011):
 
+> In class teaching is exemplary. My only difficulty is when I missed a lecture. The outlines on 
+> the wiki do not suffice to cover the content of the class (and are out of date) and we should 
+> not have to rely of other peoples notes. 
+
+I agree this is an issue.  I will endeavour to clean up the notes on the wiki as the class is taught, but these will never be complete.  I will also try to get videos of the lectures online somehow.
+
+I've also had feedback that the assignments are a bit disorganised.  This was because in 2011 we changed robots and operating systems.  In 2012 we will be changing robots again, but sticking with ROS.  After 2012 this should settle down again.

Fix locations of beacons.
diff --git a/assignments/2011/assign1.pdf b/assignments/2011/assign1.pdf
index 748333e..4e8f505 100644
Binary files a/assignments/2011/assign1.pdf and b/assignments/2011/assign1.pdf differ

Add note about pictures.
diff --git a/assignments/2011/beacons.mdwn b/assignments/2011/beacons.mdwn
index f14ce82..9bc7ee7 100644
--- a/assignments/2011/beacons.mdwn
+++ b/assignments/2011/beacons.mdwn
@@ -1,4 +1,6 @@
 COMP3431 Assignment Beacons
 ===========================
 
+Note: pictures were not taken with the beacons in the correct field locations.
+
 [[beacon-small.jpg]][[beacon-medium.jpg]][[beacon-large.jpg]]

Move beacon pictures to another page.
diff --git a/assignments.mdwn b/assignments.mdwn
index e0755b5..de31355 100644
--- a/assignments.mdwn
+++ b/assignments.mdwn
@@ -10,10 +10,7 @@ HomeWork Assignments
 Large Assignments
 -----------------
 
-[[Robotics Assignment_1|assignments/2011/assign1.pdf]]
-  * [[Large Beacon|assignments/2011/beacon-large.jpg]]
-  * [[Medium Beacon|assignments/2011/beacon-medium.jpg]]
-  * [[Small Beacon|assignments/2011/beacon-small.jpg]]
+[[Robotics Assignment_1|assignments/2011/assign1.pdf]] and [[Beacon Pictures|assignments/2011/beacons]]
 
 <!--
 Assignments 1 and 3 are practical assignments on the AIBOs and will be marked in lab.  The second assignment is a written assignment.
diff --git a/assignments/2011/beacons.mdwn b/assignments/2011/beacons.mdwn
new file mode 100644
index 0000000..f14ce82
--- /dev/null
+++ b/assignments/2011/beacons.mdwn
@@ -0,0 +1,4 @@
+COMP3431 Assignment Beacons
+===========================
+
+[[beacon-small.jpg]][[beacon-medium.jpg]][[beacon-large.jpg]]

Add links to beacon pictures
diff --git a/assignments.mdwn b/assignments.mdwn
index 739380f..e0755b5 100644
--- a/assignments.mdwn
+++ b/assignments.mdwn
@@ -11,6 +11,9 @@ Large Assignments
 -----------------
 
 [[Robotics Assignment_1|assignments/2011/assign1.pdf]]
+  * [[Large Beacon|assignments/2011/beacon-large.jpg]]
+  * [[Medium Beacon|assignments/2011/beacon-medium.jpg]]
+  * [[Small Beacon|assignments/2011/beacon-small.jpg]]
 
 <!--
 Assignments 1 and 3 are practical assignments on the AIBOs and will be marked in lab.  The second assignment is a written assignment.

Add pictures of the beacons for the assignment.
diff --git a/assignments/2011/beacon-large.jpg b/assignments/2011/beacon-large.jpg
new file mode 100644
index 0000000..1eecdef
Binary files /dev/null and b/assignments/2011/beacon-large.jpg differ
diff --git a/assignments/2011/beacon-medium.jpg b/assignments/2011/beacon-medium.jpg
new file mode 100644
index 0000000..16ad357
Binary files /dev/null and b/assignments/2011/beacon-medium.jpg differ
diff --git a/assignments/2011/beacon-small.jpg b/assignments/2011/beacon-small.jpg
new file mode 100644
index 0000000..e378aa7
Binary files /dev/null and b/assignments/2011/beacon-small.jpg differ

Add robotics assignment sheet - as announced in class long ago.
diff --git a/assignments.mdwn b/assignments.mdwn
index e344ea8..739380f 100644
--- a/assignments.mdwn
+++ b/assignments.mdwn
@@ -10,8 +10,12 @@ HomeWork Assignments
 Large Assignments
 -----------------
 
+[[Robotics Assignment_1|assignments/2011/assign1.pdf]]
+
+<!--
 Assignments 1 and 3 are practical assignments on the AIBOs and will be marked in lab.  The second assignment is a written assignment.
 
  * [[Assignment_1|assignments/2010/3431-assign1.pdf]]
  * [[Assignment_2|assignments/2010/3431-assign2.pdf]]
  * [[Assignment_3|assignments/2010/3431-assign3.pdf]]
+-->
diff --git a/assignments/2011/assign1.pdf b/assignments/2011/assign1.pdf
new file mode 100644
index 0000000..748333e
Binary files /dev/null and b/assignments/2011/assign1.pdf differ

Update tekkotsu URL
diff --git a/aibo/GettingStarted.txt b/aibo/GettingStarted.txt
index 0e8d238..63bf0da 100644
--- a/aibo/GettingStarted.txt
+++ b/aibo/GettingStarted.txt
@@ -1,61 +1,121 @@
-= Getting Started =
-
-=== IMPORTANT NOTES ===
-Remember this, before you checkout, try anything, or do anything. Do NOT run any of the scripts below as root. It will most likely erase your linux kernel, at best, or erase your entire partition, at worst.
-
-=== Getting OPEN-R ===
-If you need to get openr, you can check out this page: http://www.cs.cmu.edu/~tekkotsu/openr-install.html
-
-There is an older version of the openr stuff on the CSE filesystem at ~robocup/public_ftp/Openr-stuff-1.1.5-r3.tgz
-
-=== Checkout ===
-
-To build and install code on the AIBO ERS-7 robots check out a working copy from the [wiki:SubversionRepository Subversion Repository] and change to the trunk/robot directory, then:
-
-I suggest checking out https://roborouter.cse.unsw.edu.au/svn/robocup/branches/pre-bremen/ into a temp directory on the local machine.
-
-=== Enviroment Variables ===
-
-Make sure you set the following enviroment variables:
- * Add "ROBOCUP_DIR" to your profile script. This should be set to the trunk directory of you checkout.
- * Add "bin" to your path. This can be set as "$ROBOCUP_DIR/bin" once the above step has been performed.
- * Add "robot/bin" to your path. This can be set as "$ROBOCUP_DIR/robot/bin" once the first step has been performed.
-
- * Add the following to .bashrc in your home directory.
-{{{
-export ROBOCUP_DIR=/path/to/robocup/dir
-export PATH=$PATH:${ROBOCUP_DIR}/bin:${ROBOCUP_DIR}/robot/bin
-export DISTCC_HOSTS='localhost benji dogmatix gibson fluffy'
-}}}
-=== Make ===
-
-Type "make". This will build the C++ code and do some configuration stuff.
-
-=== Spip ===
-
-Type
-{{{
-spip playerModule IP_postfix [playerNum] [teamNum]
-}}}
-
-For example,
-{{{
-spip pForward 142
-}}}
-
-Choose IP addresses of the form 1TP where "T" is the team number, and "P" is the player number (usually 1 - 4).
-
-=== ins ===
-
-"ins" to install the rUNSWift code on the stick. If this does not work try using "os" (which re-loads the Aperios OS onto the stick).
-
-=== Boot ===
-
-Install the memory stick and a battery into an ERS-7 AIBO and turn it on. After it boots (about 30 seconds) you should be able to telnet to the robot on port 59000.
-
-See [wiki:TroubleshootingRobots Troubleshooting Robots] and [wiki:BuildingDevelopmentEnvironment Building Development Environment]
-
-=== Notes ===
-
-On some systems (particularly OSX), coverage.py is not found by pychecker - you need to copy this into somewhere that pychecker can find this. On OSX, this is:
-"/System/Library/Frameworks/Python.framework/Versions/Current/lib/python2.x/" where x is your version of python (there should be only one folder there anyway)
\ No newline at end of file
+= Getting Started =
+
+
+
+=== IMPORTANT NOTES ===
+
+Remember this, before you checkout, try anything, or do anything. Do NOT run any of the scripts below as root. It will most likely erase your linux kernel, at best, or erase your entire partition, at worst.
+
+
+
+=== Getting OPEN-R ===
+
+If you need to get openr, you can check out this page: http://tekkotsu.org/openr-install.html
+
+
+
+There is an older version of the openr stuff on the CSE filesystem at ~robocup/public_ftp/Openr-stuff-1.1.5-r3.tgz
+
+
+
+=== Checkout ===
+
+
+
+To build and install code on the AIBO ERS-7 robots check out a working copy from the [wiki:SubversionRepository Subversion Repository] and change to the trunk/robot directory, then:
+
+
+
+I suggest checking out https://roborouter.cse.unsw.edu.au/svn/robocup/branches/pre-bremen/ into a temp directory on the local machine.
+
+
+
+=== Enviroment Variables ===
+
+
+
+Make sure you set the following enviroment variables:
+
+ * Add "ROBOCUP_DIR" to your profile script. This should be set to the trunk directory of you checkout.
+
+ * Add "bin" to your path. This can be set as "$ROBOCUP_DIR/bin" once the above step has been performed.
+
+ * Add "robot/bin" to your path. This can be set as "$ROBOCUP_DIR/robot/bin" once the first step has been performed.
+
+
+
+ * Add the following to .bashrc in your home directory.
+
+{{{
+
+export ROBOCUP_DIR=/path/to/robocup/dir
+
+export PATH=$PATH:${ROBOCUP_DIR}/bin:${ROBOCUP_DIR}/robot/bin
+
+export DISTCC_HOSTS='localhost benji dogmatix gibson fluffy'
+
+}}}
+
+=== Make ===
+
+
+
+Type "make". This will build the C++ code and do some configuration stuff.
+
+
+
+=== Spip ===
+
+
+
+Type
+
+{{{
+
+spip playerModule IP_postfix [playerNum] [teamNum]
+
+}}}
+
+
+
+For example,
+
+{{{
+
+spip pForward 142
+
+}}}
+
+
+
+Choose IP addresses of the form 1TP where "T" is the team number, and "P" is the player number (usually 1 - 4).
+
+
+
+=== ins ===
+
+
+
+"ins" to install the rUNSWift code on the stick. If this does not work try using "os" (which re-loads the Aperios OS onto the stick).
+
+
+
+=== Boot ===
+
+
+
+Install the memory stick and a battery into an ERS-7 AIBO and turn it on. After it boots (about 30 seconds) you should be able to telnet to the robot on port 59000.
+
+
+
+See [wiki:TroubleshootingRobots Troubleshooting Robots] and [wiki:BuildingDevelopmentEnvironment Building Development Environment]
+
+
+
+=== Notes ===
+
+
+
+On some systems (particularly OSX), coverage.py is not found by pychecker - you need to copy this into somewhere that pychecker can find this. On OSX, this is:
+
+"/System/Library/Frameworks/Python.framework/Versions/Current/lib/python2.x/" where x is your version of python (there should be only one folder there anyway)

Correct path to homework 1
diff --git a/assignments.mdwn b/assignments.mdwn
index 822d9f7..e344ea8 100644
--- a/assignments.mdwn
+++ b/assignments.mdwn
@@ -5,7 +5,7 @@ Due dates for all assignments are shown on the assignment and [[calendar]].
 HomeWork Assignments
 --------------------
 
- * [[Homework_1|assignments/2011/3431-homework1.pdf]]
+ * [[Homework_1|assignments/2011/Homework1.pdf]]
 
 Large Assignments
 -----------------

Add a quick note about H and beacon IDs.
diff --git a/assignments/2011/Homework1.pdf b/assignments/2011/Homework1.pdf
index 608cc2b..382a975 100644
Binary files a/assignments/2011/Homework1.pdf and b/assignments/2011/Homework1.pdf differ

Add first assignment 2011.
diff --git a/assignments.mdwn b/assignments.mdwn
index 5ceb5ae..822d9f7 100644
--- a/assignments.mdwn
+++ b/assignments.mdwn
@@ -1,12 +1,17 @@
-There are three assignments distributed throughout the semester.
+There are five assignments distributed throughout the semester.  Three large assignments and two small, 'homework', assignments.  The large assignments are worth 15% each, the smaller ones 5% each.
 
-Assignments 1 and 3 are the same as 2007 in all ways except the due date.
-These two assignments are practical assignments on the AIBOs and will be marked in lab.
+Due dates for all assignments are shown on the assignment and [[calendar]].
 
-The second assignment is a written assignment.
+HomeWork Assignments
+--------------------
 
-Due dates for all assignments are shown on the [[lecture plan]].
+ * [[Homework_1|assignments/2011/3431-homework1.pdf]]
 
- * [[Assignment_1|assignments/2007/assign1-2007.pdf]]
- * [[Assignment_2|assignments/2009/assign2.pdf]]
- * [[Assignment_3|assignments/2009/assign3.pdf]]
+Large Assignments
+-----------------
+
+Assignments 1 and 3 are practical assignments on the AIBOs and will be marked in lab.  The second assignment is a written assignment.
+
+ * [[Assignment_1|assignments/2010/3431-assign1.pdf]]
+ * [[Assignment_2|assignments/2010/3431-assign2.pdf]]
+ * [[Assignment_3|assignments/2010/3431-assign3.pdf]]
diff --git a/assignments/2011/Homework1.pdf b/assignments/2011/Homework1.pdf
new file mode 100644
index 0000000..608cc2b
Binary files /dev/null and b/assignments/2011/Homework1.pdf differ

diff --git a/pioneer/stage.mdwn b/pioneer/stage.mdwn
index f42a428..b9150b0 100644
--- a/pioneer/stage.mdwn
+++ b/pioneer/stage.mdwn
@@ -38,7 +38,7 @@ Drive the simulated robot around using the keyboard and look at what the simulat
 
 Look at the rxgraph output and note that the `teleop_twist_keyboard` node is publishing commands on the `/cmd_vel` topic the same way the joystick was last week.  (If someone wants to write a better keyboard teleop, that would be cool.)
 
-You can also use `rostopic /base_scan` to see the simulated laser output.
+You can also use `rostopic echo /base_scan` to see the simulated laser output.
 
 Making your own world
 ---------------------

Add a few edits.
diff --git a/pioneer/stage.mdwn b/pioneer/stage.mdwn
index bbf92b4..f42a428 100644
--- a/pioneer/stage.mdwn
+++ b/pioneer/stage.mdwn
@@ -14,6 +14,8 @@ Get teleop_twist_keyboard:
     cd teleop_twist_keyboard
     rosmake
 
+(That is a local cache of code available here: <http://brown-ros-pkg.googlecode.com/>.)
+
 Start a Simulation
 ------------------
 
@@ -41,7 +43,7 @@ You can also use `rostopic /base_scan` to see the simulated laser output.
 Making your own world
 ---------------------
 
-  Look at the stage documentation for world files at <http://playerstage.sourceforge.net/doc/Stage-3.2.1/group__model__position.html>.  Build your own simple world with a couple of circular pillars of different sizes and a robot with a laser on it.  The example world files that come with stage are also useful.  Note that an object's shape is specified by a bitmap.  A bitmap of a circle is available at <http://www.cse.unsw.edu.au/~cs3431/Circle.png>.
+  Look at the stage documentation for world files at <http://playerstage.sourceforge.net/doc/Stage-3.2.1/group__model__position.html>.  Build your own simple world with a couple of circular pillars of different sizes and a robot with a laser on it.  The example world files that come with stage are also useful (e.g the `/opt/ros/diamondback/stacks/simulator_stage/stage/world/willow-erratic.world` file used above).  Note that an object's shape is specified by a bitmap.  A bitmap of a circle is available at <http://www.cse.unsw.edu.au/~cs3431/Circle.png>.
 
 Drive around your world.  
 

Add notes for using stage with ROS.
diff --git a/pioneer/stage.mdwn b/pioneer/stage.mdwn
new file mode 100644
index 0000000..bbf92b4
--- /dev/null
+++ b/pioneer/stage.mdwn
@@ -0,0 +1,47 @@
+Start core ROS processes
+------------------------
+
+* Start roscore
+* Start rxgraph
+
+Make a robot teleop process
+---------------------------
+
+Get teleop_twist_keyboard:
+
+    cd ~/ros_workspace
+    git clone http://www.cse.unsw.edu.au/~cs3431/teleop_twist_keyboard.git
+    cd teleop_twist_keyboard
+    rosmake
+
+Start a Simulation
+------------------
+
+    rosrun stage stageros `rospack find stage`/world/willow-erratic.world
+
+Note this is using one of the simulated worlds that comes with ROS.  Details on the ROS integration of stage are on the ros wiki: <http://www.ros.org/wiki/stage>.  That page lists the ROS topics published and subscribed to.  The `.world` file describes the world to simulate.
+
+Start a visualisation: (the simulation is showing us the 'real world' - this visualisation will show us what the robot's sensors see.)
+
+    rosrun rviz rviz
+
+note that you cannot see anything.  I am assuming in these notes that you last started rvis using the config file `/opt/ros/diamondback/stacks/laser_drivers/sicktoolbox_wrapper/sick_test.vcg`.  If not, then use the file menu to open that config.
+
+The robot's laser and the simulation's laser have slightly different names.
+In global options, change the `Fixed frame` and `Target frame` each from `/laser` to `/base_laser_link`.  In the laser scan section, change the `Topic` from `/scan` to `/base_scan`.  Remember from the tutorials that ROS allows you to rename things on the command line.  We could also have copied and edited the `sick_test.vcg` config file.
+
+You should now see the laser scan in rviz.
+
+Drive the simulated robot around using the keyboard and look at what the simulated laser sees.
+
+Look at the rxgraph output and note that the `teleop_twist_keyboard` node is publishing commands on the `/cmd_vel` topic the same way the joystick was last week.  (If someone wants to write a better keyboard teleop, that would be cool.)
+
+You can also use `rostopic /base_scan` to see the simulated laser output.
+
+Making your own world
+---------------------
+
+  Look at the stage documentation for world files at <http://playerstage.sourceforge.net/doc/Stage-3.2.1/group__model__position.html>.  Build your own simple world with a couple of circular pillars of different sizes and a robot with a laser on it.  The example world files that come with stage are also useful.  Note that an object's shape is specified by a bitmap.  A bitmap of a circle is available at <http://www.cse.unsw.edu.au/~cs3431/Circle.png>.
+
+Drive around your world.  
+

diff --git a/pioneer/shell.mdwn b/pioneer/shell.mdwn
index 7d4e2c8..72030e5 100644
--- a/pioneer/shell.mdwn
+++ b/pioneer/shell.mdwn
@@ -24,3 +24,5 @@ Assuming you are running `roscore` on your workstation (which may or may not be
     CLIENT_IP="${SSH_CLIENT%% *}"
     
     export ROS_MASTER_URI="http://${CLIENT_IP}:11311/"
+
+Since ROS_MASTER_URI is http, anybody can access it. This means that "a) anyone can read you sensors and b) anyone can write to your actuators) -- Will. Useful if everyone's testing their laser code on the robot or when the assignment is being marked!

diff --git a/pioneer/sick.mdwn b/pioneer/sick.mdwn
index d70aa9d..d83b2a1 100644
--- a/pioneer/sick.mdwn
+++ b/pioneer/sick.mdwn
@@ -22,4 +22,6 @@ You can view the laser output on your terminal with the command:
 
     rosrun rviz rviz -d `rospack find sicktoolbox_wrapper`/sick_test.vcg
 
+In the default view, the sensor seems to be positioned at the intersection between the lines second from the left and second from the bottom.
+
 Thanks to the [ROS wiki sicktoolbox_wrapper docs](http://www.ros.org/wiki/sicktoolbox_wrapper/Tutorials/UsingTheSicklms).

diff --git a/pioneer/teleop.mdwn b/pioneer/teleop.mdwn
index f29db49..b2851ed 100644
--- a/pioneer/teleop.mdwn
+++ b/pioneer/teleop.mdwn
@@ -15,7 +15,7 @@ Set up your [[shell]] variables.  Lines beginning with 'D:' are commands for the
 * Play with joystick.
 * Note which button is which and which axis is which.
 
-* `rosparam set /run_button 4`
+* `rosparam set /run_button 0`
 * `rosparam set /deadman_button 0`
 * `rosparam set /axis_vx 1`
 * `rosparam set /axis_vw 0`

diff --git a/Pioneer.mdwn b/Pioneer.mdwn
index f6f6969..296d204 100644
--- a/Pioneer.mdwn
+++ b/Pioneer.mdwn
@@ -4,7 +4,9 @@ This page holds links useful for the COMP3431/9431 use of the Pioneer robots.
  * We will be using [ROS](http://www.ros.org/), so the [ROS wiki](http://www.ros.org/wiki/) will be useful.
  * The [COMP4411 wiki](http://cgi.cse.unsw.edu.au/~cs4411/wiki/) has a useful [Pioneer guide](http://cgi.cse.unsw.edu.au/~cs4411/wiki/index.php?title=ActivMedia_Pioneer_Guide).
 
-Currently the robots wills and bass are set up to use ROS.
+Currently the robots wills and bass are set up to use ROS. SSH in using:
+
+ssh z<studentid>@[wills|bass].cse.unsw.edu.au
 
 Here are current Pioneer pages in the COMP3431 wiki:
 

removed
diff --git a/pioneer/ssh.mdwn b/pioneer/ssh.mdwn
deleted file mode 100644
index 00ae9e8..0000000
--- a/pioneer/ssh.mdwn
+++ /dev/null
@@ -1 +0,0 @@
-hsdgfjsdgh

diff --git a/Pioneer.mdwn b/Pioneer.mdwn
index 142d646..f6f6969 100644
--- a/Pioneer.mdwn
+++ b/Pioneer.mdwn
@@ -9,5 +9,3 @@ Currently the robots wills and bass are set up to use ROS.
 Here are current Pioneer pages in the COMP3431 wiki:
 
 [[!inline pages="pioneer/*" archive="yes" feeds="no" sort="title"]]
-
-[[pioneer/ssh]]

diff --git a/pioneer/ssh.mdwn b/pioneer/ssh.mdwn
new file mode 100644
index 0000000..00ae9e8
--- /dev/null
+++ b/pioneer/ssh.mdwn
@@ -0,0 +1 @@
+hsdgfjsdgh

diff --git a/Pioneer.mdwn b/Pioneer.mdwn
index f6f6969..142d646 100644
--- a/Pioneer.mdwn
+++ b/Pioneer.mdwn
@@ -9,3 +9,5 @@ Currently the robots wills and bass are set up to use ROS.
 Here are current Pioneer pages in the COMP3431 wiki:
 
 [[!inline pages="pioneer/*" archive="yes" feeds="no" sort="title"]]
+
+[[pioneer/ssh]]

Adding side reading about particle filters from UW's lab
diff --git a/notes/BayesianLocalisationII.mdwn b/notes/BayesianLocalisationII.mdwn
index 6189001..fe2fa28 100644
--- a/notes/BayesianLocalisationII.mdwn
+++ b/notes/BayesianLocalisationII.mdwn
@@ -40,3 +40,6 @@ Representations for Probability distributions:
    * e.g. P(x, y, theta) split into P(x, y) and P(theta | x, y)
 
    * Much smaller tables, cannot represent correlations
+
+
+<em>Interesting Side Reading:</em> The particle filter example of the robot in the hallway with rooms was done by University of Washington. Here's the page where they have that (and other examples) of work done in their lab with particle filters: <a href="http://www.cs.washington.edu/ai/Mobile_Robotics/mcl/">http://www.cs.washington.edu/ai/Mobile_Robotics/mcl/</a> (lots of links to papers, info, and animations showing particle filters)

fix spacing so that verbatim sections display ok
diff --git a/pioneer/sick.mdwn b/pioneer/sick.mdwn
index 7089127..d70aa9d 100644
--- a/pioneer/sick.mdwn
+++ b/pioneer/sick.mdwn
@@ -7,15 +7,19 @@ First we need to tell ROS how to talk to the laser:
     rosparam set sicklms/baud 38400
 
 The robot `wills` has a laser that behaves differently to the other robots.  It must be started up 30 seconds before you want to use it.  You can start it by executing the command
+
     exec 3>/dev/ttyS2
 
 When you run that command some LEDs on `wills`'s laser will turn on.  Wait until the green one comes on, then continue.  To turn the laser off again, you can either log out of that shell or execute the command
+
     exec 3>&-
 
 Once the laser is warmed up, you can start the ROS laser driver with the command:
+
     rosrun sicktoolbox_wrapper sicklms
 
 You can view the laser output on your terminal with the command:
+
     rosrun rviz rviz -d `rospack find sicktoolbox_wrapper`/sick_test.vcg
 
 Thanks to the [ROS wiki sicktoolbox_wrapper docs](http://www.ros.org/wiki/sicktoolbox_wrapper/Tutorials/UsingTheSicklms).

Add pages on how to drive the robot using ROS and get data from the SickLMS.
diff --git a/Pioneer.mdwn b/Pioneer.mdwn
new file mode 100644
index 0000000..f6f6969
--- /dev/null
+++ b/Pioneer.mdwn
@@ -0,0 +1,11 @@
+This page holds links useful for the COMP3431/9431 use of the Pioneer robots.
+
+ * The [RoboLab Wiki](http://robolab.ai.cse.unsw.edu.au/wiki/) is a useful resource.
+ * We will be using [ROS](http://www.ros.org/), so the [ROS wiki](http://www.ros.org/wiki/) will be useful.
+ * The [COMP4411 wiki](http://cgi.cse.unsw.edu.au/~cs4411/wiki/) has a useful [Pioneer guide](http://cgi.cse.unsw.edu.au/~cs4411/wiki/index.php?title=ActivMedia_Pioneer_Guide).
+
+Currently the robots wills and bass are set up to use ROS.
+
+Here are current Pioneer pages in the COMP3431 wiki:
+
+[[!inline pages="pioneer/*" archive="yes" feeds="no" sort="title"]]
diff --git a/pioneer.mdwn b/pioneer.mdwn
deleted file mode 100644
index 98dd6bd..0000000
--- a/pioneer.mdwn
+++ /dev/null
@@ -1,7 +0,0 @@
-This page holds links useful for the COMP3431/9431 use of the Pioneer robots.
-
- * The [RoboLab Wiki](http://robolab.ai.cse.unsw.edu.au/wiki/) is a useful resource.
- * We will be using [ROS](http://www.ros.org/), so the [ROS wiki](http://www.ros.org/wiki/) will be useful.
- * The [COMP4411 wiki](http://cgi.cse.unsw.edu.au/~cs4411/wiki/) has a useful [Pioneer guide](http://cgi.cse.unsw.edu.au/~cs4411/wiki/index.php?title=ActivMedia_Pioneer_Guide).
-
-Currently the robots wills and bass are set up to use ROS.
diff --git a/pioneer/shell.mdwn b/pioneer/shell.mdwn
new file mode 100644
index 0000000..7d4e2c8
--- /dev/null
+++ b/pioneer/shell.mdwn
@@ -0,0 +1,26 @@
+Using ROS requires various environment variables to be set.  The `~/.bashrc` file contains shell commands that will be executed whenever a new shell is started.  This can be used to set the appropriate environment variables.
+
+Workstation
+-----------
+
+The following snippet of shellscript will set environment variables to use ROS on an ubuntu system:
+
+    if [ -r /opt/ros/diamondback/setup.bash ] ; then
+        source /opt/ros/diamondback/setup.bash
+    fi
+    
+    export ROS_PACKAGE_PATH=~/ros_workspace:$ROS_PACKAGE_PATH
+
+This assumes that you are using the standard ROS packages for ubuntu, and that you have all your local ROS development in the `ros_workspace` directory.  This code is slightly more complex than some other versions; it will not error if ROS is not installed.
+
+Robot
+-----
+
+Assuming you are running `roscore` on your workstation (which may or may not be a good assumption), you will need to set up environment variables on the robot to tell ROS apps started there where to find the core.  The following code sets up those variables automatically so that they point back to the machine you ssh'd in from.  This is only correct if a) you used ssh to connect, and b) you connected from the machine running `roscore`.
+
+    source /opt/ros/diamondback/setup.bash
+    export ROS_PACKAGE_PATH=~/ros_workspace:$ROS_PACKAGE_PATH
+    
+    CLIENT_IP="${SSH_CLIENT%% *}"
+    
+    export ROS_MASTER_URI="http://${CLIENT_IP}:11311/"
diff --git a/pioneer/sick.mdwn b/pioneer/sick.mdwn
new file mode 100644
index 0000000..7089127
--- /dev/null
+++ b/pioneer/sick.mdwn
@@ -0,0 +1,21 @@
+Starting the Sick LMS laser
+---------------------------
+
+First we need to tell ROS how to talk to the laser:
+
+    rosparam set sicklms/port /dev/ttyS2
+    rosparam set sicklms/baud 38400
+
+The robot `wills` has a laser that behaves differently to the other robots.  It must be started up 30 seconds before you want to use it.  You can start it by executing the command
+    exec 3>/dev/ttyS2
+
+When you run that command some LEDs on `wills`'s laser will turn on.  Wait until the green one comes on, then continue.  To turn the laser off again, you can either log out of that shell or execute the command
+    exec 3>&-
+
+Once the laser is warmed up, you can start the ROS laser driver with the command:
+    rosrun sicktoolbox_wrapper sicklms
+
+You can view the laser output on your terminal with the command:
+    rosrun rviz rviz -d `rospack find sicktoolbox_wrapper`/sick_test.vcg
+
+Thanks to the [ROS wiki sicktoolbox_wrapper docs](http://www.ros.org/wiki/sicktoolbox_wrapper/Tutorials/UsingTheSicklms).
diff --git a/pioneer/teleop.mdwn b/pioneer/teleop.mdwn
new file mode 100644
index 0000000..f29db49
--- /dev/null
+++ b/pioneer/teleop.mdwn
@@ -0,0 +1,54 @@
+Will's Teleop Notes
+-------------------
+
+Set up your [[shell]] variables.  Lines beginning with 'D:' are commands for the desktop, lines beginning with 'R:' are commands for the robot.
+
+* D: `roscore`
+* check ROS_MASTER_URI on the robot
+* D: `rxgraph` (note: only updates when you mouse over something on the graph)
+* D: `rosrun p2os_dashboard p2os_dashboard`
+* R: `rosrun p2os_driver p2os`
+* note battery level indicator.
+* note gear is red - robot will not run (this is a good thing)
+* D: `rosrun joy joy_node`
+* D: `rostopic echo /joy`
+* Play with joystick.
+* Note which button is which and which axis is which.
+
+* `rosparam set /run_button 4`
+* `rosparam set /deadman_button 0`
+* `rosparam set /axis_vx 1`
+* `rosparam set /axis_vw 0`
+* `rosparam set /axis_vy 3`
+* `rosparam set /max_vw_run 3`
+
+The following commands are options:
+
+* `rosparam set /max_vx_run 1`
+* `rosparam set /max_vx 0.8`
+* `rosparam set /max_vw 2`
+
+Now start the translator from joystick to robot velocity commands:
+
+* `rosrun p2os_teleop p2os_teleop`
+* `rostopic echo /cmd_vel`
+
+At this stage we're going to start actually moving the robot.  *It is important that you don't drag anything behind the robot.  Disconnect all cables.*
+
+* Now unplug the robot
+* note the battery level drops in the p2os dashboard - batteries are old.
+* click on gear an enable the robot.
+
+* Now you should be able to drive the robot with the joystick
+
+Now we'll look into those motion commands:
+
+* Kill teleop
+* `rostopic pub -1 /cmd_vel geometry_msgs/Twist -- '[0.3, 0.0, 0.0]' '[0.0, 0.0, 0.5]'`
+
+Now we'll turn the robot back off:
+
+* click on the gear to disable the robot
+* reconnect the power to the robot
+
+Thanks to the [ROS wiki p2os docs](http://www.ros.org/wiki/p2os/Tutorials/Getting%20Started%20with%20p2os).

Useful links for the Pioneers
diff --git a/pioneer.mdwn b/pioneer.mdwn
new file mode 100644
index 0000000..98dd6bd
--- /dev/null
+++ b/pioneer.mdwn
@@ -0,0 +1,7 @@
+This page holds links useful for the COMP3431/9431 use of the Pioneer robots.
+
+ * The [RoboLab Wiki](http://robolab.ai.cse.unsw.edu.au/wiki/) is a useful resource.
+ * We will be using [ROS](http://www.ros.org/), so the [ROS wiki](http://www.ros.org/wiki/) will be useful.
+ * The [COMP4411 wiki](http://cgi.cse.unsw.edu.au/~cs4411/wiki/) has a useful [Pioneer guide](http://cgi.cse.unsw.edu.au/~cs4411/wiki/index.php?title=ActivMedia_Pioneer_Guide).
+
+Currently the robots wills and bass are set up to use ROS.

Add a link to the new Pioneer page
diff --git a/sidebar.mdwn b/sidebar.mdwn
index c7bc7af..bc6cbdd 100644
--- a/sidebar.mdwn
+++ b/sidebar.mdwn
@@ -7,3 +7,4 @@ Quick Links
  - [[Assignments]]
  - [[Site_Map|Map]]
  - [[aibo]]
+ - [[Pioneer]]

diff --git a/notes/Introduction.mdwn b/notes/Introduction.mdwn
index e9d17da..8f193cb 100644
--- a/notes/Introduction.mdwn
+++ b/notes/Introduction.mdwn
@@ -41,6 +41,7 @@
    * Definition of a history sequence
        * The history sequence is a series of observations (o) and actions (a)
            * e.g. o<sub>1</sub>a<sub>1</sub>o<sub>2</sub>a<sub>2</sub>o<sub>3</sub>a<sub>3</sub>
+       * Then you can also include the reward as part of this sequence, either as part of the observation/action or separate (? not sure)
 
  * Many assumptions/constraints to make things tractable
    * My approach:

diff --git a/notes/Introduction.mdwn b/notes/Introduction.mdwn
index 2611722..e9d17da 100644
--- a/notes/Introduction.mdwn
+++ b/notes/Introduction.mdwn
@@ -17,7 +17,7 @@
      * Representation
          * How the world is represented in your agent
          * The agent cannot understand anything that is in this representation
-            * e.g. In Robocup, the field is 2D, so the robots cannot comprehend the ball being in the air
+             * e.g. In Robocup, the field is 2D, so the robots cannot comprehend the ball being in the air
 
  * Agents building = system building
    * KISS ( Keep It Simple & Stupid)
@@ -33,13 +33,14 @@
 
  * Overview of Agent in world
    * Sense/Act cycle (+reward)
-     * Consider the agent and world to be 2 separate entities
-     * Information passes between these 2 entities (information interface)
-     * The agent senses things going on in the world, and then it carries out an action upon the world
-     * Observations and actions can also have a quality, called a "reward", associated with them
-     * This reward can be for the instantaneous, i.e. for the current observation/action, or accumulated (simplified explanation)
+       * Consider the agent and world to be 2 separate entities
+       * Information passes between these 2 entities (information interface)
+       * The agent senses things going on in the world, and then it carries out an action upon the world
+       * Observations and actions can also have a quality, called a "reward", associated with them
+       * This reward can be for the instantaneous, i.e. for the current observation/action, or accumulated (simplified explanation)
    * Definition of a history sequence
-     * 
+       * The history sequence is a series of observations (o) and actions (a)
+           * e.g. o<sub>1</sub>a<sub>1</sub>o<sub>2</sub>a<sub>2</sub>o<sub>3</sub>a<sub>3</sub>
 
  * Many assumptions/constraints to make things tractable
    * My approach:

diff --git a/notes/Introduction.mdwn b/notes/Introduction.mdwn
index 8dee02e..2611722 100644
--- a/notes/Introduction.mdwn
+++ b/notes/Introduction.mdwn
@@ -9,11 +9,11 @@
    * Plagiarism policy
    * 4 main things we focus on:
      * Systems
-        * Code reviews
-        * Version control
+         * Code reviews
+         * Version control
      * Search/Dynamic Programming
      * Bayes
-        * Subjective probability
+         * Subjective probability
      * Representation
          * How the world is represented in your agent
          * The agent cannot understand anything that is in this representation

diff --git a/notes/Introduction.mdwn b/notes/Introduction.mdwn
index 3ddc9b4..8dee02e 100644
--- a/notes/Introduction.mdwn
+++ b/notes/Introduction.mdwn
@@ -15,9 +15,9 @@
      * Bayes
         * Subjective probability
      * Representation
-        * How the world is represented in your agent
-        * The agent cannot understand anything that is in this representation
-           * e.g. In Robocup, the field is 2D, so the robots cannot comprehend the ball being in the air
+         * How the world is represented in your agent
+         * The agent cannot understand anything that is in this representation
+            * e.g. In Robocup, the field is 2D, so the robots cannot comprehend the ball being in the air
 
  * Agents building = system building
    * KISS ( Keep It Simple & Stupid)

diff --git a/notes/Introduction.mdwn b/notes/Introduction.mdwn
index b7ca586..3ddc9b4 100644
--- a/notes/Introduction.mdwn
+++ b/notes/Introduction.mdwn
@@ -9,15 +9,15 @@
    * Plagiarism policy
    * 4 main things we focus on:
      * Systems
-       * Code reviews
-       * Version control
+        * Code reviews
+        * Version control
      * Search/Dynamic Programming
      * Bayes
-       * Subjective probability
+        * Subjective probability
      * Representation
-       * How the world is represented in your agent
-       * The agent cannot understand anything that is in this representation
-         * e.g. In Robocup, the field is 2D, so the robots cannot comprehend the ball being in the air
+        * How the world is represented in your agent
+        * The agent cannot understand anything that is in this representation
+           * e.g. In Robocup, the field is 2D, so the robots cannot comprehend the ball being in the air
 
  * Agents building = system building
    * KISS ( Keep It Simple & Stupid)

diff --git a/notes/Introduction.mdwn b/notes/Introduction.mdwn
index 098dc6d..b7ca586 100644
--- a/notes/Introduction.mdwn
+++ b/notes/Introduction.mdwn
@@ -7,8 +7,17 @@
    * Aiming at top of class
    * Discussion in class - need to take own notes - almost problem based learning
    * Plagiarism policy
-   * Systems, search, Bayes
-   * Representation is important
+   * 4 main things we focus on:
+     * Systems
+       * Code reviews
+       * Version control
+     * Search/Dynamic Programming
+     * Bayes
+       * Subjective probability
+     * Representation
+       * How the world is represented in your agent
+       * The agent cannot understand anything that is in this representation
+         * e.g. In Robocup, the field is 2D, so the robots cannot comprehend the ball being in the air
 
  * Agents building = system building
    * KISS ( Keep It Simple & Stupid)
@@ -24,7 +33,13 @@
 
  * Overview of Agent in world
    * Sense/Act cycle (+reward)
+     * Consider the agent and world to be 2 separate entities
+     * Information passes between these 2 entities (information interface)
+     * The agent senses things going on in the world, and then it carries out an action upon the world
+     * Observations and actions can also have a quality, called a "reward", associated with them
+     * This reward can be for the instantaneous, i.e. for the current observation/action, or accumulated (simplified explanation)
    * Definition of a history sequence
+     * 
 
  * Many assumptions/constraints to make things tractable
    * My approach:

Fix copy/paste character weirdness
diff --git a/notes/Introduction_to_Bayesian_statistics.mdwn b/notes/Introduction_to_Bayesian_statistics.mdwn
index f12ef17..fc6536f 100644
--- a/notes/Introduction_to_Bayesian_statistics.mdwn
+++ b/notes/Introduction_to_Bayesian_statistics.mdwn
@@ -8,9 +8,9 @@ Introduction to Bayesian Statistics
   * [[!wikipedia Cox's_theorem]]
     * There are other ways of defining probability like objects, but they're either equivalent under a transform, or weird in some way.
     * Cox had three desiderata:
-      * Divisibility and comparability – The plausibility of a statement is a real number and is dependent on information we have related to the statement.
-      * Common sense – Plausibilities should vary sensibly with the assessment of plausibilities in the model.
-      * Consistency – If the plausibility of a statement can be derived in many ways, all the results must be equal.
+      * Divisibility and comparability - The plausibility of a statement is a real number and is dependent on information we have related to the statement.
+      * Common sense - Plausibilities should vary sensibly with the assessment of plausibilities in the model.
+      * Consistency - If the plausibility of a statement can be derived in many ways, all the results must be equal.
   * Probability theory basics (Another view of this is on p14 of Probabilistic Robotics)
     * Divide the possible worlds into sets
     * Assign each set of possible worlds a number representing how likely the true world is in that set (could use [[!wikipedia Measure_theory]] here)

Add desiderata for Cox's theorem
diff --git a/notes/Introduction_to_Bayesian_statistics.mdwn b/notes/Introduction_to_Bayesian_statistics.mdwn
index e3d2e1b..f12ef17 100644
--- a/notes/Introduction_to_Bayesian_statistics.mdwn
+++ b/notes/Introduction_to_Bayesian_statistics.mdwn
@@ -7,6 +7,10 @@ Introduction to Bayesian Statistics
   * Bayesian Statistics are a way of numerically representing subjective uncertainty
   * [[!wikipedia Cox's_theorem]]
     * There are other ways of defining probability like objects, but they're either equivalent under a transform, or weird in some way.
+    * Cox had three desiderata:
+      * Divisibility and comparability – The plausibility of a statement is a real number and is dependent on information we have related to the statement.
+      * Common sense – Plausibilities should vary sensibly with the assessment of plausibilities in the model.
+      * Consistency – If the plausibility of a statement can be derived in many ways, all the results must be equal.
   * Probability theory basics (Another view of this is on p14 of Probabilistic Robotics)
     * Divide the possible worlds into sets
     * Assign each set of possible worlds a number representing how likely the true world is in that set (could use [[!wikipedia Measure_theory]] here)

Update notes on assessment breakdown.
diff --git a/index.mdwn b/index.mdwn
index f1f7fb1..2f7d8e8 100644
--- a/index.mdwn
+++ b/index.mdwn
@@ -84,14 +84,15 @@ There is no set text for this course. However, the following books are recommend
 Assignments
 -----------
 
-There are five assignments in this course; three large assignments worth 15% each, and two small assignments worth 5% each.  Details of the large assignments are in the [[assignment|assignments]] sheets.  There will be two assignments on real robots and one written assignment.  The robotics assignments also have a written component.
+There are two large assignments worth 15% each, and some small homeworks worth 20% in total.  Details of the large assignments are in the [[assignment|assignments]] sheets.  The two large assignments utilise real robots and also have a written report component.  These numbers are sometimes adjusted during the course in consultation with the students.
+
 Due dates are on the calendar section of the web page.
 
 Assessment
 ----------
 
- - Assignments: 55%
- - Final exam: 45%
+ - Assignments: 50%
+ - Final exam: 50%
 
 Lectures and Assignments are similar between COMP3431 and COMP9431 students.  
 Units of credit: This is a 6 UOC course

Add Malcolm's planning slides.
diff --git a/news/Links.mdwn b/news/Links.mdwn
index 1cf392b..e3a77da 100644
--- a/news/Links.mdwn
+++ b/news/Links.mdwn
@@ -1,6 +1,7 @@
 Hi all,
+
   I've had a few people ask me about links to various things.  There are two easy ways to find things in this wiki: the 'RecentChanges' link at the top of each page lists recent changes to the wiki :).  The 'Site Map' in the 'Quick Links' box on the right hand side lists every page in the wiki. :)
 
-Having said that, the notes from the overview lecture in the last week of class are [[here|other/syllabus-2010]], the RL notes are [[here|slides/2010/MLSS-RL.pdf]], and the sample exam is [[here|other/s-exam.pdf]].
+Having said that, the notes from the overview lecture in the last week of class are [[here|other/syllabus-2010]], the RL notes are [[here|slides/2010/MLSS-RL.pdf]], and the sample exam is [[here|other/s-exam.pdf]].  Malcolm's planning slides are [[here|slides/2008/malcolmr-planning]].
 
 Will     :-}

Pointers to recently added documents
diff --git a/news/Links.mdwn b/news/Links.mdwn
new file mode 100644
index 0000000..1cf392b
--- /dev/null
+++ b/news/Links.mdwn
@@ -0,0 +1,6 @@
+Hi all,
+  I've had a few people ask me about links to various things.  There are two easy ways to find things in this wiki: the 'RecentChanges' link at the top of each page lists recent changes to the wiki :).  The 'Site Map' in the 'Quick Links' box on the right hand side lists every page in the wiki. :)
+
+Having said that, the notes from the overview lecture in the last week of class are [[here|other/syllabus-2010]], the RL notes are [[here|slides/2010/MLSS-RL.pdf]], and the sample exam is [[here|other/s-exam.pdf]].
+
+Will     :-}

Add a new sample exam.
diff --git a/other/s-exam.pdf b/other/s-exam.pdf
new file mode 100644
index 0000000..e4531dd
Binary files /dev/null and b/other/s-exam.pdf differ

Exam details
diff --git a/news/Exam_2010.mdwn b/news/Exam_2010.mdwn
new file mode 100644
index 0000000..5d57c25
--- /dev/null
+++ b/news/Exam_2010.mdwn
@@ -0,0 +1 @@
+Just so everyone is aware.  The exam is scheduled for the evening of Tuesday 2nd November, 17:45 - 21:00 (5:45pm - 9:00pm).  It will be held in K17_B02.  It will be open book, calculator, notes, laptop, internet.  The rule is no communication with another person.

Comments on Assignment 2
diff --git a/news/Assignment_2_notes_2010.mdwn b/news/Assignment_2_notes_2010.mdwn
new file mode 100644
index 0000000..4175f06
--- /dev/null
+++ b/news/Assignment_2_notes_2010.mdwn
@@ -0,0 +1,11 @@
+Hi all,
+
+  I've had some people ask some questions about assignment 2 this year.  Here are the answers so that everyone is on the same page:
+
+* Goals: will they be there or not?  I have no strong opinion either way.  I'm leaning towards them being there, but if that causes a problem for someone's localisation then I'll reconsider.  I would like it consistant - I don't want to be taking them on and off the field for each team's run.
+* Beacons: Let's have them in the same positions as assignment 1.  You are allowed to use your solution to assignment 1 in assignment 2, so you should have reasonable localisation.
+* Usage of functions:  In previous years the early assignments already had you implementing ball tracking and grabbing, so I didn't allow use of the built-in code.  This year I'm happy for you to re-use the grab.  I'd prefer if you implemented your own ball tracking (but look at the code that is there).  I'm happy to talk about this in the review lecture tomorrow.
+* Start location: I'll start you pointing across the centre-line.  It will not be to far from the centre line.  I don't start timing until you cross the centre line (unless your robot seems to be completely confused, in which case I'll ask you to re-start it).
+* Stopping criterion: I'll stop timing when the ball crosses the centre-line even it if then proceeds to go out.  I've had close calls before - It matters if the ball goes out just before or just after it crosses the centre line.
+
+Will

Re-add slides.
diff --git a/slides/2010/MLSS-RL.pdf b/slides/2010/MLSS-RL.pdf
new file mode 100644
index 0000000..0f48dac
Binary files /dev/null and b/slides/2010/MLSS-RL.pdf differ

Slides too big for the quota limits on the class account - moving elsewhere
diff --git a/slides/2010/MLSS-RL.pdf b/slides/2010/MLSS-RL.pdf
deleted file mode 100644
index 0f48dac..0000000
Binary files a/slides/2010/MLSS-RL.pdf and /dev/null differ

Add RL slides and overview notes from today's lecture.
diff --git a/other/syllabus-2010.mdwn b/other/syllabus-2010.mdwn
new file mode 100644
index 0000000..5f15242
--- /dev/null
+++ b/other/syllabus-2010.mdwn
@@ -0,0 +1,179 @@
+Course Syllabus COMP3431 - 2010
+===============================
+
+Introduction
+
+  Definition of a sense/act agent (reward?)
+  Concept of an agent making decisions based on its history
+  Limitations on Worlds (Markov, Deterministic, Partially Observable, Continuous, ...)
+
+  Introduction to probabilities
+     - sets of possible outcomes, each associated with a number
+     - numbers must be consistent with set operations (Venn Diagram)
+     - For discrete sets, can associate numbers with each element
+     - For continuous sets, associate 'densities' with each element (derivative of a probability)
+     - Probabilities > 0
+     - Probabilities sum to 1
+
+  Conditioning
+    P(x|y) = P(x&y)/P(y)
+
+  Bayes Rule
+     - Applies to individual probabilities
+     - Know how to derive
+
+  Probability functions
+     - If you do the same thing pairwise to all elements of a set, you can think of it as applying to the functions. e.g.
+          forall x, f(x) * g(y) = (f*g)(x)
+                    x    * x^2  =  x^3
+
+Bayes Rule applied to tracking
+    - Motion model P(s'|s,a)
+    - Observation model P(o|s)
+  - tables
+
+Representations of probability distributions
+  - Closed form formulae (e.g. normal/gaussian, uniform, poisson, exponential)
+  - Samples from distribution
+  - Tabular
+
+Combining distributions
+  - Independent distributions (factored representations)
+     - Multi-dimensional distributions: f(x,y) = g(x)*h(y)
+  - Conditionally independent distributions
+     - P(x,y|q) = P(x|q).P(y|q)
+
+  - Covariance matrix if normal distribution independent dimensions
+
+Kalman filters
+  - Use a Normal distribution for Bayesian tracking
+  - Didn't derive the math.
+  - Only works with linear motion and observation models
+  - Extended Kalman Filters (EKF)
+     - Use the tangent approximation (taylor epxansion)
+     - requires matrices of derivatives (to get multi-dim slope)
+
+Particle Filters
+  - Motion update
+    - Sample from the motion model
+  - Observation update
+    - Weight the particles by the P(o|s) (s == particle)
+    - Resample with replacement  (use cumulative distribution)
+
+Unscented Kalman filters mentioned (UKF)
+  - Would use these instead of EKF - but I didn't really describe in detail
+  - Use particles instead of deriviaitves to handle non-linear models.
+
+Simultaneous Localisation and Mapping (SLAM)
+  - e.g. localise robots on robocup field, but someone has moved the beacons
+  - Move the unknowns into the state space
+     - e.g. state space was x,y,theta -> x,y,theta, x_b, y_b
+     - We end up with locations correllated
+     - arbitrarily assign location 0,0 to the start location
+
+Other tricks with tracking
+  - Correlation allows finding ball speed from two separate observations
+  - Briefly talked about Distributed kalman filters
+     - Replicate the filter across the robots
+     - Each sends its observations and actions to the others
+        - Observations can be bunched up (do gaussian multiplication locally (Kalman filter) and just send result)
+        - Must reset Kalman filter on send so that no information is sent twice
+
+
+Action/Planning
+
+Introduce the POMDP definition
+
+ - Cut back to MDP (assume fully obs)
+ - Assume known models
+ - Defined optimality criteria
+    - Discounted Reward (most common)
+    - Undiscounted Reward
+       - Fixed Finite horizon
+       - Receding horizon
+    - Average Reward
+ - Bellman Equation (dynamic programming)
+    Q(s,a) = r(s,a) + \gamma \sum_{s' \in S} P(s'|s,a)V(s')
+    V(s) = Q(s, \pi(s))
+    \pi(s) = argmax_a Q(s,a)
+
+   - Updates can happen in any order as long as you do each one often enough
+
+ - Policy iteration as a solution method
+ - Prioritized Sweeping
+   - use a priority Queue to choose update order
+   - Increase priority of children by |Delta V|
+
+ - How to build a model (fully observable)
+   - Given a history s1, a1, r=6, s4, a3, r=-3, s1, a2, r=10, ....
+   - break this up into <s, a, r, s'> tuples
+   - Keep counts (and sum of reward for each s,a) - use ratios of counts as probabilities
+
+Exploration/Exploitation tradeoff
+ - n-armed bandits example
+ - have to keep exploring
+   - e-greedy (choose a random action e% of the time)
+   - Boltzman exploration p(a) = e^{Q(s,a)/t} / (Sum_{a'} Q(s,a')/t)
+      - give each action a weight of e^{Q(s,a)/t} and normalise to get P
+
+Model Free learning
+  - Q(s,a) = (1-\alpha)Q(s,a) + \alpha[r + \gamma V(s')]
+
+Stochastic forward search
+  - Expectimax (like a minimax search, but with expectation for 'opponent')
+
+Policy Gradient
+  - Sample 100 trajectories into the future
+  - Find expected reward
+  - Choose policy that maximises expected reward
+  - Use optimisation techniques to optimise policy
+
+  - Discrete policy and make it differentiable by...
+     - turn it into a stochastic policy (for each state keep P of each action)
+
+Discreization techniques for continuous problems
+
+RRTs
+
+Plan space vs state space search
+
+Planning
+  - State space planning
+  - Plan space planning
+  - partial order (least-commitment) planning
+  - Understand Precond/Adds/deletes (STRIPS representation)
+  - Understand total order plan
+  - Understand partial order plan
+     - What is a threat?
+        - A link and a plan step.
+        - The plan step COULD be ordered after the start and before the end of the link
+        - The plan step has a post-condition (Add || delete) that COULD contradict the link predicate
+     - How do I resolve them?
+         - resolutions mean making the 'COULD's not match
+            - bind variable to stop potential match
+            - add a temporal constraint so that the step appears before or after the link
+
+POMDPs (re-introduced Partial Observability)
+  - Assume we know model (learning model in POMDPs is current research)
+  - Belief state (= probability distribution over state space)
+
+Optimistion
+  - Simulated Annealing (move using Boltzmann exploration)
+  - Simplex method (There are two algoirthms with this name - we covered the one NOT used for linear programming.)
+  - Golden section search for 1D optimisation
+  - Brent's method for 1D optimsiation (magic mixture of Golden section search and parabolic interpolation)
+  - Conjugate gradients
+  - Gradient methods (gradient does NOT point at minimum)
+  - Powell's method for using 1D search
+  - Note: ways to you can get zig-zag
+    - cycle through basis function
+    - at minima in one dimension, gradient is perpendicular to that direction
+    - In steep valley simple gradient methods and just oscillate across the valley
+  - If certain conditions apply
+    - Convex
+    - Not too flat
+    - gradient doesn't change too quickly
+    - Then, simple downhill with step proportional to gradient can work optimally
+
+
+
diff --git a/slides/2010/MLSS-RL.pdf b/slides/2010/MLSS-RL.pdf
new file mode 100644
index 0000000..0f48dac
Binary files /dev/null and b/slides/2010/MLSS-RL.pdf differ

Add assignment 2
diff --git a/assignments/2010/assign2.pdf b/assignments/2010/assign2.pdf
new file mode 100644
index 0000000..54c1915
Binary files /dev/null and b/assignments/2010/assign2.pdf differ

Jayen made me do this change!
diff --git a/aibo/comp3431/GettingStarted.mdwn b/aibo/comp3431/GettingStarted.mdwn
index 91c22f6..7d9a6c3 100644
--- a/aibo/comp3431/GettingStarted.mdwn
+++ b/aibo/comp3431/GettingStarted.mdwn
@@ -50,7 +50,7 @@ If you are the person hosting the central storage for your team, you do not need
 
 ### Building the robot binaries
 
-Change into the trunk/robot directory and type 'make'.
+Change into the trunk/robot directory and type 'make', and then into the trunk/bin directory and do the same.
 
 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:
 

Add a pointer to homework 2 solution
diff --git a/news/Will__39__s_Solution_to_Homework_2.mdwn b/news/Will__39__s_Solution_to_Homework_2.mdwn
new file mode 100644
index 0000000..dde230a
--- /dev/null
+++ b/news/Will__39__s_Solution_to_Homework_2.mdwn
@@ -0,0 +1,3 @@
+... is at <http://www.cse.unsw.edu.au/~cs3431/robotModel.py> or `~cs3431/public_html/robotModel.py`.
+
+it will be there until assignment 1 is due.

Interesting Talk announcement
diff --git a/news/Robots_in_War_talk_2010.mdwn b/news/Robots_in_War_talk_2010.mdwn
new file mode 100644
index 0000000..ac1c20a
--- /dev/null
+++ b/news/Robots_in_War_talk_2010.mdwn
@@ -0,0 +1,9 @@
+Sydney Opera House & St James Ethics Centre is presenting The Festival of Dangerous Ideas on October 2-3 2010 which will feature key local and international thought leaders (Geoffrey Robertson QC, Famed American criminal lawyer, Alan Dershowitz, SMH Foreign Correspondent Paul McGeough, BBC Broadcaster Tariq Ali, and many more) who will present their dangerous ideas on art, climate change, economics, justice and more big issues along with things that matter in everyday life, with an edge. 
+
+As part of the Festival of Dangerous Ideas, Peter W. Singer in "Wired for War: How Human Soldiers are Being Replaced by Machines" explores the increasing use of autonomous robotics in warfare and the ethical, political and legal implications of this revolution. For more information, visit <http://www.sydneyoperahouse.com/whatson/pw_singer.aspx>.
+
+Singer is Director of the 21st Century Defense Initiative at Washingtons Brookings Institution and served as coordinator of the Obama-2008 campaigns defense policy task force. To watch Singer on The Daily Show, please visit - <http://www.thedailyshow.com/watch/thu-january-29-2009/p-w--singer>
+
+ Would you be able to include some information on the event in an email/newsletter to your fellow staff or students? I can organise an e-card to be sent out to you that can be forwarded if this makes things easier. We also have programs on the Festival that I can send out to you (boxes of 100 or so). 
+
+To find out more on the Festival, please visit <http://www.sydneyoperahouse.com/ideas>

note that angles are not measured in centimetres.
diff --git a/news/Assignment_1_2010_Notes.mdwn b/news/Assignment_1_2010_Notes.mdwn
index a73ada6..745494e 100644
--- a/news/Assignment_1_2010_Notes.mdwn
+++ b/news/Assignment_1_2010_Notes.mdwn
@@ -3,7 +3,7 @@ Hi all,
 
   I've also updated the base robot code you are allowed to use.  It no longer crashes when the matrix library is used (I've added a cut-down matrix library to the default python code).  I've also added a function to the robots, VisionLink.getMotionDelta().  To get these changes you will need to `git pull` to update your code (or git clone an entirely new trunk).  I've only updated the main branch - if you're using one of the other git branches then you'll want to merge in my changes.
 
-  The getMotionDelta() function returns a tuple (fwd,left,turn,count), where fwd,left and turn would be measured in centimetres if the robot was correctly calibrated (which may or may not be the case), and count is a count :).  These numbers represent what the walking module thinks it has done since the last vision frame (i.e. the last time the python behaviours were called).  The count may not be useful, but I put it in for completeness - it represents the number of updates that the motion module has done since behaviours were last called, all those updates are added to give the other three numbers.
+  The getMotionDelta() function returns a tuple (fwd,left,turn,count), where fwd,left and turn would be measured in centimetres (for distances, not sure of the angular units) if the robot was correctly calibrated (which may or may not be the case), and count is a count :).  These numbers represent what the walking module thinks it has done since the last vision frame (i.e. the last time the python behaviours were called).  The count may not be useful, but I put it in for completeness - it represents the number of updates that the motion module has done since behaviours were last called, all those updates are added to give the other three numbers.
 
 Cheers,
 

Announce updated support code for the first assignment.
diff --git a/news/Assignment_1_2010_Notes.mdwn b/news/Assignment_1_2010_Notes.mdwn
new file mode 100644
index 0000000..a73ada6
--- /dev/null
+++ b/news/Assignment_1_2010_Notes.mdwn
@@ -0,0 +1,10 @@
+Hi all,
+  I've just updated the assignment 1 sheet with the due date we agreed in class just before the break: The lab of week 9.
+
+  I've also updated the base robot code you are allowed to use.  It no longer crashes when the matrix library is used (I've added a cut-down matrix library to the default python code).  I've also added a function to the robots, VisionLink.getMotionDelta().  To get these changes you will need to `git pull` to update your code (or git clone an entirely new trunk).  I've only updated the main branch - if you're using one of the other git branches then you'll want to merge in my changes.
+
+  The getMotionDelta() function returns a tuple (fwd,left,turn,count), where fwd,left and turn would be measured in centimetres if the robot was correctly calibrated (which may or may not be the case), and count is a count :).  These numbers represent what the walking module thinks it has done since the last vision frame (i.e. the last time the python behaviours were called).  The count may not be useful, but I put it in for completeness - it represents the number of updates that the motion module has done since behaviours were last called, all those updates are added to give the other three numbers.
+
+Cheers,
+
+Will       :-}

Add assignment due date announced in lectures to the assignment sheet.
diff --git a/assignments/2010/assign1.pdf b/assignments/2010/assign1.pdf
index 6e62a19..215cd99 100644
Binary files a/assignments/2010/assign1.pdf and b/assignments/2010/assign1.pdf differ

Add license and pointer to original source.
diff --git a/assignments/2010/Homework2src/matrices.py b/assignments/2010/Homework2src/matrices.py
index 4d4b799..720af79 100644
--- a/assignments/2010/Homework2src/matrices.py
+++ b/assignments/2010/Homework2src/matrices.py
@@ -1,4 +1,35 @@
-# TODO: interpret list as vectors (for multiplication)
+# This is a cut-down and hacked version of the mpmath matrix and linear algebra code
+# See http://code.google.com/p/mpmath for the full source
+# The license is as follows:
+
+# Copyright (c) 2005-2010 Fredrik Johansson and mpmath contributors
+# 
+# All rights reserved.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# 
+#   a. Redistributions of source code must retain the above copyright notice,
+#      this list of conditions and the following disclaimer.
+#   b. Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#   c. Neither the name of mpmath nor the names of its contributors
+#      may be used to endorse or promote products derived from this software
+#      without specific prior written permission.
+# 
+# 
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+# DAMAGE.
 
 import math
 from copy import copy

Add a cut down version of mpmath, matrices.py, that is an attempt to get something that will work on the AIBOs.
diff --git a/assignments/2010/Homework2src/matrices.py b/assignments/2010/Homework2src/matrices.py
new file mode 100644
index 0000000..4d4b799
--- /dev/null
+++ b/assignments/2010/Homework2src/matrices.py
@@ -0,0 +1,1275 @@
+# TODO: interpret list as vectors (for multiplication)
+
+import math
+from copy import copy
+
+rowsep = '\n'
+colsep = '  '
+
+zero = 0.0
+one = 1.0
+eps = 2.2204460492503131e-16
+inf = 1e300*1e300
+ninf = -inf
+nan = inf-inf
+absmin = absmax = abs
+
+class matrix(object):
+    """
+    Numerical matrix.
+
+    Specify the dimensions or the data as a nested list.
+    Elements default to zero.
+    Use a flat list to create a column vector easily.
+
+    By default, only mpf is used to store the data. You can specify another type
+    using force_type=type. It's possible to specify None.
+    Make sure force_type(force_type()) is fast.
+
+    Creating matrices
+    -----------------
+
+    Matrices in mpmath are implemented using dictionaries. Only non-zero values
+    are stored, so it is cheap to represent sparse matrices.
+
+    The most basic way to create one is to use the ``matrix`` class directly.
+    You can create an empty matrix specifying the dimensions:
+
+        >>> from mpmath import *
+        >>> mp.dps = 15
+        >>> matrix(2)
+        matrix(
+        [['0.0', '0.0'],
+         ['0.0', '0.0']])
+        >>> matrix(2, 3)
+        matrix(
+        [['0.0', '0.0', '0.0'],
+         ['0.0', '0.0', '0.0']])
+
+    Calling ``matrix`` with one dimension will create a square matrix.
+
+    To access the dimensions of a matrix, use the ``rows`` or ``cols`` keyword:
+
+        >>> A = matrix(3, 2)
+        >>> A
+        matrix(
+        [['0.0', '0.0'],
+         ['0.0', '0.0'],
+         ['0.0', '0.0']])
+        >>> A.rows
+        3
+        >>> A.cols
+        2
+
+    You can also change the dimension of an existing matrix. This will set the
+    new elements to 0. If the new dimension is smaller than before, the
+    concerning elements are discarded:
+
+        >>> A.rows = 2
+        >>> A
+        matrix(
+        [['0.0', '0.0'],
+         ['0.0', '0.0']])
+
+    Internally ``mpmathify`` is used every time an element is set. This
+    is done using the syntax A[row,column], counting from 0:
+
+        >>> A = matrix(2)
+        >>> A[1,1] = 1 + 1j
+        >>> A
+        matrix(
+        [['0.0', '0.0'],
+         ['0.0', '(1.0 + 1.0j)']])
+
+    You can use the keyword ``force_type`` to change the function which is
+    called on every new element:
+
+        >>> matrix(2, 5, force_type=int)
+        matrix(
+        [[0, 0, 0, 0, 0],
+         [0, 0, 0, 0, 0]])
+
+    A more comfortable way to create a matrix lets you use nested lists:
+
+        >>> matrix([[1, 2], [3, 4]])
+        matrix(
+        [['1.0', '2.0'],
+         ['3.0', '4.0']])
+
+    If you want to preserve the type of the elements you can use
+    ``force_type=None``:
+
+        >>> matrix([[1, 2.5], [1j, mpf(2)]], force_type=None)
+        matrix(
+        [[1, 2.5],
+         [1j, '2.0']])
+
+    Convenient advanced functions are available for creating various standard
+    matrices, see ``zeros``, ``ones``, ``diag``, ``eye``, ``randmatrix`` and
+    ``hilbert``.
+
+    Vectors
+    .......
+
+    Vectors may also be represented by the ``matrix`` class (with rows = 1 or cols = 1).
+    For vectors there are some things which make life easier. A column vector can
+    be created using a flat list, a row vectors using an almost flat nested list::
+
+        >>> matrix([1, 2, 3])
+        matrix(
+        [['1.0'],
+         ['2.0'],
+         ['3.0']])
+        >>> matrix([[1, 2, 3]])
+        matrix(
+        [['1.0', '2.0', '3.0']])
+
+    Optionally vectors can be accessed like lists, using only a single index::
+
+        >>> x = matrix([1, 2, 3])
+        >>> x[1]
+        mpf('2.0')
+        >>> x[1,0]
+        mpf('2.0')
+
+    Other
+    .....
+
+    Like you probably expected, matrices can be printed::
+
+        >>> print randmatrix(3) # doctest:+SKIP
+        [ 0.782963853573023  0.802057689719883  0.427895717335467]
+        [0.0541876859348597  0.708243266653103  0.615134039977379]
+        [ 0.856151514955773  0.544759264818486  0.686210904770947]
+
+    Use ``nstr`` or ``nprint`` to specify the number of digits to print::
+
+        >>> nprint(randmatrix(5), 3) # doctest:+SKIP
+        [2.07e-1  1.66e-1  5.06e-1  1.89e-1  8.29e-1]
+        [6.62e-1  6.55e-1  4.47e-1  4.82e-1  2.06e-2]
+        [4.33e-1  7.75e-1  6.93e-2  2.86e-1  5.71e-1]
+        [1.01e-1  2.53e-1  6.13e-1  3.32e-1  2.59e-1]
+        [1.56e-1  7.27e-2  6.05e-1  6.67e-2  2.79e-1]
+
+    As matrices are mutable, you will need to copy them sometimes::
+
+        >>> A = matrix(2)
+        >>> A
+        matrix(
+        [['0.0', '0.0'],
+         ['0.0', '0.0']])
+        >>> B = A.copy()
+        >>> B[0,0] = 1
+        >>> B
+        matrix(
+        [['1.0', '0.0'],
+         ['0.0', '0.0']])
+        >>> A
+        matrix(
+        [['0.0', '0.0'],
+         ['0.0', '0.0']])
+
+    Finally, it is possible to convert a matrix to a nested list. This is very useful,
+    as most Python libraries involving matrices or arrays (namely NumPy or SymPy)
+    support this format::
+
+        >>> B.tolist()
+        [[mpf('1.0'), mpf('0.0')], [mpf('0.0'), mpf('0.0')]]
+
+
+    Matrix operations
+    -----------------
+
+    You can add and subtract matrices of compatible dimensions::
+
+        >>> A = matrix([[1, 2], [3, 4]])
+        >>> B = matrix([[-2, 4], [5, 9]])
+        >>> A + B
+        matrix(
+        [['-1.0', '6.0'],
+         ['8.0', '13.0']])
+        >>> A - B
+        matrix(
+        [['3.0', '-2.0'],
+         ['-2.0', '-5.0']])

(Diff truncated)
Show the actions from test1.out imported into main.py (as main1.py). Show the output of this program using Will's model.
Also changed some of main1.py to transpose some matrices when printing.
Note: main1.out was generated on wagner.cse.unsw.edu.au, whereas test?.out were generated on Will's Mac. There are slight differences in the low order digits, but only in the low order digits.
diff --git a/assignments/2010/Homework2src/main1.out b/assignments/2010/Homework2src/main1.out
new file mode 100644
index 0000000..680db07
--- /dev/null
+++ b/assignments/2010/Homework2src/main1.out
@@ -0,0 +1,347 @@
+[0.0]
+[0.0]
+[0.0]
+[1000000.0        0.0        0.0]
+[      0.0  1000000.0        0.0]
+[      0.0        0.0  1000000.0]
+step: 0
+A: [1.0  0.0  0.0]
+mu: [1.0  0.0  0.0]
+Sig: [1000000.0121           0.0               0.0]
+[         0.0  2000000.0001         1000000.0]
+[         0.0     1000000.0  1000000.00761544]
+O: [2.0  2.20548920717302  1.02685549688771]
+mu: [0.966224314925604  0.0510759471469014  0.0565677550147176]
+Sig: [ 444444.468595655  -222222.232677859   222222.207842762]
+[-222222.232677859   111111.118332737  -111111.103672155]
+[ 222222.207842762  -111111.103672155   111111.130002608]
+step: 1
+A: [0.0  0.0  1.5707963267949]
+mu: [0.966224314925604  0.0510759471469014  1.62736408180962]
+Sig: [ 444444.468695655  -222222.232677859   222222.207842762]
+[-222222.232677859   111111.118432737  -111111.103672155]
+[ 222222.207842762  -111111.103672155   111111.189707622]
+O: [2.0  2.08776684562391  0.0367503387694498]
+mu: [5.56521212785308  -2.25154045794208  -2.81327741071494]
+Sig: [6.21073147670814  -3.20135767205136   3.15983176528783]
+[ -3.201357671846   1.65159975141438  -1.62905679255442]
+[  3.159831766459  -1.62905679327709   1.62437991124174]
+step: 2
+A: [1.0  0.0  0.0]
+mu: [4.6186251934081  -2.57398917562917  -2.81327741071494]
+Sig: [ 8.42824313827935  -7.20984026686392   3.68361098470441]
+[-7.20984026753415   6.19252315439635  -3.16667359311075]
+[ 3.68361098587557  -3.16667359383341    1.6319953467364]
+O: [2.0  1.30546553784744  0.0354396553196523]
+mu: [1.30867538928726  0.0639561047957282  2.35427143166093]
+Sig: [  0.0160052042531767    0.0035207323802643  -0.00350794089473753]
+[ 0.00352073237992271   0.00678763377155474  -0.00437060946642285]
+[-0.00350794090229325  -0.00437060947135229    0.0148167444429691]
+step: 3
+A: [0.0  1.0  0.0]
+mu: [0.600210108705179  -0.641789562006241  2.35427143166093]
+Sig: [ 0.0313326927727031  0.00826303628506798  0.00694891229200009]
+[ 0.0082630362935583   0.0332183116453285  -0.0148677584755239]
+[0.00694891228444437  -0.0148677584804534   0.0224321799376368]
+O: [2.0  1.82405607288538  -0.76987498391962]
+mu: [1.18505568314295  0.277249767436519  2.03335015794979]
+Sig: [ 0.0196379489758271  -0.00857747858271706    0.0108080739257064]
+[-0.0085774785821743   0.00715002096900016  -0.00628480736255088]
+[ 0.0108080739243408  -0.00628480736234491    0.0161224369528934]
+step: 4
+A: [0.0  0.0  3.14159265358979]
+mu: [1.18505568314295  0.277249767436519  -1.10824249564001]
+Sig: [ 0.0197379489758271  -0.00857747858271706    0.0108080739257064]
+[-0.0085774785821743   0.00725002096900016  -0.00628480736255088]
+[ 0.0108080739243408  -0.00628480736234491     0.177265052020062]
+O: [4.0  3.71918454905722  0.35916207728466]
+mu: [0.0427794184200498  1.04029623621889  -1.28095087506445]
+Sig: [ 0.00648856141219543     9.0082939958871e-5    -0.0022779741897681]
+[ 9.00829400344796e-5    0.00153773561003328  -0.000271743792200168]
+[-0.00227797418980405  -0.000271743792176269     0.0101334419353158]
+step: 5
+A: [1.0  0.0  0.0]
+mu: [0.328583545177695  0.0820081787287139  -1.28095087506445]
+Sig: [  0.0125085603516752  -0.00133259824270777  0.00743278219811524]
+[-0.00133259824266534    0.0133299366887273  0.00262443573117208]
+[ 0.00743278219807929   0.00262443573119598   0.0177488774299836]
+O: [4.0  2.83717093252977  0.509587721653303]
+mu: [0.218400304314012  0.175543284932885  -1.35534013918806]
+Sig: [0.00567311757450888   0.00288494415088853   0.00136885801824754]
+[ 0.0028849441508963   0.00467276282262506  0.000830792807315782]
+[0.00136885801824265  0.000830792807317589   0.00730937894113886]
+step: 6
+A: [0.0  0.0  1.5707963267949]
+mu: [0.218400304314012  0.175543284932885  0.215456187606841]
+Sig: [0.00577311757450888   0.00288494415088853   0.00136885801824754]
+[ 0.0028849441508963   0.00477276282262506  0.000830792807315782]
+[0.00136885801824265  0.000830792807317589    0.0670143932193339]
+O: [2.0  2.41183680434247  0.53917963642527]
+mu: [0.297130736126005  0.245904772465879  0.254791232482482]
+Sig: [   0.0022964238220168  -0.000209240963610941  0.000649390150931913]
+[-0.000209240963609069    0.00201082785990495  -0.00045230619856063]
+[ 0.000649390150930445  -0.000452306198560148     0.016321512105382]
+step: 7
+A: [1.0  0.0  0.0]
+mu: [1.26484667137471  0.497948158940774  0.254791232482482]
+Sig: [  0.0143436026468924  -0.000520859446866513  -0.00346433903249956]
+[-0.00052085944686594     0.0172824043229258    0.0153422811531721]
+[-0.00346433903250103     0.0153422811531726    0.0239369476000497]
+O: [2.0  1.66711158360596  0.730797774257105]
+mu: [1.23468161671867  0.520827696255568  0.301109712311073]
+Sig: [ 0.00853126386314703  -0.00319240981949692  -0.00215786764271661]
+[-0.00319240981949683   0.00299865546791587   0.00189433289202438]
+[-0.00215786764271748   0.00189433289202475   0.00852673264313714]
+step: 8
+A: [0.0  0.0  1.5707963267949]
+mu: [1.23468161671867  0.520827696255568  1.87190603910597]
+Sig: [ 0.00863126386314703  -0.00319240981949692  -0.00215786764271661]
+[-0.00319240981949683   0.00309865546791587   0.00189433289202438]
+[-0.00215786764271748   0.00189433289202475    0.0682317469213322]
+O: [1.0  3.65944512645249  0.552953138159899]
+mu: [1.30148058146752  0.491595818035254  2.06646481780849]
+Sig: [   0.0025069005587943  -0.000392804777211198   3.61844681477456e-5]
+[-0.000392804777211172    0.00181721709341861  0.000612087398416846]
+[   3.6184468147675e-5   0.000612087398416864    0.0206379230591015]
+step: 9
+A: [1.0  0.0  0.0]
+mu: [0.825860785206729  1.37124677688476  2.06646481780849]
+Sig: [ 0.0212271434404548   0.00266549105811527   -0.0181179843394531]
+[0.00266549105811534    0.0152889960991988  -0.00920371736219881]
+[-0.0181179843394532  -0.00920371736219879    0.0282533585537692]
+O: [1.0  3.00581078503927  0.995072035841047]
+mu: [0.92965565553422  1.38277532799598  1.96902999499167]
+Sig: [ 0.00282471004179055  0.00180847169191755  -0.00213649802818296]
+[ 0.00180847169191756   0.0112270074778272  -0.00407686826539698]
+[-0.00213649802818297   -0.004076868265397   0.00959894324528406]
+step: 10
+A: [0.0  0.0  1.5707963267949]
+mu: [0.92965565553422  1.38277532799598  -2.74335898539301]
+Sig: [ 0.00292471004179055  0.00180847169191755  -0.00213649802818296]
+[ 0.00180847169191756   0.0113270074778272  -0.00407686826539698]
+[-0.00213649802818297   -0.004076868265397    0.0693039575234791]
+O: [3.0  4.50728688290551  0.261805025687585]
+mu: [0.935341270384988  1.4002336165967  -2.58796122758266]
+Sig: [  0.00217032189117729  -0.000430045693959754  -0.000571291186749187]
+[-0.000430045693959751    0.00468395144122861   0.000385438883396026]
+[-0.000571291186749187   0.000385438883396025       0.01418554530438]
+step: 11
+A: [1.0  0.0  0.0]
+mu: [0.0847204653733211  0.874453961150326  -2.58796122758266]
+Sig: [   0.0142737567484661  -0.000718898946528527   0.0068871799357066]
+[-0.000718898946528524     0.0177095906551085  -0.0116810810829452]
+[   0.0068871799357066    -0.0116810810829452   0.0218009807990477]
+O: [3.0  3.60140886761014  0.327424469090921]
+mu: [0.127122577936236  0.8920142859466  -2.56044744851921]
+Sig: [ 0.00754591474216475  -0.00327103045372133    0.0022921549167216]
+[-0.00327103045372133   0.00527094891089965  -0.00218115705145578]
+[  0.0022921549167216  -0.00218115705145578   0.00764265648654105]
+step: 12
+A: [0.0  0.0  1.5707963267949]
+mu: [0.127122577936236  0.8920142859466  -0.989651121724306]
+Sig: [ 0.00764591474216475  -0.00327103045372133    0.0022921549167216]
+[-0.00327103045372133   0.00537094891089965  -0.00218115705145578]
+[  0.0022921549167216  -0.00218115705145578    0.0673476707647361]
+O: [4.0  3.45773283042284  -0.3466393945184]
+mu: [0.127621923681754  0.897006703153196  -0.685947605554977]
+Sig: [  0.00382134001066318   0.000187610878859931  -0.000798151354694874]
+[ 0.000187610878859932     0.0022246405310769  -0.000422127213471347]
+[-0.000798151354694874  -0.000422127213471346     0.0071545621961312]
+step: 13
+A: [1.0  0.0  0.0]
+mu: [0.90144109870602  0.263600132012065  -0.685947605554977]
+Sig: [  0.0129662229166453  -0.00307234539934939  0.00373359535397254]
+[-0.00307234539934939    0.0107699109314008   0.0051142102027987]
+[ 0.00373359535397254    0.0051142102027987   0.0147699976907989]
+O: [4.0  2.32291804386225  -0.273044948290182]
+mu: [0.970210202273367  0.11458538452172  -0.782369886965885]
+Sig: [0.00649798531396565  0.00161557971088686  0.00138829324791036]
+[0.00161557971088686  0.00265830892784731  0.00104557637938538]
+[0.00138829324791036  0.00104557637938539  0.00686090361123846]
+step: 14
+A: [0.0  0.0  1.5707963267949]
+mu: [0.970210202273367  0.11458538452172  0.788426439829015]
+Sig: [0.00659798531396565  0.00161557971088686  0.00138829324791036]
+[0.00161557971088686  0.00275830892784731  0.00104557637938538]
+[0.00138829324791036  0.00104557637938539   0.0665659178894335]
+O: [2.0  2.31262603676486  0.50151016284571]
+mu: [0.868281501628455  0.0391474063317963  0.579407264119163]
+Sig: [  0.00364926053417053  -0.000416043453064886    0.00138081786128267]
+[-0.000416043453064886     0.0013243378193574  -0.000330379361760887]
+[  0.00138081786128267  -0.000330379361760887     0.0116468783121624]
+step: 15
+A: [1.0  0.0  0.0]
+mu: [1.70506883803587  0.586675445456899  0.579407264119163]
+Sig: [ 0.0141313262671596  0.00108208724320698  -0.0049961745829043]
+[0.00108208724320698   0.0126241628743129   0.0094155809185348]
+[-0.0049961745829043   0.0094155809185348   0.0192623138068301]
+O: [2.0  1.69775480024422  1.12880497304794]
+mu: [1.69687494244945  0.353528329358028  0.364552724074575]
+Sig: [ 0.00852716565909757  -0.00113308861874784   -0.0016820022901842]
+[-0.00113308861874784   0.00154204557262375  0.000972243523184495]
+[ -0.0016820022901842  0.000972243523184494   0.00798210065376863]
+step: 16
+A: [0.0  0.0  1.5707963267949]
+mu: [1.69687494244945  0.353528329358028  1.93534905086948]
+Sig: [ 0.00862716565909757  -0.00113308861874784   -0.0016820022901842]
+[-0.00113308861874784   0.00164204557262375  0.000972243523184495]
+[ -0.0016820022901842  0.000972243523184494    0.0676871149319637]
+O: [1.0  3.9788483645699  0.51451826623176]
+mu: [1.6498342953937  0.363810029375045  2.13015703463001]
+Sig: [ 0.00309876817347135  -2.51712861781355e-6  0.000103551969450242]
+[-2.51712861781358e-6   0.00141019665877774  0.000432262644942406]
+[0.000103551969450242  0.000432262644942406     0.019658440014951]
+step: 17

(Diff truncated)
Further clarification.
diff --git a/news/Homework_2_2010_notes.mdwn b/news/Homework_2_2010_notes.mdwn
index 7e0c117..5fce7bb 100644
--- a/news/Homework_2_2010_notes.mdwn
+++ b/news/Homework_2_2010_notes.mdwn
@@ -1,5 +1,5 @@
 Hi all,
-  People seem to be getting worried by `observationSample()`.  You shouldn't worry too much about this function as it is only used by the test harness to generate observations, and not by any of the filters.  It needs to pick a beacon to return the observation to - I chose the beacon with least angle relative to the robot in my implementation.
+  People seem to be getting worried by `observationSample()`.  You shouldn't worry too much about this function as it is only used by the test harness to generate observations, and not by any of the filters.  It needs to pick a beacon to return the observation to - I chose the beacon with least angle relative to the robot in my implementation.  You could pick randomly if you like.
 
   `expectedObservation()` has also generated some questions.  Unlike `observationSample()`, `expectedObservation()` is passed an observation.  From this you can get the beacon ID.  You can then generate the expected observation for that particular beacon.
 

Comments on homework 2
diff --git a/news/Homework_2_2010_notes.mdwn b/news/Homework_2_2010_notes.mdwn
new file mode 100644
index 0000000..7e0c117
--- /dev/null
+++ b/news/Homework_2_2010_notes.mdwn
@@ -0,0 +1,6 @@
+Hi all,
+  People seem to be getting worried by `observationSample()`.  You shouldn't worry too much about this function as it is only used by the test harness to generate observations, and not by any of the filters.  It needs to pick a beacon to return the observation to - I chose the beacon with least angle relative to the robot in my implementation.
+
+  `expectedObservation()` has also generated some questions.  Unlike `observationSample()`, `expectedObservation()` is passed an observation.  From this you can get the beacon ID.  You can then generate the expected observation for that particular beacon.
+
+Will      :-}

Add the changes from in class today.
Update main.py so it uses a different formal ao List.
Update test.py to output its actions and observations in this new format.
Replace the test output (I also fixed a bug in my motion model, so these have changed anyway.)
diff --git a/assignments/2010/Homework2src/filter.py b/assignments/2010/Homework2src/filter.py
index d88ccce..2794e07 100644
--- a/assignments/2010/Homework2src/filter.py
+++ b/assignments/2010/Homework2src/filter.py
@@ -38,8 +38,9 @@ def observationUpdate(obs):
 	R = observationNoiseCoVar(mean, obs)
 	# print "H:", H
 	# print "R:", R
-	y = normaliseObsAngles(obs - expectedObservation(mean, obs))
 	# y = obs - H * mean
+	# y = obs - expectedObservation(mean, obs)
+	y = normaliseObsAngles(obs - expectedObservation(mean, obs))
 	# print "y:", y
 	S = H * Sigma * H.T + R
 	# print "S:", S
diff --git a/assignments/2010/Homework2src/main.py b/assignments/2010/Homework2src/main.py
index 57aaeda..a3a69de 100644
--- a/assignments/2010/Homework2src/main.py
+++ b/assignments/2010/Homework2src/main.py
@@ -1,7 +1,17 @@
 from mpmath import *
 import filter
 
-aoList=[[0,0],[0,1],[1,2],[1,4],[-2,7],[3,8],[-4,12],[1,12],[0,13],[0,14],[0,15]]
+aoList=[[matrix([[0]]), matrix([[0]])],
+		[matrix([[0]]), matrix([[1]])],
+		[matrix([[1]]), matrix([[2]])],
+		[matrix([[1]]), matrix([[4]])],
+		[matrix([[-2]]), matrix([[7]])],
+		[matrix([[3]]), matrix([[8]])],
+		[matrix([[-4]]), matrix([[12]])],
+		[matrix([[1]]), matrix([[12]])],
+		[matrix([[0]]), matrix([[13]])],
+		[matrix([[0]]), matrix([[14]])],
+		[matrix([[0]]), matrix([[15]])]]
 
 filter.setInitialStateUniform()
 
@@ -11,8 +21,8 @@ print filter.getSigma()
 step = 0
 
 for ao in aoList:
-	a = ao[0] * matrix([[1]])
-	o = ao[1] * matrix([[1]])
+	a = ao[0]
+	o = ao[1]
 	
 	print "step:", step
 	
diff --git a/assignments/2010/Homework2src/model.py b/assignments/2010/Homework2src/model.py
index bb5c56c..d457fa6 100644
--- a/assignments/2010/Homework2src/model.py
+++ b/assignments/2010/Homework2src/model.py
@@ -59,6 +59,10 @@ def observationProbability(state, obs):
 	"Return the probability, or probability density as appropriate, of the supplied observation assuming we're in the supplied state"
 	return rand.mv_normal_val(expectedObservation(state, obs), observationNoiseCoVar(state, obs), obs)
 
+def observationSample(state):
+	"Return a sample observation for this state."
+	return rand.mv_normal_sample(expectedObservation(state, None), observationNoiseCoVar(state, None))
+
 def normaliseStateAngles(state):
 	"Make sure any angles in the state are between -pi and +pi"
 	for i in []:	# list angles in the state here
diff --git a/assignments/2010/Homework2src/test.py b/assignments/2010/Homework2src/test.py
index 93110a5..640fa72 100644
--- a/assignments/2010/Homework2src/test.py
+++ b/assignments/2010/Homework2src/test.py
@@ -16,6 +16,8 @@ step = 0
 
 state = matrix([0,0,0])
 
+aoList = []
+
 for a in aList:
 	
 	print "True State:", state.T
@@ -29,6 +31,8 @@ for a in aList:
 	# sample an observation given that location
 	obs = observationSample(state)
 
+	aoList = aoList + [[am, obs]]
+
 	# Now use that action and observation to track the robot
 	filter.motionUpdate(am)
 	
@@ -46,3 +50,5 @@ for a in aList:
 	
 	step = step + 1
 
+# output an aoList ready for main.py
+print "aoList: ", aoList
diff --git a/assignments/2010/Homework2src/test1.out b/assignments/2010/Homework2src/test1.out
index 715b14b..dd05587 100644
--- a/assignments/2010/Homework2src/test1.out
+++ b/assignments/2010/Homework2src/test1.out
@@ -9,340 +9,527 @@ True State: [0.0  0.0  0.0]
 A: [1.0  0.0  0.0]
 mu: [1.0  0.0  0.0]
 Sig: [1000000.0121           0.0               0.0]
-[         0.0  1000000.0001               0.0]
-[         0.0           0.0  1000000.00761544]
-O: [4.0  2.3282117241155  -0.99383361903067]
-mu: [0.921020365116264  0.0635300228941811  -0.0944292456874564]
-Sig: [   666666.6777055   333333.337731233  -333333.325562911]
-[ 333333.337731233   166666.671108651  -166666.662781455]
-[-333333.325562911  -166666.662781455   166666.695445295]
-True State: [0.831550009268448  -0.00209220837062398  -0.0618699018109107]
+[         0.0  2000000.0001         1000000.0]
+[         0.0     1000000.0  1000000.00761544]
+O: [2.0  2.20548920717302  1.02685549688771]
+mu: [0.966224314925608  0.0510759471469045  0.0565677550147171]
+Sig: [ 444444.468595655  -222222.232677859   222222.207842762]
+[-222222.232677859   111111.118332737  -111111.103672155]
+[ 222222.207842762  -111111.103672155   111111.130002608]
+True State: [1.08467111437262  -0.00113319600822562  0.0475383384048247]
 A: [0.0  0.0  1.5707963267949]
-mu: [0.921020365116264  0.0635300228941811  1.47636708110744]
-Sig: [   666666.6778055   333333.337731233  -333333.325562911]
-[ 333333.337731233   166666.671208651  -166666.662781455]
-[-333333.325562911  -166666.662781455   166666.755150309]
-O: [2.0  2.26246724922387  -0.406681831257457]
-mu: [0.87315928961857  0.0387351912556168  1.46213161614695]
-Sig: [ 0.00508391179713368  -0.000150387001311701    0.00145718049520418]
-[-0.00015038696233882    0.00146555838110724  -0.000359879972708357]
-[ 0.00145718047493331  -0.000359879980915294     0.0146665247789219]
-True State: [0.840252746487984  0.0105187873919663  1.61791477393166]
+mu: [0.966224314925608  0.0510759471469045  1.62736408180961]
+Sig: [ 444444.468695655  -222222.232677859   222222.207842762]
+[-222222.232677859   111111.118432737  -111111.103672155]
+[ 222222.207842762  -111111.103672155   111111.189707622]
+O: [2.0  2.08776684562391  0.0367503387694498]
+mu: [5.56521212785083  -2.25154045793991  -2.81327741071465]
+Sig: [ 6.21073147656021  -3.20135767197741   3.15983176521346]
+[-3.20135767183994   1.65159975141135  -1.62905679255099]
+[ 3.15983176616293  -1.62905679312905   1.62437991109375]
+True State: [1.08855216589523  -0.00860108430721535  1.16072915564956]
 A: [1.0  0.0  0.0]
-mu: [0.981610273988926  1.03283698885438  1.46213161614695]
-Sig: [0.00532505118926447    0.00114334882085541    0.00145718049520418]
-[ 0.0011433488598283     0.0134244189889765  -0.000359879972708357]
-[0.00145718047493331  -0.000359879980915294     0.0222819602735896]
-O: [2.0  1.41137283157012  -1.09822356421531]
-mu: [0.962215460321182  1.05025807746714  1.6353419077451]
-Sig: [ 0.00341366601927566  -0.00269547344680257   0.00202516539660582]
-[-0.00269547344167317   0.00468210486668719  -0.00228577803914718]
-[  0.0020251653880526  -0.00228577803473475    0.0130043189917863]
-True State: [0.78103323817233  1.17773184426188  1.67014425921659]
+mu: [4.61862519340595  -2.57398917562729  -2.81327741071465]
+Sig: [ 8.42824313799865  -7.20984026662719   3.68361098458277]
+[-7.20984026720208   6.19252315411674  -3.16667359296708]
+[ 3.68361098553223  -3.16667359354514   1.63199534658841]
+O: [2.0  1.30546553784744  0.0354396553196523]
+mu: [1.30867538926018  0.0639561047810351  2.35427143174752]
+Sig: [  0.0160052042539916   0.00352073238069298  -0.00350794089481427]
+[ 0.00352073238037585     0.006787633771788  -0.00437060946646179]
+[-0.00350794090492493  -0.00437060947273097    0.0148167444433586]
+True State: [1.45809947737413  0.854283064774877  1.13752362885891]
 A: [0.0  1.0  0.0]
-mu: [-0.0357021967622948  0.985757304750657  1.6353419077451]
-Sig: [  0.0289075771024096  -0.00105412871707522   0.00202516539660582]
-[-0.00105412871194582   0.00488819378355329  -0.00228577803914718]
-[  0.0020251653880526  -0.00228577803473475    0.0206197544864541]
-O: [1.0  1.98369583729015  1.24604022827485]
-mu: [-0.24757393943686  1.02852795149005  1.53022411116644]
-Sig: [0.00339035814762512    0.00187503501422398    7.14961360545705e-5]
-[0.00187503501456104    0.00421887906319938  -0.000456660176491981]
-[7.14961367232148e-5  -0.000456660174226783     0.0127374356723873]
-True State: [-0.257281285535259  1.05827323150953  1.59278145492053]
+mu: [0.600210108739209  -0.64178956208228  2.35427143174752]
+Sig: [  0.031332692770445  0.00826303628390437  0.00694891229310716]
+[0.00826303629517474   0.0332183116471524  -0.0148677584749333]
+[0.00694891228299649  -0.0148677584812025   0.0224321799380263]
+O: [2.0  1.82405607288538  -0.76987498391962]
+mu: [1.18505568311455  0.277249767450277  2.03335015797709]
+Sig: [  0.0196379489752767  -0.00857747858210535    0.0108080739256422]
+[-0.00857747858138638   0.00715002096850194  -0.00628480736216565]
+[  0.0108080739236858  -0.00628480736180292    0.0161224369530893]
+True State: [0.321464823551677  1.36881967652676  1.09555804607993]
 A: [0.0  0.0  3.14159265358979]
-mu: [-0.24757393943686  1.02852795149005  -1.61136854242335]
-Sig: [0.00349035814762512    0.00187503501422398    7.14961360545705e-5]
-[0.00187503501456104    0.00431887906319938  -0.000456660176491981]
-[7.14961367232148e-5  -0.000456660174226783      0.173880050739556]
-O: [4.0  3.78083244850053  0.738387263490104]
-mu: [-0.248778530640755  1.0319153885385  -1.66383344403587]
-Sig: [  0.00343076658446237    0.00209032449277562  -0.000927672895264757]
-[  0.00209032449299712    0.00341988427235953  -0.000902143351714228]
-[-0.000927672895196151  -0.000902143351461687     0.0214513890963745]
-True State: [-0.253423466738276  1.06496826503062  -1.47730458637562]
+mu: [1.18505568311455  0.277249767450277  -1.10824249561271]
+Sig: [  0.0197379489752767  -0.00857747858210535    0.0108080739256422]
+[-0.00857747858138638   0.00725002096850194  -0.00628480736216565]
+[  0.0108080739236858  -0.00628480736180292     0.177265052020258]
+O: [4.0  3.71918454905722  0.35916207728466]
+mu: [0.0427794184080703  1.04029623620002  -1.28095087506237]
+Sig: [ 0.00648856141230659    9.00829400335453e-5   -0.00227797418977042]
+[ 9.00829401339289e-5    0.00153773561005057  -0.000271743792239603]
+[-0.00227797418981956  -0.000271743792207271      0.010133441935633]
+True State: [0.322204830657822  1.36555168149971  -1.62741814612092]

(Diff truncated)
Announce updated homework
diff --git a/news/Homework_2_2010_update_1.mdwn b/news/Homework_2_2010_update_1.mdwn
new file mode 100644
index 0000000..3d52559
--- /dev/null
+++ b/news/Homework_2_2010_update_1.mdwn
@@ -0,0 +1,8 @@
+Hi all,
+  I've updated the source files for Homework 2 to fix a bug or two.  There are now some extra functions for you to implement.  These will be easy if you understand what is going on.  I've also updated the homework sheet to clarify a few things: there is now a 'notes' section at the end of the assignment that may help.
+
+I've also added a new python file `test.py`.  This file can be run using `python test.py`.  It uses the motionSample and (not suppled) observationSample functions to generate a series of motions and observations with the correct mean and variance from a list of supplied actions.  The actions given would move the robot in a square (like the first lab), but noise in the execution of those actions leads the robot to only approximate that shape.  Test.py uses a kalman filter to track the actual location as the robot walks around.  I've also included the output for five different runs of this program.
+
+I'm giving a general extension on this Homework until Friday.  I'm very sorry for the bugs. :(
+
+Will

Clarify a few points in Homework2.
diff --git a/assignments/2010/Homework2.pdf b/assignments/2010/Homework2.pdf
index 94cf8b7..22902df 100644
Binary files a/assignments/2010/Homework2.pdf and b/assignments/2010/Homework2.pdf differ

Fix up the observation probability code to use the new expectedObservation function.
diff --git a/assignments/2010/Homework2src/model.py b/assignments/2010/Homework2src/model.py
index 4e41e9a..bb5c56c 100644
--- a/assignments/2010/Homework2src/model.py
+++ b/assignments/2010/Homework2src/model.py
@@ -57,7 +57,7 @@ def expectedObservation(state, obs):
 
 def observationProbability(state, obs):
 	"Return the probability, or probability density as appropriate, of the supplied observation assuming we're in the supplied state"
-	return rand.mv_normal_val(observationMatrix(state)*state, observationNoiseCoVar(state), obs)
+	return rand.mv_normal_val(expectedObservation(state, obs), observationNoiseCoVar(state, obs), obs)
 
 def normaliseStateAngles(state):
 	"Make sure any angles in the state are between -pi and +pi"

Modify test to output covariance. Add some sample output.
diff --git a/assignments/2010/Homework2src/test.py b/assignments/2010/Homework2src/test.py
index 6386d58..93110a5 100644
--- a/assignments/2010/Homework2src/test.py
+++ b/assignments/2010/Homework2src/test.py
@@ -33,14 +33,14 @@ for a in aList:
 	filter.motionUpdate(am)
 	
 	print "mu:",filter.getMean().T
-	# print "Sig:",filter.getSigma()
+	print "Sig:",filter.getSigma()
 
 	print "O:", obs.T
 	
 	filter.observationUpdate(obs)
 	
 	print "mu:",filter.getMean().T
-	# print "Sig:",filter.getSigma()
+	print "Sig:",filter.getSigma()
 	
 	#print "Chol",cholesky(filter.getSigma())
 	
diff --git a/assignments/2010/Homework2src/test1.out b/assignments/2010/Homework2src/test1.out
new file mode 100644
index 0000000..715b14b
--- /dev/null
+++ b/assignments/2010/Homework2src/test1.out
@@ -0,0 +1,348 @@
+Initial filter mean and covariance:
+[0.0]
+[0.0]
+[0.0]
+[1000000.0        0.0        0.0]
+[      0.0  1000000.0        0.0]
+[      0.0        0.0  1000000.0]
+True State: [0.0  0.0  0.0]
+A: [1.0  0.0  0.0]
+mu: [1.0  0.0  0.0]
+Sig: [1000000.0121           0.0               0.0]
+[         0.0  1000000.0001               0.0]
+[         0.0           0.0  1000000.00761544]
+O: [4.0  2.3282117241155  -0.99383361903067]
+mu: [0.921020365116264  0.0635300228941811  -0.0944292456874564]
+Sig: [   666666.6777055   333333.337731233  -333333.325562911]
+[ 333333.337731233   166666.671108651  -166666.662781455]
+[-333333.325562911  -166666.662781455   166666.695445295]
+True State: [0.831550009268448  -0.00209220837062398  -0.0618699018109107]
+A: [0.0  0.0  1.5707963267949]
+mu: [0.921020365116264  0.0635300228941811  1.47636708110744]
+Sig: [   666666.6778055   333333.337731233  -333333.325562911]
+[ 333333.337731233   166666.671208651  -166666.662781455]
+[-333333.325562911  -166666.662781455   166666.755150309]
+O: [2.0  2.26246724922387  -0.406681831257457]
+mu: [0.87315928961857  0.0387351912556168  1.46213161614695]
+Sig: [ 0.00508391179713368  -0.000150387001311701    0.00145718049520418]
+[-0.00015038696233882    0.00146555838110724  -0.000359879972708357]
+[ 0.00145718047493331  -0.000359879980915294     0.0146665247789219]
+True State: [0.840252746487984  0.0105187873919663  1.61791477393166]
+A: [1.0  0.0  0.0]
+mu: [0.981610273988926  1.03283698885438  1.46213161614695]
+Sig: [0.00532505118926447    0.00114334882085541    0.00145718049520418]
+[ 0.0011433488598283     0.0134244189889765  -0.000359879972708357]
+[0.00145718047493331  -0.000359879980915294     0.0222819602735896]
+O: [2.0  1.41137283157012  -1.09822356421531]
+mu: [0.962215460321182  1.05025807746714  1.6353419077451]
+Sig: [ 0.00341366601927566  -0.00269547344680257   0.00202516539660582]
+[-0.00269547344167317   0.00468210486668719  -0.00228577803914718]
+[  0.0020251653880526  -0.00228577803473475    0.0130043189917863]
+True State: [0.78103323817233  1.17773184426188  1.67014425921659]
+A: [0.0  1.0  0.0]
+mu: [-0.0357021967622948  0.985757304750657  1.6353419077451]
+Sig: [  0.0289075771024096  -0.00105412871707522   0.00202516539660582]
+[-0.00105412871194582   0.00488819378355329  -0.00228577803914718]
+[  0.0020251653880526  -0.00228577803473475    0.0206197544864541]
+O: [1.0  1.98369583729015  1.24604022827485]
+mu: [-0.24757393943686  1.02852795149005  1.53022411116644]
+Sig: [0.00339035814762512    0.00187503501422398    7.14961360545705e-5]
+[0.00187503501456104    0.00421887906319938  -0.000456660176491981]
+[7.14961367232148e-5  -0.000456660174226783     0.0127374356723873]
+True State: [-0.257281285535259  1.05827323150953  1.59278145492053]
+A: [0.0  0.0  3.14159265358979]
+mu: [-0.24757393943686  1.02852795149005  -1.61136854242335]
+Sig: [0.00349035814762512    0.00187503501422398    7.14961360545705e-5]
+[0.00187503501456104    0.00431887906319938  -0.000456660176491981]
+[7.14961367232148e-5  -0.000456660174226783      0.173880050739556]
+O: [4.0  3.78083244850053  0.738387263490104]
+mu: [-0.248778530640755  1.0319153885385  -1.66383344403587]
+Sig: [  0.00343076658446237    0.00209032449277562  -0.000927672895264757]
+[  0.00209032449299712    0.00341988427235953  -0.000902143351714228]
+[-0.000927672895196151  -0.000902143351461687     0.0214513890963745]
+True State: [-0.253423466738276  1.06496826503062  -1.47730458637562]
+A: [1.0  0.0  0.0]
+mu: [-0.341681485881996  0.0362402201690964  -1.66383344403587]
+Sig: [  0.00363433809357304    0.00320033847999767  -0.000927672895264757]
+[  0.00320033848021917     0.0154163127632489  -0.000902143351714228]
+[-0.000927672895196151  -0.000902143351461687     0.0290668245910422]
+O: [4.0  2.8134616543544  0.742487661385862]
+mu: [-0.316994097433798  -0.212795430542274  -1.54485110764316]
+Sig: [ 0.00357761488466703  0.00374768385603591  -0.00126636209446369]
+[ 0.00374768385611478  0.00852520077083916  -0.00186342998599113]
+[-0.00126636209443255  -0.0018634299859041     0.015930814260573]
+True State: [-0.15347810512572  -0.0860177009751519  -1.41747266731947]
+A: [0.0  0.0  1.5707963267949]
+mu: [-0.316994097433798  -0.212795430542274  0.0259452191517369]
+Sig: [ 0.00367761488466703  0.00374768385603591  -0.00126636209446369]
+[ 0.00374768385611478  0.00862520077083916  -0.00186342998599113]
+[-0.00126636209443255  -0.0018634299859041    0.0756358285387678]
+O: [2.0  2.974585129297  0.363224439640467]
+mu: [-0.227255728283064  -0.0595691096850417  0.28237299799246]
+Sig: [ 0.00156045633222631   0.000259376529155562   0.000109570712627512]
+[0.000259376529175055    0.00286162171080481  -0.000541039060589406]
+[0.000109570712626058  -0.000541039060586789     0.0193749693873355]
+True State: [-0.171529917124624  -0.0867536149256249  0.360062653536876]
+A: [1.0  0.0  0.0]
+mu: [0.733141213336206  0.219066341268983  0.28237299799246]
+Sig: [  0.0127288037578861    0.00347058414823097   0.000109570712627512]
+[ 0.00347058414825047    0.00389327428514504  -0.000541039060589406]
+[0.000109570712626058  -0.000541039060586789     0.0269904048820033]
+O: [2.0  2.16439272557975  0.969013637191675]
+mu: [0.758659724250196  0.225789559808266  0.12807975301051]
+Sig: [  0.00424656004823843  -0.000808358892310971    0.00114947121078631]
+[-0.000808358892307575    0.00171180923180607  -0.000579693572743263]
+[  0.00114947121078489  -0.000579693572743122     0.0130182414947128]
+True State: [0.771024914681431  0.244842595293533  0.243893255343895]
+A: [0.0  0.0  1.5707963267949]
+mu: [0.758659724250196  0.225789559808266  1.69887607980541]
+Sig: [  0.00434656004823843  -0.000808358892310971    0.00114947121078631]
+[-0.000808358892307575    0.00181180923180607  -0.000579693572743263]
+[  0.00114947121078489  -0.000579693572743122     0.0727232557729077]
+O: [1.0  3.40227489101855  0.773047467233735]
+mu: [0.823917563221082  0.198807569576528  1.77674433761267]
+Sig: [ 0.00216546276155481   7.67668197415382e-5  0.000403524390151265]
+[ 7.67668197430101e-5   0.00144849353973803  0.000181078278036941]
+[0.000403524390151402  0.000181078278036871    0.0215040673487849]
+True State: [0.776454356341132  0.239116567040435  1.7707930609266]
+A: [1.0  0.0  0.0]
+mu: [0.619422334526141  1.17767513030219  1.77674433761267]
+Sig: [ 0.00276728234426277  -0.00232531812857031  0.000403524390151265]
+[-0.00232531812856883    0.0130466739570301  0.000181078278036941]
+[0.000403524390151402  0.000181078278036871    0.0291195028434526]
+O: [1.0  2.67456411543163  0.944331544609306]
+mu: [0.588993429443677  1.22864410664005  1.83206828797914]
+Sig: [ 0.00133437098083953  0.000305902330713258  0.000257294066533375]
+[0.000305902330713776   0.00812717115743032   0.00149575617055209]
+[0.000257294066533505   0.00149575617055213    0.0166473353651475]
+True State: [0.591272461254821  1.21668262119092  1.7399840993943]
+A: [0.0  0.0  1.5707963267949]
+mu: [0.588993429443677  1.22864410664005  -2.88032069240555]
+Sig: [ 0.00143437098083953  0.000305902330713258  0.000257294066533375]
+[0.000305902330713776   0.00822717115743032   0.00149575617055209]
+[0.000257294066533505   0.00149575617055213    0.0763523496433423]
+O: [3.0  4.12271881407131  0.645486802512443]
+mu: [0.587203655253792  1.21850773447463  -2.89083767753929]
+Sig: [  0.00130697477833849  -0.000424746762128476  -0.000213883397211597]
+[-0.000424746762128254    0.00397481732076884   0.000671862544055074]
+[-0.000213883397211556   0.000671862544055107     0.0176052697196894]
+True State: [0.594662097630835  1.22813258536505  -2.89178987166436]
+A: [1.0  0.0  0.0]
+mu: [-0.381521706275941  0.970372340124919  -2.89083767753929]
+Sig: [   0.0126681206911894   0.00245975383306851  -0.000213883397211597]
+[  0.00245975383306873   0.00481367140791789   0.000671862544055074]
+[-0.000213883397211556  0.000671862544055107     0.0252207052143571]
+O: [3.0  3.43551022062781  0.910884027977924]
+mu: [-0.3484053563521  0.994242804241945  -2.93391746154153]
+Sig: [ 0.00706060926325698  -0.00119455070343116  -0.00122281898049108]
+[-0.00119455070343109   0.00240741716988011  0.000545960550749819]
+[-0.00122281898049108  0.000545960550749835    0.0136513948467545]
+True State: [-0.39510204385165  0.985351803602463  -2.92717193780827]
+A: [0.0  0.0  1.5707963267949]
+mu: [-0.3484053563521  0.994242804241945  -1.36312113474664]
+Sig: [ 0.00716060926325698  -0.00119455070343116  -0.00122281898049108]
+[-0.00119455070343109   0.00250741716988011  0.000545960550749819]
+[-0.00122281898049108  0.000545960550749835    0.0733564091249494]
+O: [4.0  3.74035450668261  0.391236854739829]
+mu: [-0.311151976705028  0.975968649836826  -1.31523583611367]
+Sig: [  0.00410900964728187   0.000345813202470046  -0.000836200955877464]
+[ 0.000345813202470072    0.00172389987131513  -0.000242742478605569]
+[-0.000836200955877467  -0.000242742478605562     0.0144316394227535]
+True State: [-0.388658634847673  0.968484917709966  -1.38220608207707]
+A: [1.0  0.0  0.0]
+mu: [-0.0583642414606726  0.00844688733738275  -1.31523583611367]
+Sig: [  0.00497582931636151   -0.00258911841923229  -0.000836200955877464]
+[ -0.00258911841923226     0.0130570802022355  -0.000242742478605569]
+[-0.000836200955877467  -0.000242742478605562     0.0220470749174212]
+O: [4.0  2.9361341689153  0.641688670596323]
+mu: [-0.0819075445822486  0.0519075251622832  -1.36886011651941]
+Sig: [  0.00296881550829493  0.00149374046703281  -0.000892987677145977]
+[  0.00149374046703281  0.00467264317294226    -0.0010672687987894]
+[-0.000892987677145978  -0.0010672687987894     0.0108163394500484]
+True State: [-0.173002914386758  -0.0661556159671238  -1.35953636551045]
+A: [0.0  0.0  1.5707963267949]
+mu: [-0.0819075445822486  0.0519075251622832  0.201936210275485]
+Sig: [  0.00306881550829493  0.00149374046703281  -0.000892987677145977]
+[  0.00149374046703281  0.00477264317294226    -0.0010672687987894]
+[-0.000892987677145978  -0.0010672687987894     0.0705213537282433]
+O: [2.0  3.00181903432046  0.379706612429137]
+mu: [-0.143059227542314  -0.0272540217891838  0.344376691796881]
+Sig: [  0.00176694775457381  -0.000229982027248823   0.000297330302236322]
+[-0.000229982027248822    0.00246705679770499  -0.000608407602900921]
+[ 0.000297330302236321  -0.000608407602900922     0.0158961927378624]
+True State: [-0.171572560972909  -0.0736396465805787  0.300818842816728]

(Diff truncated)
Make sure there is some 'left' in the test run.
diff --git a/assignments/2010/Homework2src/test.py b/assignments/2010/Homework2src/test.py
index 04eb869..6386d58 100644
--- a/assignments/2010/Homework2src/test.py
+++ b/assignments/2010/Homework2src/test.py
@@ -3,7 +3,7 @@ import filter
 from math import pi
 from robotModel import motionSample, observationSample
 
-aList=[[1,0,0],[0, 0, pi/2],[1, 0, 0],[0,0,pi/2],[1,0,0],[0,0,pi/2],[1,0,0],[0,0,pi/2],[1,0,0],[0, 0, pi/2],[1, 0, 0],[0,0,pi/2],[1,0,0],[0,0,pi/2],[1,0,0],[0,0,pi/2],[1,0,0],[0, 0, pi/2],[1, 0, 0],[0,0,pi/2],[1,0,0],[0,0,pi/2],[1,0,0],[0,0,pi/2],[1,0,0],[0, 0, pi/2],[1, 0, 0],[0,0,pi/2],[1,0,0],[0,0,pi/2],[1,0,0],[0,0,pi/2]]
+aList=[[1,0,0],[0, 0, pi/2],[1, 0, 0],[0,1,0],[0,0,pi],[1,0,0],[0,0,pi/2],[1,0,0],[0, 0, pi/2],[1, 0, 0],[0,0,pi/2],[1,0,0],[0,0,pi/2],[1,0,0],[0,0,pi/2],[1,0,0],[0, 0, pi/2],[1, 0, 0],[0,0,pi/2],[1,0,0],[0,0,pi/2],[1,0,0],[0,0,pi/2],[1,0,0],[0, 0, pi/2],[1, 0, 0],[0,0,pi/2],[1,0,0],[0,0,pi/2],[1,0,0],[0,0,pi/2]]
 
 # filter.setInitialStateGaussian(matrix([0,0,0]), eye(3)*0.001)
 filter.setInitialStateUniform()

Update source for homework2.
diff --git a/assignments/2010/Homework2src/filter.py b/assignments/2010/Homework2src/filter.py
index 5a5d410..d88ccce 100644
--- a/assignments/2010/Homework2src/filter.py
+++ b/assignments/2010/Homework2src/filter.py
@@ -1,4 +1,5 @@
-from model import motionMatrix, motionConst, motionNoiseCoVar, observationMatrix, observationNoiseCoVar, getStateDimensions, getObservationDimensions
+from model import motionMatrixF, motionMatrixB, motionNoiseCoVar, observationMatrix, observationNoiseCoVar, getStateDimensions, getObservationDimensions, expectedObservation, expectedMotionResult, normaliseStateAngles, normaliseObsAngles
+#from robotModel import motionMatrixF, motionMatrixB, motionNoiseCoVar, observationMatrix, observationNoiseCoVar, getStateDimensions, getObservationDimensions, expectedObservation, expectedMotionResult, normaliseStateAngles, normaliseObsAngles
 from mpmath import *
 import rand
 
@@ -37,7 +38,8 @@ def observationUpdate(obs):
 	R = observationNoiseCoVar(mean, obs)
 	# print "H:", H
 	# print "R:", R
-	y = obs - H * mean
+	y = normaliseObsAngles(obs - expectedObservation(mean, obs))
+	# y = obs - H * mean
 	# print "y:", y
 	S = H * Sigma * H.T + R
 	# print "S:", S
@@ -47,14 +49,15 @@ def observationUpdate(obs):
 	# print "KH:", (K*H)
 	# print "I - KH:", (eye(mean.rows) - K * H)
 	Sigma = (eye(mean.rows) - K * H)*Sigma
+	mean = normaliseStateAngles(mean)
 
 def motionUpdate(action):
 	global mean
 	global Sigma
-	F = motionMatrix(mean, action)
-	B = motionConst(mean, action)
+	F = motionMatrixF(mean, action)
+	B = motionMatrixB(mean, action)
 	Q = motionNoiseCoVar(mean, action)
 	# print "F:", F
 	# print "Q:", Q
-	mean = F * mean + B
+	mean = normaliseStateAngles(expectedMotionResult(mean, action))
 	Sigma = F * Sigma * F.T + Q
diff --git a/assignments/2010/Homework2src/model.py b/assignments/2010/Homework2src/model.py
index 7f1e864..4e41e9a 100644
--- a/assignments/2010/Homework2src/model.py
+++ b/assignments/2010/Homework2src/model.py
@@ -21,21 +21,26 @@ def getStateDimensions():
 def getObservationDimensions():
 	return 1
 
-def motionMatrix(state, action):
+def motionMatrixF(state, action):
 	"Return the F matrix (using wikipedia notation)"
 	return matrix([[1.0, 1.0],[0.0,1.0]])
 
-def motionConst(state, action):
+def motionMatrixB(state, action):
 	"Return the B matrix (using wikipedia notation)"
-	return matrix([0.0,1.0])*action
+	return matrix([0.0,1.0])
 
 def motionNoiseCoVar(state, action):
 	"Return the Q matrix (using wikipedia notation)"
 	return eye(2) + matrix([[0,0],[0,1]]) * action[0]
 
+def expectedMotionResult(state, action):
+	"Return the expected state after executing an action in a state"
+	# for a linear filter: F.x + B.u
+	return motionMatrixF(state, action) * state + motionMatrixB(state, action) * action
+
 def motionSample(state, action):
 	"Return a sample from the motion model if the agent started in the supplied state and performed the supplied action"
-	return rand.mv_normal_sample(motionMatrix(state, action) * state + motionConst(state, action), motionNoiseCoVar(state, action))
+	return rand.mv_normal_sample(expectedMotionResult(state, action), motionNoiseCoVar(state, action))
 
 def observationMatrix(state, obs):
 	"Return the H matrix (using wikipedia notation)"
@@ -45,6 +50,31 @@ def observationNoiseCoVar(state, obs):
 	"Return the R matrix (using wikipedia notation)"
 	return eye(1)
 
+def expectedObservation(state, obs):
+	"Return the mean observation for a given state"
+	# Note, an observation is given.  If there is a discrete component to the observation, then match the supplied observation
+	return observationMatrix(state, obs)*state
+
 def observationProbability(state, obs):
 	"Return the probability, or probability density as appropriate, of the supplied observation assuming we're in the supplied state"
 	return rand.mv_normal_val(observationMatrix(state)*state, observationNoiseCoVar(state), obs)
+
+def normaliseStateAngles(state):
+	"Make sure any angles in the state are between -pi and +pi"
+	for i in []:	# list angles in the state here
+		while state[i] > math.pi:
+			state[i] = state[i] - 2*math.pi
+		while state[i] < -math.pi:
+			state[i] = state[i] + 2*math.pi
+	return state
+
+def normaliseObsAngles(obs):
+	"Make sure any angles in the observation are between -pi and +pi"
+	for i in []:	# list angles in the observation here
+		while obs[i] > math.pi:
+			obs[i] = obs[i] - 2*math.pi
+		while obs[i] < -math.pi:
+			obs[i] = obs[i] + 2*math.pi
+	return obs
+
+
diff --git a/assignments/2010/Homework2src/rand.py b/assignments/2010/Homework2src/rand.py
index 2a34f7c..5b1ad02 100644
--- a/assignments/2010/Homework2src/rand.py
+++ b/assignments/2010/Homework2src/rand.py
@@ -3,7 +3,8 @@ import math
 import random
 
 def mv_normal_sample(mean, Sigma):
-	"Generate a sample from the unit spherical gaussian and then distort it into the right space."
+	"Generate a sample from a multivariate gaussian with mean vector `mean', and covariance matrix `Sigma'."
+	# generate a sample from the unit spherical gaussian and then distort it into the right space.
 
 	# Check dimensions match
 	if (mean.cols != 1):
@@ -32,6 +33,7 @@ def mv_normal_sample(mean, Sigma):
 	return result
 
 def mv_normal_val(mean, Sigma, x):
+	"Calculate the value of a multivariate gaussian with mean vector `mean' and covariance matrix `Sigma' at point `x'."
 	N = mean.rows
 	
 	norm = math.sqrt(det(2.0*math.pi*Sigma))
diff --git a/assignments/2010/Homework2src/test.py b/assignments/2010/Homework2src/test.py
new file mode 100644
index 0000000..04eb869
--- /dev/null
+++ b/assignments/2010/Homework2src/test.py
@@ -0,0 +1,48 @@
+from mpmath import *
+import filter
+from math import pi
+from robotModel import motionSample, observationSample
+
+aList=[[1,0,0],[0, 0, pi/2],[1, 0, 0],[0,0,pi/2],[1,0,0],[0,0,pi/2],[1,0,0],[0,0,pi/2],[1,0,0],[0, 0, pi/2],[1, 0, 0],[0,0,pi/2],[1,0,0],[0,0,pi/2],[1,0,0],[0,0,pi/2],[1,0,0],[0, 0, pi/2],[1, 0, 0],[0,0,pi/2],[1,0,0],[0,0,pi/2],[1,0,0],[0,0,pi/2],[1,0,0],[0, 0, pi/2],[1, 0, 0],[0,0,pi/2],[1,0,0],[0,0,pi/2],[1,0,0],[0,0,pi/2]]
+
+# filter.setInitialStateGaussian(matrix([0,0,0]), eye(3)*0.001)
+filter.setInitialStateUniform()
+
+print "Initial filter mean and covariance:"
+print filter.getMean()
+print filter.getSigma()
+
+step = 0
+
+state = matrix([0,0,0])
+
+for a in aList:
+	
+	print "True State:", state.T
+	
+	am = matrix(a)
+	
+	print "A:", am.T
+
+	# sample a 'true' location for the robot given the selected action
+	state = motionSample(state, am)
+	# sample an observation given that location
+	obs = observationSample(state)
+
+	# Now use that action and observation to track the robot
+	filter.motionUpdate(am)
+	
+	print "mu:",filter.getMean().T
+	# print "Sig:",filter.getSigma()
+
+	print "O:", obs.T
+	
+	filter.observationUpdate(obs)
+	
+	print "mu:",filter.getMean().T
+	# print "Sig:",filter.getSigma()
+	
+	#print "Chol",cholesky(filter.getSigma())
+	
+	step = step + 1
+

Announce bug and extension - no details as yet
diff --git a/news/Homework_2_2010_bug.mdwn b/news/Homework_2_2010_bug.mdwn
new file mode 100644
index 0000000..3be67e1
--- /dev/null
+++ b/news/Homework_2_2010_bug.mdwn
@@ -0,0 +1,5 @@
+Sigh,
+
+  I've found a bug in Homework 2.  I'll release some changes later today.  Because of this I'm going to extend the assignment until Friday.  More details coming...
+
+Will

Add robot assignment 1 sheet. No due date yet.
diff --git a/assignments/2010/assign1.pdf b/assignments/2010/assign1.pdf
new file mode 100644
index 0000000..6e62a19
Binary files /dev/null and b/assignments/2010/assign1.pdf differ

Link to homework 2
diff --git a/news/Homework_2_2010_released.mdwn b/news/Homework_2_2010_released.mdwn
new file mode 100644
index 0000000..8c4d99d
--- /dev/null
+++ b/news/Homework_2_2010_released.mdwn
@@ -0,0 +1 @@
+As noted yesterday in lectures, Homework 2 has been released.  It is available as [[assignments/2010/Homework2.pdf]].  This homework is due by the start of Wednesday lecture in week 7 (1 September).  I've put the mpmath library in with the python files for the homework.

Fixes for homework2.
diff --git a/assignments/2010/Homework2.pdf b/assignments/2010/Homework2.pdf
index 1bde364..94cf8b7 100644
Binary files a/assignments/2010/Homework2.pdf and b/assignments/2010/Homework2.pdf differ
diff --git a/assignments/2010/Homework2src/filter.py b/assignments/2010/Homework2src/filter.py
index a46224d..5a5d410 100644
--- a/assignments/2010/Homework2src/filter.py
+++ b/assignments/2010/Homework2src/filter.py
@@ -33,8 +33,8 @@ def getSigma():
 def observationUpdate(obs):
 	global mean
 	global Sigma
-	H = observationMatrix(mean)
-	R = observationNoiseCoVar(mean)
+	H = observationMatrix(mean, obs)
+	R = observationNoiseCoVar(mean, obs)
 	# print "H:", H
 	# print "R:", R
 	y = obs - H * mean
diff --git a/assignments/2010/Homework2src/model.py b/assignments/2010/Homework2src/model.py
index 4d5cea0..7f1e864 100644
--- a/assignments/2010/Homework2src/model.py
+++ b/assignments/2010/Homework2src/model.py
@@ -1,6 +1,20 @@
 from mpmath import *
 import rand
 
+# Matrices are labelled in the notation from
+# http://en.wikipedia.org/wiki/Kalman_filter#Underlying_dynamic_system_model
+
+# If using a implementing a non-linear motion or observation model, then for those
+# functions which return a matrix, you'll need to find a linear approximation to the
+# true model.  This linear approximation is usually found by using the tangent line to
+# the non-linear function.  The slope of a tangent line to a function is the derivative of
+# the function at that point.
+# See http://en.wikipedia.org/wiki/Kalman_filter#Extended_Kalman_filter or, for example,
+# http://www.acsu.buffalo.edu/~terejanu/files/tutorialEKF.pdf
+
+# For a system with more than one dimension, this means:
+# <complete this comment>
+
 def getStateDimensions():
 	return 2
 
@@ -8,22 +22,29 @@ def getObservationDimensions():
 	return 1
 
 def motionMatrix(state, action):
+	"Return the F matrix (using wikipedia notation)"
 	return matrix([[1.0, 1.0],[0.0,1.0]])
 
 def motionConst(state, action):
+	"Return the B matrix (using wikipedia notation)"
 	return matrix([0.0,1.0])*action
 
 def motionNoiseCoVar(state, action):
+	"Return the Q matrix (using wikipedia notation)"
 	return eye(2) + matrix([[0,0],[0,1]]) * action[0]
 
 def motionSample(state, action):
+	"Return a sample from the motion model if the agent started in the supplied state and performed the supplied action"
 	return rand.mv_normal_sample(motionMatrix(state, action) * state + motionConst(state, action), motionNoiseCoVar(state, action))
 
-def observationMatrix(state):
+def observationMatrix(state, obs):
+	"Return the H matrix (using wikipedia notation)"
 	return matrix([[1,0]])
 
-def observationNoiseCoVar(state):
+def observationNoiseCoVar(state, obs):
+	"Return the R matrix (using wikipedia notation)"
 	return eye(1)
 
 def observationProbability(state, obs):
+	"Return the probability, or probability density as appropriate, of the supplied observation assuming we're in the supplied state"
 	return rand.mv_normal_val(observationMatrix(state)*state, observationNoiseCoVar(state), obs)
diff --git a/assignments/2010/Homework2src/mpmath/README-LICENSE b/assignments/2010/Homework2src/mpmath/README-LICENSE
new file mode 100644
index 0000000..614b098
--- /dev/null
+++ b/assignments/2010/Homework2src/mpmath/README-LICENSE
@@ -0,0 +1,32 @@
+This directory is taken from the mpmath library.  The complete library is available here: <http://code.google.com/p/mpmath/>
+
+The license on mpmath is as follows:
+
+Copyright (c) 2005-2010 Fredrik Johansson and mpmath contributors
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+  a. Redistributions of source code must retain the above copyright notice,
+     this list of conditions and the following disclaimer.
+  b. Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+  c. Neither the name of mpmath nor the names of its contributors
+     may be used to endorse or promote products derived from this software
+     without specific prior written permission.
+
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
diff --git a/assignments/2010/Homework2src/mpmath/__init__.py b/assignments/2010/Homework2src/mpmath/__init__.py
new file mode 100644
index 0000000..3d02f47
--- /dev/null
+++ b/assignments/2010/Homework2src/mpmath/__init__.py
@@ -0,0 +1,416 @@
+__version__ = '0.15'
+
+from usertools import monitor, timing
+
+from ctx_fp import FPContext
+from ctx_mp import MPContext
+from ctx_iv import MPIntervalContext
+
+fp = FPContext()
+mp = MPContext()
+iv = MPIntervalContext()
+
+fp._mp = mp
+mp._mp = mp
+iv._mp = mp
+mp._fp = fp
+fp._fp = fp
+mp._iv = iv
+fp._iv = iv
+iv._iv = iv
+
+# XXX: extremely bad pickle hack
+import ctx_mp as _ctx_mp
+_ctx_mp._mpf_module.mpf = mp.mpf
+_ctx_mp._mpf_module.mpc = mp.mpc
+
+make_mpf = mp.make_mpf
+make_mpc = mp.make_mpc
+
+extraprec = mp.extraprec
+extradps = mp.extradps
+workprec = mp.workprec
+workdps = mp.workdps
+autoprec = mp.autoprec
+maxcalls = mp.maxcalls
+memoize = mp.memoize
+
+mag = mp.mag
+
+bernfrac = mp.bernfrac
+
+qfrom = mp.qfrom
+mfrom = mp.mfrom
+kfrom = mp.kfrom
+taufrom = mp.taufrom
+qbarfrom = mp.qbarfrom
+ellipfun = mp.ellipfun
+jtheta = mp.jtheta
+kleinj = mp.kleinj
+
+qp = mp.qp
+qhyper = mp.qhyper
+qgamma = mp.qgamma
+qfac = mp.qfac
+
+nint_distance = mp.nint_distance
+
+plot = mp.plot
+cplot = mp.cplot
+splot = mp.splot
+
+odefun = mp.odefun
+
+jacobian = mp.jacobian
+findroot = mp.findroot
+multiplicity = mp.multiplicity
+
+isinf = mp.isinf
+isnan = mp.isnan
+isnormal = mp.isnormal
+isint = mp.isint
+almosteq = mp.almosteq
+nan = mp.nan
+rand = mp.rand
+
+absmin = mp.absmin
+absmax = mp.absmax
+
+fraction = mp.fraction
+
+linspace = mp.linspace

(Diff truncated)
Add the second homework assignment.
diff --git a/assignments/2010/Homework2.pdf b/assignments/2010/Homework2.pdf
new file mode 100644
index 0000000..1bde364
Binary files /dev/null and b/assignments/2010/Homework2.pdf differ

Add source for homework 2
diff --git a/assignments/2010/Homework2src/filter.py b/assignments/2010/Homework2src/filter.py
new file mode 100644
index 0000000..a46224d
--- /dev/null
+++ b/assignments/2010/Homework2src/filter.py
@@ -0,0 +1,60 @@
+from model import motionMatrix, motionConst, motionNoiseCoVar, observationMatrix, observationNoiseCoVar, getStateDimensions, getObservationDimensions
+from mpmath import *
+import rand
+
+largeNum = 10e5
+
+mean = zeros(getStateDimensions(),1)
+Sigma = eye(getStateDimensions())
+
+def setInitialStateUniform():
+	global mean
+	global Sigma
+	
+	mean = zeros(getStateDimensions(),1)
+	Sigma = eye(getStateDimensions())*largeNum
+
+def setInitialStateGaussian(lmean, lSigma):
+	global mean
+	global Sigma
+	mean = lmean.copy()
+	Sigma = lSigma.copy()
+
+def getMean():
+	global mean
+	global Sigma
+	return mean
+
+def getSigma():
+	global mean
+	global Sigma
+	return Sigma
+
+def observationUpdate(obs):
+	global mean
+	global Sigma
+	H = observationMatrix(mean)
+	R = observationNoiseCoVar(mean)
+	# print "H:", H
+	# print "R:", R
+	y = obs - H * mean
+	# print "y:", y
+	S = H * Sigma * H.T + R
+	# print "S:", S
+	K = Sigma * H.T * inverse(S)
+	# print "K:", K
+	mean = mean + K*y
+	# print "KH:", (K*H)
+	# print "I - KH:", (eye(mean.rows) - K * H)
+	Sigma = (eye(mean.rows) - K * H)*Sigma
+
+def motionUpdate(action):
+	global mean
+	global Sigma
+	F = motionMatrix(mean, action)
+	B = motionConst(mean, action)
+	Q = motionNoiseCoVar(mean, action)
+	# print "F:", F
+	# print "Q:", Q
+	mean = F * mean + B
+	Sigma = F * Sigma * F.T + Q
diff --git a/assignments/2010/Homework2src/main.py b/assignments/2010/Homework2src/main.py
new file mode 100644
index 0000000..57aaeda
--- /dev/null
+++ b/assignments/2010/Homework2src/main.py
@@ -0,0 +1,36 @@
+from mpmath import *
+import filter
+
+aoList=[[0,0],[0,1],[1,2],[1,4],[-2,7],[3,8],[-4,12],[1,12],[0,13],[0,14],[0,15]]
+
+filter.setInitialStateUniform()
+
+print filter.getMean()
+print filter.getSigma()
+
+step = 0
+
+for ao in aoList:
+	a = ao[0] * matrix([[1]])
+	o = ao[1] * matrix([[1]])
+	
+	print "step:", step
+	
+	print "A:", a
+
+	filter.motionUpdate(a)
+	
+	print "mu:",filter.getMean()
+	print "Sig:",filter.getSigma()
+
+	print "O:", o
+	
+	filter.observationUpdate(o)
+	
+	print "mu:",filter.getMean()
+	print "Sig:",filter.getSigma()
+	
+	#print "Chol",cholesky(filter.getSigma())
+	
+	step = step + 1
+
diff --git a/assignments/2010/Homework2src/model.py b/assignments/2010/Homework2src/model.py
new file mode 100644
index 0000000..4d5cea0
--- /dev/null
+++ b/assignments/2010/Homework2src/model.py
@@ -0,0 +1,29 @@
+from mpmath import *
+import rand
+
+def getStateDimensions():
+	return 2
+
+def getObservationDimensions():
+	return 1
+
+def motionMatrix(state, action):
+	return matrix([[1.0, 1.0],[0.0,1.0]])
+
+def motionConst(state, action):
+	return matrix([0.0,1.0])*action
+
+def motionNoiseCoVar(state, action):
+	return eye(2) + matrix([[0,0],[0,1]]) * action[0]
+
+def motionSample(state, action):
+	return rand.mv_normal_sample(motionMatrix(state, action) * state + motionConst(state, action), motionNoiseCoVar(state, action))
+
+def observationMatrix(state):
+	return matrix([[1,0]])
+
+def observationNoiseCoVar(state):
+	return eye(1)
+
+def observationProbability(state, obs):
+	return rand.mv_normal_val(observationMatrix(state)*state, observationNoiseCoVar(state), obs)
diff --git a/assignments/2010/Homework2src/rand.py b/assignments/2010/Homework2src/rand.py
new file mode 100644
index 0000000..2a34f7c
--- /dev/null
+++ b/assignments/2010/Homework2src/rand.py
@@ -0,0 +1,44 @@
+from mpmath import *
+import math
+import random
+
+def mv_normal_sample(mean, Sigma):
+	"Generate a sample from the unit spherical gaussian and then distort it into the right space."
+
+	# Check dimensions match
+	if (mean.cols != 1):
+		return None
+	N = mean.rows
+	if (N != Sigma.rows):
+		return None
+	if (Sigma.rows != Sigma.cols):
+		return None
+	
+	# generate a list of random gaussians
+	# i.e. a sample from the unit spherical gaussian
+	rand = []
+	for i in xrange(N):
+		rand = rand + [random.gauss(0, 1)] # Note: '+' here is list concatenation
+	
+	rand = matrix(rand) # turn list into a column vector
+	
+	# figure out the transform for the matrix
+	L = cholesky(Sigma)
+	
+	# add the mean and the transformed sample to get a sample
+	# from our desired gaussian
+	result = mean + (L * rand)
+	
+	return result
+
+def mv_normal_val(mean, Sigma, x):
+	N = mean.rows
+	
+	norm = math.sqrt(det(2.0*math.pi*Sigma))
+	delta = x - mean
+	valmat = delta.T * inverse(Sigma) * delta
+	if (valmat.rows != 1) or (valmat.cols != 1):
+		return None
+	e = math.exp(-0.5*valmat[0,0])
+	
+	return e/norm

diff --git a/aibo/comp3431/UsefulPython.txt b/aibo/comp3431/UsefulPython.txt
index 5fe6a7e..e46ab49 100644
--- a/aibo/comp3431/UsefulPython.txt
+++ b/aibo/comp3431/UsefulPython.txt
@@ -499,5 +499,12 @@ Action.walk(0,0,100,"ssd",Action.SkellipticalWalkWT,Action.GrabDribbleMWT)#like
 #Action.walk(0,100,0,"ssd",Action.SkellipticalWalkWT,Action.GrabTurnOnlyMWT)#bit too heavy rotation
 
 
+#Track the pink-on-yellow beacon
+
+vPinkOnYellow = Global.createNullVisualObject()
+		
+vPinkOnYellow.setVals(*VisionLink.getVisualObject(Constant.vobPinkOnYellowBeacon))
+
+
 
 }}}

Comment on Bayesian tracking
diff --git a/news/Homework_1_notes_B.mdwn b/news/Homework_1_notes_B.mdwn
new file mode 100644
index 0000000..e6aaad5
--- /dev/null
+++ b/news/Homework_1_notes_B.mdwn
@@ -0,0 +1,12 @@
+Hi all,
+
+  This pseudo-code description of Bayesian tracking (without a motion model) might help some people:
+
+    P(o|m) = observation probability distribution
+    P(m) = initial prior
+    While not done {
+      Calculate P(m|o) using P(m), P(o|m) and Bayes' rule (and trick where we normalise instead of calculating P(o))
+      P(m) = P(m|o)  # move on to next timestep
+    }
+
+Will