![ActivMedia Robotics Pioneer 2 TCM2 Скачать руководство пользователя страница 14](http://html1.mh-extra.com/html/activmedia-robotics/pioneer-2-tcm2/pioneer-2-tcm2_manual_2843941014.webp)
TCM2 Operation and Programming
10
Calibration Modes 4-6
Place the TCM2 Module into User or Auto Calibration mode by sending the TCM2 server the P2OS
command 45 with the argument 4 or 5, respectively. Stop either calibration mode by sending the TCM2
P2OS command with the argument 6 or 7.
You should calibrate your TCM2 Module at least once after installing it on your Pioneer Mobile Robot.
We also recommend that you calibrate it whenever you change operating environments. Detailed
descriptions and operations of the TCM2 Module in calibration modes are provided in the
TCM2 User’s
Manual
.
P2OS command mode 6 automatically causes the TCM2 module to save its calibration settings and
reverts to mode 1 after returning a single TCM2 SIP containing the updated calibration score to the
connected client. It and subsequent SIPs contain that latest calibration score on which you may evaluate
the calibration settings.
Note that the TCM2 P2OS command 7 automatically cancels a calibration session, too, but will not
necessarily cause a TCM2 SIP to be sent.
Reset Mode 7
The reset TCM2 command argument forces a soft Module reset. Cycle RADIO or MAIN power to
force a hard reset. When started or upon reset, the P2OS TCM2 module reverts to its default state. From
the factory, the Moule is set up to communicate at 9600 baud, include compass, inclinometer, temperature
(in degrees Farenheit) and magnetmometer data in its standard output word, be in standby mode, and
respond to the single "h" character to halt. Change the module parameters manually with P2OS-mediated
TTY2 commands or through the Win32 TCM2 software provided by the manufacturer and included on
the TCM2 Compass diskette.
Saphira TCM2 Plugin
For convenience, we supply a Saphira 6.2 plugin that parses the P2OS TCM2 SIP and puts the data
into into a user-accessible structure.
Place the
TCM2_plugin.EXE
(Win32) or
TCM2_plugin.tgz
(Linux) into the top-level directory
of your Saphira 6.2 distribution (Saphira/ver62, for example) and either execute the self-extracting
archive (.EXE) or unzip/untar the .tgz file (tar -zxvf TCM2_plugin.tgz). The process creates a
devices/tcm2 directory containing the plugin sources and makefiles. The
tcm2.dll
(Win32) or
tcm2.so
plugin get placed in Saphira's colbert directory.
To use the plugin software, simply load the dynamic link library
tcm2.so
(Linux/Unix) or
tcm2.dll
(Win32) into a Saphira 6.2 running Colbert. Type “help tcm2” in the Colbert interaction window to
review the list of implemented variables. Examine the source files for details.
TTY2 and GETAUX
The P2OS TTY2 and GETAUX commands let you send and receive data through the client-connected
HOST serial port on the Pioneer microcontroller to and from a serial device attached to the AUX serial
port. Consequently, you may bypass the TCM2 P2OS servers and send commands directly to and receive
responses back from the Module. This way, you may send occasional commands to reconfigure the
Module even while running the TCM2 servers, or take complete control with your client software.
When exerting client-direct control of the Module, we recommend that you disable the TCM2 P2OS
servers, either temporarily (mode 0) or permanently (compass configuration parameter set to 0).
Otherwise, the P2OS TCM2 servers may interfere with the Module’s responses.
The TCM2 Module accepts and sends ASCII-encoded commands and data. Compose your TTY2
commands and parse GETAUX packets accordingly. Details on use of the TTY2 and GETAUX P2OS
commands and response packets are in the
Pioneer 2 Operations Manual
. The collection of TCM2
commands and data are detailed in the
TCM2 User’s Manual
.
For example, you might want the TCM2 Module to send the temperature in Fahrenheit instead of
Centigrade degrees. Change that configuration setting using the following Saphira/P2OS command
sequence:
sfRobotComInt(45,0); /* disable the TCM2 servers */