ARCOS
44
What happens next depends on the
HasGyro
setting.
Client-Side Gyro
With
HasGyro
set to one (legacy), ARCOS simply collects the gyro readings and will, upon request by the client with
command GYROREQUEST #58 and argument 1 (zero to cancel), send the collected data just before the standard SIP 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. See
Aria/src/ArAnalogGyro.cpp
for details. Note that the client-side gyro calibration/correction
factor is found as the
GyroScaler
value in your robot’s Aria/params/*.p parameter file, and should be calibrated for
the particular robot and gyro. See Chapter 8, Calibration & Maintenance for details.
GYROpac
consists of a count byte of the rate and temperature data pairs accumulated since the last cycle (typically four
for a 100 millisecond cycle time), followed by that number of rate/temperature integer/byte pairs.
Table 15. GYROpac SIP contents
Server-Side Gyro
With the FLASH parameter
HasGyro
set to two, ARCOS manages the gyro internally. It, too, averages readings over the
25 millisecond time, but it does not send the GYROpac. Instead, ARCOS fuses the gyro and encoder readings to
compute the XPos, YPos, and ThPos in the standard SIP.
15
Like ARIA’s treatment, the server-side gyro firmware automatically detects its center point and compensates for drift.
Unlike the client side, the server-integrated gyro has two FLASH-based calibration factors—
GyroCW
and
GyroCCW
--that
determine actual rates clockwise and counterclockwise and need to be set for each robot/gyro pair—something typically
done at the factory, but should be recalibrated periodically. Client commands #38 (GYROCALCW) and #39
(GYROCALCCW) let you temporarily change the clockwise and counterclockwise values, respectively, to help during
calibration. See Chapter 8, Calibration & Maintenance for details.
If the server-side gyro is malfunctioning, such as if it’s unable or has yet to determine its center point, the robot will
stall, complete with excessive beeping from the piezo buzzer. The GYROREQUEST command #58 with argument zero
disables the client-side gyro; an argument of one re-enables it.
A
UTOMATED
R
ECHARGING
S
YSTEM
The automated recharging accessory and associated charge-management circuitry on the robot may be controlled from
the robot's microcontroller.
15
With no gyro or with the client-side gyro, position integration is based on encoder readings exclusively.
L
ABEL
D
ATA
V
ALUE
D
ESCRIPTION
Header
2
0xFA, 0xFB
Common header
Byte count
1
xx
Varies
Type
1
0x98
Packet type
N pairs
1
x
Number of gyro data pairs
FOR
N
PAIRS
:
…
Rate
2
varies 0-1023
Gyro rate
Temperature
1
varies 0-255
Gyro temperature
Checksum
2
varies
Computed checksum