Pioneer 2 Operating System
30
GRIPPER
33
int
Pioneer 1 and Pioneer 2 Gripper
server command. See the Pioneer
Gripper manuals for details.
4.0
1.3
ADSEL
35
int
Select the A/D port number for
analog value in SIP. Selected port
reported in SIP Timer value.
–
1.2
GRIPPERVAL
36
int
Pioneer 2 gripper server value. See
P2 Gripper Manual for details
–
PTUPOS
41
int
Msb is the port number (1-4) and lsb
is the pulse width in 100µsec units
PSOS or 10µsec units P2OS
4.5
1.2
TTY2
42
string
Send string argument to serial device
connected to AUX port on
microcontroller
4.2
1.0
GETAUX
43
int
Request to retrieve 1-200 bytes from
the aux serial channel; 0 flushes the
aux serial input buffer.
–
1.4
BUMPSTALL
44
int
Stop and register a stall if front (1),
rear (2) or either (3) bump-ring
contacted. Off (default) is 0.
–
1.5
STEP
64
none
Single-step mode (simulator only)
3.x
1.0
The byte order is least-significant byte first. Negative integers are transmitted as their absolute value
(unlike information packets, which use sign extension for negative integers; see below). The argument is an
integer, a string, or nothing, depending on the command.
Saphira Client Command Support
Saphira, as well as Ayllu, PAI, and P-LOGO, all fully supports P2OS client commands with useful library
functions. You can find prototypes in
$(SAPHIRA)/handler/include/saphira.h
and
saphira.pro
. Saphira’s P2OS command names have the prefix
sfCOM
followed by the command names
listed in subsequent tables. (See the
Saphira Software Manual
for details.)
For example, to enable the motors from the Colbert interaction window on the Saphira client, type:
sfRobotComInt(sfCOMENABLE,1);
Or to have it play a tune (albeit rather tinny), type:
sfRobotComStrn(sfCOMSAY,"\1\6\2\105",4);
Programming P2OS
Y
ou may create your own P2OS interface, or use the convenience functions available through the various
applications development software that comes with your Pioneer 2.
Synchronization—SYNC
Before exerting any control, a client application must first establish a connection to the Pioneer server via
its RS-232 serial link. Over that established communication link, the client then sends commands to and
receives operating information from the server.
When first started, the Pioneer 2 robot is in a “wait” state; P2OS listens for communication packets over its
designated port. To establish a connection, the client application must send a series of three synchronization
packets through the host communication port –
SYNC0, SYNC1, and SYNC2,
in succession, and retrieve
the server responses.
P2OS responds to each client command, forming a succession of identical synchronization packets. The
client should listen for the returned packets and only issue the next synchronization packet after it has
received the echo.
Summary of Contents for Pioneer 2
Page 6: ...vi...