Pioneer 2 User Manual
Page 50

Updating and Reconfiguring P2OS
44
Saphira required.
Compasscal and Revcountcal only work with licensed and properly installed Saphira.
Note that unlike the
p2oscf
and
p2osdl
tools, the compass and revcount calibration tools use the Saphira
operating environment. Hence, the programs need to be located in the
bin/
directory of a licensed Saphira
installation, and you need to have set the
SAPHIRA
environment variable.
A Saphira license comes with your Pioneer 2 Mobile Robot, and you may retrieve new licensed versions
from the http://robots.activmedia.com support website. See Chapter 3, "Quick Start", for additional detail.
Briefly, the programs operate in two stages. First, they connect with your Pioneer 2 Mobile Robot via a
Saphira-based client and retrieve its current operating parameters via the ENCODERpac and CONFIGpac
extended SIPs that are newly available in P2OS 1.4 (see previous chapter). Following program prompts,
you change the orientation of the device—rotate the compass and/or the robot—and the program calculates
a new revcount value or X and Y offsets for the electronic compass. The process may be repeated
indefinitely, each time calculating fresh configuration values, but not permanently changing them on the
robot.
In a second stage, the calibration utilities let you save their newly calculated parameters to your Pioneer 2's
FLASH ROM, so that the new value gets used by the robot after each startup. You may choose not to
change the FLASH ROM values. Rather, you may record the new configuration values and set/reset them
using the
p2oscf
tool described earlier in this Chapter.
To use the tools, first install either compasscal(.exe) or revcountcal(.exe) into the
bin
directory of your
Saphira distribution. Connect your Pioneer 2's HOST serial port to the computer, by tether if you plan to
save the calibration parameter to FLASH ROM. Turn on the robot's Main Power.
From a shell (Linux/UNIX) or DOS command line, execute the calibration tool. The default connection
port is the first serial port on your computer:
COM1
for Win32 systems or
/dev/ttys0
for other
Linux/UNIX systems. Specify an alternative port by providing a startup argument. For example:
% compasscal /dev/ttyS3
connects the
compasscal
calibration tool with the robot via the Linux computer's
/dev/ttyS3
serial port.
If the tool fails to connect its Saphira client with the robot server, it will tell you "Connection refused" and
hang. Press control-c to stop the program and try again after fixing the serial connection. Typically, reboot
the robot with its red RESET Console button after an error.