Pioneer 2 / PeopleBot Operation Manual page 37

Pioneer 2 / peoplebot operations manual
Table of Contents

Advertisement

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.
Table 4. Standard P2OS Server Information Packet (SIP)
Name
Data Type
Header
integer
Byte Count
byte
Status/Packet
byte = 0x3S; where S =
Type
Xpos
unsigned integer (15 ls-bits)
Ypos
unsigned integer (15 ls-bits)
Th pos
signed integer
L vel
signed integer
R vel
signed integer
Battery
byte
Stall and
integer
Bumpers
Control
signed integer
FLAGS
unsigned integer
(was PTU)
Compass
byte
Sonar
byte
readings
Sonar
byte
number
Sonar
unsigned integer
range
...rest of the sonar readings...
Timer
unsigned int
Analog
byte
Digin
byte
Digout
byte
Checksum
integer
Factors see Table 17 Appendix D and Saphira's parameter definition file for your robot
Because of the real-time nature of the client/server interaction, we made a conscious
decision to provide an unacknowledged packet interface.
information or command packets would serve no useful purpose, because old data
would be virtually useless in maintaining responsive client-server interaction.
Description
Exactly 0xFA, 0xFB
Number of data bytes + 2 (checksum); must be
less than 201 (0xC9)
Motors status
2
Motors stopped
3
Robot moving
Wheel-encoder integrated coordinates; platform-
dependent units; multiply by DistConvFactor
to convert to millimeters.
Orientation in platform-dependent units—
multiply by AngleConvFactor
Wheel velocities (respectively Left and Right)
in platform-dependent units;
multiply by VelConvFactor
all—to convert into millimeters per second.
Battery charge in tenths of volts
Motor stall and bumper accessory indicators. Bit
0 of the lsbyte is the left wheel stall indicator =
1 if stalled. Bits 1-5 of that same byte
correspond to the bump switch states (1=on) for
the rear bumpers accessory. Bit 0 of the msbyte
is the right wheel stall; the bits 1-5 of that same
msbyte correspond to the front bumpers switch
states.
Setpoint of the server's angular position servo—
multiply by AngleConvFactor
b0 – motors flag (1=motors enabled)
b1 – sonar flag: enabled if 1.
Compass heading in 2-degree units
Number of new sonar readings included in
information packet; readings follow:
Sonar number
Sonar range; multiply by RangeConvFactor
currently 0.268 for all—for millimeters
Selected analog port number 1-5
User Analog input (0-255=0-5 VDC) reading on
selected port
User I/O digital input
User I/O digital output
Checksum (see previous section)
ActivMedia Robotics
for degrees.
—currently 1.0 for
for degrees
Re-transmitting server
31

Advertisement

Table of Contents
loading

Table of Contents