ARCOS
34
The
POLLING
command string argument consists of a sequence of SONAR numbers one through 32. SONAR numbers
one through eight get added to the polling sequence for SONAR array number one; numbers nine through 16 get added
to the sequence for SONAR array number two; 17-24 specify the sequence for array three; and 25-32 are for array four.
You may include up to 16 SONAR numbers in the sequence for any single array. Only those arrays whose SONAR
numbers appear in the argument get re-sequenced.
You may repeat a SONAR number two or more times in a sequence. If a SONAR number does not appear in an
otherwise altered sequence, the disc will not fire. If you do repeat a SONAR in the sequence, know that ARIA and
related clients ignore the first reading if two SONAR ranging data appear in the same SIP.
For compatibility with earlier robot operating systems, if the string is empty, all the SONAR in the array get disabled, but
their polling sequences remain unaltered, just as if you had sent the
SONAR
command with an argument value of zero.
Polling Rate
For earlier Pioneer microcontroller versions, the SONAR polling rate was fixed for each array: one SONAR disc per array
got polled every 40 milliseconds. So, for an eight-disc array with a sequential polling sequence (12345678 by default),
any one SONAR transducer would be read every 320 milliseconds. That common cycle timing accommodates ranging
out to the maximum of the SONAR of some five meters for general applications, including features recognition and
localization. For other applications, such as close-in obstacle avoidance, a shorter range but faster rate of update is
better.
Use the
SONAR_CYCLE
client command #48 to change the cycle timing on the fly to the command integer's argument
value in milliseconds. Minimum and maximum values are two and 120 milliseconds, respectively. The default value is
set in FLASH, normally to the legacy 40 milliseconds.
SONAR Range Readings
Only the SONAR readings taken since the last standard SIP get included in the next one. They do not persist beyond
that. Readings appear in the standard SIP in three bytes: The first SONAR byte is the SONAR reference, numbered
SONAR #0 through #31 (one less than when referenced in client commands). The next two bytes are the little-endian
integer representing the range reading in millimeters. ARCOS reports a maximum reading of 5000 when there is no
return echo or if the obstacle is closer than about 120 millimeters (~six inches).
S
TALLS AND EMERGENCIES
With a robot equipped with forward and/or rear bumpers, ARCOS may immediately stop the robot and notify the client
of a stall if any one or more of the contact sensors get triggered and the robot is going in the direction of the bump
(forward/front or backward/rear). Send the
BUMPSTALL
command #44 with an integer argument of zero to disable that
bump-stall behavior. Give the argument value of one to re-enable
BUMPSTALL
only when a forward bump sensor gets
triggered; two for rear-only
BUMPSTALLs
; or three for both rear and forward bump contact-activated stalls.
In an emergency, your client may want the robot to stop quickly, not subject to normal deceleration. In that case, send
the
E_STOP
command (#55).
Like
BUMPSTALL
, use ARCOS’ built-in
E_STALL
feature to simulate a stall when someone presses the robot’s STOP
button.
12
An integrated switch in the STOP button toggles a dedicated digital I/O port on the microcontroller, thereby
notifying ARCOS of the condition. ARCOS stops the robot’s motors, puts on the brakes and throws continuous stalls.
12
Available only on some robots.