
Pioneer 2 Operating System
enabled in your robot’s FLASH parameters. The sonar servers also begin sending the
sonar-ranging results to the client via the standard SIP.
Use the
SONAR
client command #28 to enable or disable all or individual sonar arrays.
Set ("1") bit zero of the SONAR argument to enable or reset it ("0") to disable the sonar
pinging. Set argument bits two through four to an individual array number one through
four to enable or disable only that array. Array zero, the form of the P2OS command,
affects all the arrays at once.
For example, an argument value of one enables all the sonar arrays, whereas an
argument value of six silences array number three. Monitor the status of the sonar arrays
in the
Flags
integer of the standard SIP.
Each array’s sonar fire at a rate of 25 Hertz in the sequence defined in your robot’s FLASH
parameters. (Consult the next chapter on how to change the FLASH settings.) Use the
sonar
POLLING
command #3) to have your client change that firing sequence. The
changes persist until you reset or otherwise restart the microcontroller.
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 resequenced. 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.
Note that for compatibility with earlier
Activ
Media robot operating systems, if the string is
empty, all the sonar get disabled, but their polling sequences remain unaltered, just as if
you had sent the
SONAR
command with an argument value of zero.
STALLS AND EMERGENCIES
With a robot equipped with forward
and/or rear bumpers, by default AROS
immediately stops the robot and notifies
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 a 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.
Table 6. The Flags bits in the standard SIP
BIT
CONDITION IF SET
0 Motors
enabled
1
Sonar array #1 enabled
2
Sonar array #2 enabled
3
Sonar array #3 enabled
4
Sonar array #4 enabled
5
Emergency STOP button pressed
6
Emergency stall engaged
7-15 Reserved
Change AROS’ bump-stall behavior default with the
BumpStall
FLASH parameter. 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 AROS’ built-in
E_STALL
feature to simulate a stall when someone
presses your Performance PeopleBot’s Emergency STOP button. An integrated switch in
the button toggles a dedicated digital I/O port (Port A, bit 3) on the microcontroller and
thereby notify AROS of the emergency condition. Another part of the switch disconnects
42