Pioneer 3TM Robotics User Manual


 
ActivMedia Robotics Operating System
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 1 using the AROScf
tool (see next chapter). Set it to 0 if the gyro isn't attached. Then to acquire gyro data,
send the GYRO client command #58 with integer argument of one; zero disables the gyro
SIP. The gyro SIP is stopped upon client disconnection or controller reset, too.
AROS 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 100ms. 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. 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 rotational rates; values above the resting center measure
clockwise rotational rates.
Table 12. GYROpac SIP contents
LABEL
BYTES CURRENT VALUE DESCRIPTION
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
INPUT OUTPUT (I/O)
Your AROS-based robot comes with a number of I/O ports that you may use for sensor
and other custom accessories and attachments. See Appendix A for port locations and
specifications. Some I/O states and readings appear in the standard SIP and may be
manipulated with AROS client commands. There also is an IOpac SIP for convenient
access to all of your robot’s I/O.
User I/O
The User I/O connector on the H8S controller contains eight digital input and eight digital
output ports, as well as an analog-to-digital (A/D) port.
23
The bit-mapped states of the
sixteen digital ports and analog port automatically and continuously appear in the
standard SIP, in their respective DIGIN, DIGOUT, ANALOG bytes.
When not physically
connected, the digital input and A/D port values may vary and change without warning.
Use the AROS client command number 30 to set one or more of the eight DIGOUT ports
on the AROS controller. Electrically, the ports are digital high (1) at ~5 VDC (V
cc
) and low
(0) at ~0 VDC (GND). DIGOUT uses a two-byte (unsigned integer) argument. The first byte
is a mask whose bit pattern selects (1) or ignores (0) the state of the corresponding bit in
the second byte to set (1) or unset (0) the digital output port.
23
Many of these ports are used by the Gripper accessory. Alternative I/O also is available.
48