Client Commands - ActivMedia Robotics AmigoBOT Technical Manual

Hide thumbs Also See for AmigoBOT:
Table of Contents

Advertisement

AmigoBot Operating System
Bumpers
integer
Control
signed integer
PTU
unsigned integer
Compass
byte
Sonar
byte
readings
Sonar
byte
number
Sonar
unsigned integer
range
...rest of the sonar readings...
Timer
unsigned int
Analog
byte
Digin
byte
Digout
byte
Checksum
integer
To be fully compatible with the original PSOS and supporting clients like Saphira, the
standard AmigOS SIP will not change. Newer versions of the AmigOS SIP will be
implemented as a different packet type.

Client Commands

AmigOS implements a structured command format for receiving and responding to
directions from a client for control and operation of the robot or its simulator. The number
of client commands per second you may send depends on the serial baud rate and
average number of data bytes per command. Do note that the AmigOS server may not
be up to the task of managing a deluge of commands, so we recommend that you time
commands with the internal processing clock of the server, settable to either 100
milliseconds or 50 milliseconds per cycle with AmigoBot. You may exceed those rates; just
do it sparingly.
The client must send a command at least once every two seconds or so (
parameter; see Chapter 6, Updating & Reconfiguring AmigOS); otherwise, the
communication watchdog server will stop the robot's onboard drives.
AmigOS client command packet
Component
Header
Byte Count
Command
Number
Argument Type
(command
dependent)
Argument
(command dependent)
Checksum
24
Motor stall indicators. Bit 0 of the lsbyte is the
left wheel stall indicator = 1 if stalled; bit 0 of
the msbyte is the right wheel stall.
Setpoint of the server's angular position servo—
multiply by 0.001534 for degrees
Not implemented
Not implemented
Number of new sonar readings included in
information packet; readings follow:
Sonar number
Sonar reading—multiply by 0.555 for mm
Currently selected analog port number 1-5
User analog input (0-255=0-5 VDC) reading on
selected port
User digital input
User digital output
Checksum (see previous section)
Bytes
Value
Description
2
0xFA,
Packet header; same for client and server
0xFB
1
N + 2
Number of subsequent command bytes plus
checksum, not including Byte Count.
Maximum of 200 bytes.
1
0 - 255
Client command number;
see Table 4-4
1
0x3B or
Required data type of command argument:
0x1B or
positive integer (
0x2B
negative integer or absolute value (
string (
n
data
Command argument; integer or string
2
computed
Packet integrity checksum
),
sfARGINT
)
sfARGSTR
watchdog
), or
sfARGNINT

Advertisement

Table of Contents
loading

Table of Contents