ActivMedia Robotics
SERVER INFORMATION PACKETS
Like its PSOS and P2OS predecessors, AROS automatically and repeatedly sends a packet of information over its HOST serial port to a connected client. The standard AROS SIP informs the client about a number of operating states and readings, using the order and data types described in the nearby Table.
Table 3. Standard Server Information Packet
NAME
VALUE
DESCRIPTION
HEADER | int |
| Exactly 0xFA, 0xFB |
BYTE COUNT | byte |
| Number of data bytes + 2 (checksum), not including header or |
|
|
| |
STATUS/PACKET | 0x3S = |
| Motors status |
|
|
|
|
TYPE | 2 |
| Motors stopped |
| 3 |
| Robot moving |
XPOS | int |
| |
|
|
| multiply by DistConvFactor‡ |
YPOS | int |
| to convert to millimeters. |
THPOS | sint╪ |
| Orientation in |
|
|
| AngleConvFactor‡ for degrees. |
L VEL | sint |
| Wheel velocities in mm/sec (VelConvFactor‡ = 1.0) |
R VEL | sint |
|
|
|
|
|
|
BATTERY | byte |
| Battery charge in tenths of volts (101 = 10.1 volts, for example) |
STALL AND | int |
| Motor stall and bumper indicators. Bit 0 is the left wheel stall |
BUMPERS |
|
| indicator, set to 1 if stalled. Bits |
|
|
| I/O digital input states (accessory dependent). Bit 8 is the right |
|
|
| wheel stall, and bits |
|
|
| states, also accessory and application dependent. |
CONTROL | sint |
| Setpoint of the server’s angular position |
|
|
| AngleConvFactor‡ for degrees |
FLAGS | sint |
| Bit 0 motors status; bits |
|
|
| bits 7,8 |
|
|
| charger |
COMPASS | byte |
| Electronic compass accessory heading in |
SONAR COUNT | byte |
| Number of new sonar readings included in SIP |
NUMBER | byte |
| If Sonar Count>0, is sonar disc number |
RANGE | int |
| Sonar range value; multiply by RangeConvFactor‡ |
…REST OF THE SONAR READINGS… |
| ||
|
|
| |
GRIP_STATE | byte | Gripper state byte. | |
ANPORT | byte | Selected analog port number | |
ANALOG | byte | User Analog input | |
DIGIN | byte | ||
|
|
| |
DIGOUT | byte | ||
CHECKSUM | integer |
‡
AROS also supports several additional SIP types. These include an “alternative” SIP that currently is not supported by Saphira or ARIA.15 See following sections in this chapter for a description of the extended SIP types.
15Indeed, if enabled, the alternative SIP apparently will “break” the client software. Read carefully.
33