This tutorial is based on a message from Ignacio Herrero Reder to the tekkotsu_dev mailing list. Thanks Ignacio!
Every calibration is different for every robot, and every type of floor; so don't do the process on a concrete floor, if you're going to work on a carpet. Further, the calibration is dependent on the walk parameters being used -- be sure you are happy with the walk parameters before you begin calibrating the motion they produce. (and if you do change the walk parameters from the default values, be sure to save the values you intend to use for calibration before you begin!)
Also, it is recommended to save your data after you complete each section. That way if the battery runs out or a system error occurs, you won't lose all of the data you'd collected so far. Also, if you decide later to collect more data, you can reload your previous data files and continue collecting data.
Finally, if your surface has some directional feature, like a carpet with a strong 'nap', that is going to reduce the accuracy of your calibration because it will be dependent on the current compass heading of the Aibo relative to that feature, which can't be tracked. (at least, not without a lot more work)
First, open File Access->Walk Edit->WalkControllerBehavior as you will be modifying sliders to try different x, y, and a velocities in the calibration process. It is recommended to open a telnet connection at port 59000 in a console (>telnet your.AIBO.IP.dir 59000), and then log locomotion events at it. To do this go to Status Reports->Event Logger, and mark locomotionEGID. This way you can see x, y, and a (theorical) velocities in use when the robot is moving.
IMPORTANT: prior to taking any measurements, you must CLEAR the current calibration matrix. In the ControllerGUI, goto File Access->WalkEdit->calibration->LoadCalibration and select clearcal.txt. Now you can begin with measurement collection.
It is because of these default calibrations that it is important to use the WalkControllerBehavior found in Walk Edit to produce the motions for calibration, not the one found in the TekkotsuMon menu. Using the TekkotsuMon instance would load a new walk from disk, which will still use the default calibration. (Unless you choose to resave the walk parameter file after clearing the calibration parameters, in which case the new instance will load the cleared calibration.)
Go to "Interactive Calibration->Take Measurements". Here are 6 categories, in every one you must choose two (or one) velocity parameters, and compensate the others:
For each category, record at least 6 samples.
You must choose one velocity for each F and S parameters. This way, AIBO will move with a diagonal movement. You must change R parameter to achieve AIBO facing is constant along the whole movement. So if you see that there is a light rotation to the right, you must give R a positive (left) value to compensate.
Use only positive forward motion -- backward motion is a separate category below.
When you're sure rotation is NULL, you must measure the movement size (I prefer cartesian coordinates). I put a mark on the floor (for example, a point where a rear leg step on) and turn E-Stop Off, so AIBO begins to move. When the rear leg (or some other notable point of the robot) passes over the mark, select the "Go" item in the controller menu (if you hilight the item, you can then press 'enter' to select it without using the mouse). Wait a little, and then push E-stop. Then you can measure x and y distance from your mark to the point where the AIBO's rear leg stopped (use a ruler), and input the distances as ControllerGUI prompts for them. Distances are in cm, and 'sideways' is positive when it goes left.
Repeat with at least 6 different F and S sets (and corresponding R to cancel rotation).
You must choose again F and R parameters, and modify S to compensate. This time you must seek that AIBO moves around a circle instead of an spiral (the last means that there is a S drift, you must compensate). It helps to paint a circle and look if AIBO covers it. I usually make AIBO to do a semicircle movement, so if AIBO is facing right at one end of the semicircle, it must be facing left at the very other end of the semicircle. If at the other end there is an angle in AIBOS' facing, it means you must compensate S, as it is moving on a decreasing, or increasing spiral.
When AIBO behaves as explained, put again a mark in the circle, push e-stop off, and push "Go" when AIBO step on the mark; wait, and push e-stop on, when AIBO reaches the opposite end of the mark in the circle. ControllerGUI will ask for diameter of semicircle (in cm), and angle (if you're using a semicircle you must introduce 180 as it is in degrees). You can also measure complete circles, trying that AIBO begin and end at the same point (this time you must input 360 degrees). Repeat the process with different F and R parameters (and corresponding S to compensate).
This is similar to Forward/Rotate. First, choose only an S value (R=0 and F=0) such that AIBO is purely strafing, so there is neither forward nor backward movement. If there is any, compensate with F/B slider. Then choose a rotation (R) value, so AIBO move in a circle, but strafing, facing outside the circle. Repeat the same process as above, and enter the diameter of the circle and angle. It helps again to measure a semicircle (so angle is 180 degrees).
Repeat the process with different S parameter, compensate with F, and choose different R values too.
Same as F/R and F/S, but using backward motion allows more accurate calibration for when moving backwards, which can differ from moving forwards due to fundamental asymmetry in the robot's front vs. back (i.e. the front has a head!).
This is the easiest to understand, but probably the hardest to tune. You must choose an R value, and then compensate with both S and F so AIBO turns in place around the center of its body, and there is no displacement. Bear in mind that an S compensation usually means a corresponding F. Try with different R parameters to obtain at least 6 data sets. This time, ControllerGUI only asks the angle of the circle which AIBO covers (again is easier when you push "Go" and then E-Stop when multiples of 180 degrees have been covered).
When you've a set of at least 6 measurements for every movement class, you must choose "Save" option. Youxs will obtain 5 files in memory stick, containing the set of measurementes, that you must copy to your PC. Then you have only to run Matlab file in "tools/walk_calibration/WalkCalibration.m", to obtain a file that contains the calibration matrix. you can name this file as "WALKCAL.TXT" and load it into memory stick ("data/motion").
To apply these calibration values to the walk parameter set you were using when you recorded the data: