M
OBILE
R
OBOTS
Table 4. AmigoSH standard SIP contents
‡
Client-side data-conversion factor. Consult the ARIA parameter file your robot.
NAME
VALUE
DESCRIPTION
HEADER
2 bytes
Exactly in order 0xFA (250), 0xFB (251)
BYTE COUNT
byte
Number of data bytes + 2 (checksum), not including header or
byte-count bytes
TYPE
0x3s
Motors status; s = 2 when motors stopped or 3 when robot
moving.
XPOS
int
Wheel-encoder integrated coordinates in millimeters
(
DistConvFactor
‡
= 1.0).
YPOS
int
THPOS
int
Orientation in degrees (
AngleConvFactor
‡
= 1.0).
L VEL
int
Wheel velocities in millimeters per second (
VelConvFactor
‡
= 1.0)
R VEL
int
BATTERY
byte
Battery charge in tenths of volts (121 = 12.1 volts, for example)
STALL AND
BUMPERS
uint
╪
Motor stall and bumper indicators. Bit 0 is the left wheel stall
indicator, set to 1 if stalled. Bits 1-7 correspond to the first bumper
I/O digital input states (accessory dependent). Bit 8 is the right
wheel stall, and bits 9-15 correspond the second bumper I/O
states, also accessory and application dependent.
CONTROL
int
Setpoint of the server’s angular position servo in degrees
FLAGS
uint
Bit 0 motors enabled status; bit 1 sonar array status; all others 0.
COMPASS
byte
Electronic compass accessory heading in 2-degree units
SONAR COUNT
byte
Number of new sonar readings included in SIP
NUMBER
byte
If Sonar Count>0, is sonar disc number 0-7; readings follow
RANGE
uint
Corrected sonar range value in millimeters (RangeConvFactor
‡
=
1.0)
…
REST OF THE SONAR READINGS
…
GRIP
_
STATE
byte
Pioneer Gripper state byte; 0 with AmigoBot.
ANPORT
byte
Selected analog port number 1-5
ANALOG
byte
User Analog input (0-255=0-5 VDC) reading on selected port
DIGIN
byte
Byte-encoded digital input (accessory)
DIGOUT
byte
Byte-encoded
digital output (accessory)
BATTERY
X10
int
Actual battery voltage in 0.1 V units
CHARGESTATE
byte
Charging state; not for AmigoBot
CHECKSUM
int
Packet-integrity
checksum
╪
Explicitly, an unsigned integer; all others sign-extended
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. AmigoSH’s command processor runs on a one
millisecond interrupt cycle, but the server response speed depends on the command.
Typically, limit client commands to a maximum of one every 3-5 milliseconds or be
prepared to recover from lost commands.
25