ActivMedia Robotics MOBILEROBOTS Team AmigoBot-SH Operation Manual page 41

Table of Contents

Advertisement

AmigoSH collects gyro rate and temperature readings and will, upon request, send the
accumulated data to a connected client in a GYROpac (type=0x98) server information
packet for processing. Analysis of the gyro data and subsequent modifications to the
robot's heading are done on the client side, as supported in the latest versions (1.3 and
later) of ARIA.
To enable the gyro, you must set the hasGyro FLASH parameter to one using the
AmigoSHcf tool (see next chapter). Set it to 0 if the gyro isn't attached. Then to acquire
gyro data, send the GYRO command #58 with integer argument of one; zero disables the
gyro SIP. The gyro SIP is stopped upon client disconnection or controller reset, too.
AmigoSH collects the gyro rate and temperature readings at the maximum rate of once
every 25 milliseconds and reports each of these values to the client, when enabled, in
the GYROpac SIP that gets sent just before the standard Server Information Packet every
sInfoCycle, typically every 100 milliseconds. GYROpac consists of a count byte of the
rate and temperature data pairs accumulated since the last cycle (typically 4 for a
100ms cycle time), followed by that number of rate/temperature integer/byte pairs.
Gyro rates are 10-bit integers of value 0-1023; temperatures are 8-bit values. When not
moving, the rate is centered around 512 or so, depending on the gyro's temperature and
other calibration factors which drift with use and should be corrected on the fly. Values
below that center point indicate counter-clockwise rotation rates; values above the
resting center measure clockwise rotation rates.
Table 10. GYROpac SIP contents
LABEL
BYTES
2
HEADER
B
1
YTE COUNT
1
TYPE
P
1
N
AIRS
N
FOR
PAIRS
2
RATE
T
1
EMPERATURE
2
CHECKSUM
CURRENT VALUE
DESCRIPTION
0xFA, 0xFB
Common header
xx
Varies
0x98
Packet type
x
Number of gyro data pairs
varies 0-1023
Gyro rate
varies 0-255
Gyro temperature
varies
Computed checksum
M
R
OBILE
OBOTS
35

Advertisement

Table of Contents
loading

Table of Contents