Server Information Packets - Omron Pioneer LX User Manual

Omron adept mobile robots platforms for research, education and development
Table of Contents

Advertisement

Table of Contents
int c = 0;
i = 3;
n = packetBuf[2] - 2; // data length
while (n > 1)
{
c += ((unsigned char)packetBuf[i]<<8) | (unsigned char)packetBuf[i+1];
c = c & 0xffff;
n -= 2;
i += 2;
}
if (n > 0)
c = c ^ (int)((unsigned char) packetBuf[i]);
ARIA automatically verifies packet checksums when receiving and parsing robot packets from the robot
controller, and automatically provides correct checksums with client commands sent to the robto
controller.

2.2 Server Information Packets

Once a client establishes a connection and sends the OPEN command, the robot controller automatically
and periodically sends a set of Server Information Packets (SIPs) over the connection back to the
connected software. The SIP period is 100ms (10Hz. One type of packet, the Standard SIP (also referred
to just as "SIP", or as "Motors Packet"), is always sent. In addition to the Standard SIP, other types of
information packets may be requested via client commands to include accessory or additional data. These
packets are sent immediately before or after the Standard SIP. The Standard SIP has priority, it will be
sent first on each cycle.
ARIA contains classes which serve as interfaces to the data received by these packets. See the ARIA
reference documentation and examples for details.
2.3 Standard SIP contents
"byte" indicates a single byte value (usually unsigned). "int" indicates a signed 16-bit (2-byte) integer
value (LSB). "uint" indicates an unsigned 16-bit (2-byte) integer value (LSB).
Some items in the SIP are provided by other Pioneer platforms but are not relevant or implemented in
Pioneer LX (these are shown in grey italic in the table below).
The standard SIP is automatically received and the data stored by ARIA's ArRobot class.
Field
Siz
e
Exactly 0xFA (250), 0xFB (251)
Packet
2
Header
byt
es
Packet
byt
Number of packet bytes that follow, which includes 2 bytes
Byte
e
for checksum (does not include preceding header or this
Count
byte count)
Packet
byt
0x32 when motors stopped or 0x33 when robot moving.
Page 118 of 134
Description
ARIA Function(s)

Advertisement

Table of Contents
loading

Table of Contents