Pioneer 2 User Manual

Page 34

Advertising
background image

Pioneer 2 Operating System

28

P2OS does not acknowledge receipt of a command packet nor does it have any facility to handle client
acknowledgment of a server information packet. Consequently, Pioneer client/server communications are
as reliable as the physical communication link. A cable tether between the robot and client computer, such
as a piggyback laptop, provides very reliable links; radio modem-mediated communication is much less
reliable. Accordingly, when designing client applications that may use radio modems, do not expect to
receive every information packet intact, nor can you expect the server to accept every command.

Because of the real-time nature of the client/server interaction, we made a conscious decision to provide an
unacknowledged packet interface. Re-transmitting server-information blocks or command packets would
serve no useful purpose, because old data would be virtually useless in maintaining responsive client-server
interaction.

For some operations, however, the data do not decay as rapidly: Some commands are not overly time-
sensitive—for example, those that perform such housekeeping functions as changing the sonar polling
sequence. It would be useful to have a reliable packet protocol for these operations, and we are considering
this for a future release of the Saphira server interface.

In the meantime, the Saphira client/server interface provides a simple means for dealing with ignored
command packets: Most of the client commands alter state variables in the server. By examining those
values in the server information packet, client software may detect ignored commands and reissue them
until achieving the correct state.

Server Information Packets

Like its Pioneer 1 PSOS predecessor, P2OS automatically sends a packet of information over the serial
communication port back to the client every 100 milliseconds. The standard P2OS Server Information
Packet (SIP) informs the client about a number of the robot’s operating parameters and readings, using the
order and data types shown in Table 6-3.

Unlike PSOS, however, P2OS supports several additional server information packet types, extending
the capabilities of the Pioneer 2. See a following section in this chapter for a description of the extended
server information packet types available with P2OS. And, a stored parameter lets you increase the
communications rate to 20 per second (50ms cycle). (See Chapter 7, Updating & Reconfiguring P20S.)

Table 6-3. Standard P2OS Server Information Packet (SIP)

Name

Data Type

Description

Header

integer

Exactly 0xFA, 0xFB

Byte Count

byte

Number of data bytes + 2; must be less than 201
(0xC9)

Status

byte = 0x3S; where S =

Motors status

sfSTATUSSTOPPED (2)

Motors stopped

sfSTATUSMOVING (3)

Motors moving

Xpos

unsigned integer (15 ls-bits)

Wheel-encoder integrated coordinates; platform-
dependent units; multiply by

Ypos

unsigned integer (15 ls-bits)

DistConvFactor in the parameter file to convert
to millimeters

Th pos

signed integer

Orientation in platform-dependent units—
multiply by

AngleConvFactor

for degrees.

L vel

signed integer

Wheel velocities (respective Left and Right) in
platform-dependent units—

R vel

signed integer

Multiply by

VelConvFactor

to convert to

millimeters per second

Battery

byte

Battery charge in tenths of volts

Advertising