Pioneer 2 User Manual
Page 36
Pioneer 2 Operating System
30
Checksum
2
computed
Packet integrity checksum
The P2OS command is comprised of a one-byte command number optionally
followed by, if required by
the command, a one-byte description of the argument type and the argument value.
Client Command Argument Types
There are three different types of P2OS client command arguments: positive integers two bytes long,
negative integers two bytes long, and NULL-terminated strings consisting of as many as 196 characters.
Table 6-5. P2OS/PSOS command set
Command
#
Args
Description
PSOS
P2OS
Before Client Connection
SYNC0
0
none
Start connection; P2OS echoes
3.x
1.0
SYNC1
1
none
synchronization commands back to
SYNC2
2
none
client.
After Established Connection
PULSE
0
none
Client pulse resets server watchdog
3.x
1.0
OPEN
1
none
Starts the controller
3.x
1.0
CLOSE
2
none
Close server and client connection
3.x
1.0
POLLING
3
string
Set sonar polling sequence
3.9
1.0
ENABLE
4
int
Enables/disables the motors
–
1.0
SETA
5
signed int
Resets translational acceleration
parameter, if positive, or
deceleration, if negative; in
millimeters per second
2
–
1.0
SETV
6
int
Reset maximum translational
velocity, in millimeters per second
4.8
1.0
SETO
7
none
Resets server to 0,0,0 origin
3.x
1.0
SETRV
10
int
Resets maximum rotational velocity
in degrees per second
4.8
1.0
VEL
11
int
Move forward (+) or reverse (-) at
millimeters per second
3.x
1.0
HEAD
12
int
Turn to absolute heading;
0-359 degrees
4.2
1.0
DHEAD
13
int
Turn relative to current heading;
+- degrees
3.x
1.0
SAY
15
string
As many as 20 pairs of duration (20
ms increments) /tone (half-cycle)
pairs; int is string length
4.2
1.0
CONFIG
18
int
Request configuration SIP
–
1.4
ENCODER
19
int
Request continuous stream (>0) or
tell to stop sending (0) encoder SIPs
–
1.4
RVEL
21
signed int
Rotate at +- degrees per second
4.2
1.0
DCHEAD
22
int
Colbert relative heading setpoint;
+- degrees
SETRA
23
int
Sets rotational (+)acceleration or
(-)deceleration, in millimeters per
second
2
–
1.0
SONAR
28
int
Enable/disable the sonar
–
1.0
STOP
29
none
Stops robot (motors remain enabled)
–
1.0
DIGOUT
30
int
Msbits is a byte mask that selects
output port(s) for changes; lsbits set
(1) or reset (0) the selected port.
4.2
1.2
VEL2
32
int
Independent wheel velocities;
lsb=right wheel; msb=left wheel;
PSOS is in +-4mm/sec; P2OS in 2
4.1
1.0