Pioneer 2 / PeopleBot manual Server Information Packets, Client Commands

Models: 2 / PeopleBot

1 78
Download 78 pages 41.94 Kb
Page 38
Image 38

Pioneer 2 Operating System

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 server interface.

In the meantime, the ActivMedia Robotics 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 re-issue them until achieving the correct state.

Server Information Packets

Like its Pioneer 1 PSOS predecessor, P2OS automatically sends a packet of information over the Host serial communication port to a connected client every 100 milliseconds.17 The standard P2OS Server Information Packet (SIP) informs the client about a number of operating states and readings, using the order and data types described in Table 4.

P2OS also supports several additional server information packet types, extending the capabilities of the Pioneer 2 and PeopleBot robots. These include an “alternative” SIP that currently is not supported by Saphira or ARIA.18 See following sections in this chapter for a description of the extended server information packet types.

Client Commands

P2OS has a structured command format for receiving and responding to directions from a client for control and operation of your ActivMedia robot or its simulator.

Table 5. P2OS client command packet

Component

Bytes

Value

Description

 

 

 

 

Header

2

0xFA,

Packet header; same for client and server

 

 

0xFB

 

Byte Count

1

N + 2

Number of following command bytes plus

 

 

 

Checksum’s two bytes, but not including Byte

 

 

 

Count. Maximum of 200.

Command

1

0 - 255

Client command number;

Number

 

 

see Table 4-4

Argument Type

1

 

Required data type of command argument:

(command

 

0x3B or

positive integer (sfARGINT),

dependent)

 

0x1B or

negative integer or absolute value (sfARGNINT), or

 

 

0x2B

string (sfARGSTR)

Argument

n

data

Command argument; integer or string

(command dependent)

 

 

 

Checksum

2

computed

Packet integrity checksum

The number of client commands you may send per second depends on the Host serial baud rate, average number of data bytes per command, synchronicity of the communication link, and so on. Commands are processed at a maximum rate of one per millisecond, although the P2OS servers may not be up to the task of managing a deluge of commands.

17Or 50 milliseconds. Read on.

18Indeed, if enabled, the alternative SIP apparently will “break” the client software. Read carefully.

32

Page 38
Image 38
Pioneer 2 / PeopleBot manual Server Information Packets, Client Commands