
Activ
Media Robotics
C
LIENT
C
OMMANDS
AROS has a structured command format for receiving and responding to directions from
a client for control and operation of your
Activ
Media robot or the Simulator. Client
commands are comprised of a one-byte command number optionally
followed, if
required by the command, by a one-byte description of the argument type and the
argument value.
Table 3. AROS/P2OS/PSOS client command packet protocol
COMPONENT
BYTES
VALUE
DESCRIPTION
HEADER
2
0xFA, 0xFB
Packet header; same for client and server
BYTE COUNT
1
N
Number of command/argument bytes plus
Checksum’s two bytes, but not including Byte Count
itself or the header bytes. Maximum of 249.
COMMAND
NUMBER
1
0 - 255
Client command number;
see Table 7.
ARGUMENT
TYPE
1
0x3B or
0x1B or
0x2B
Required data type of command argument:
positive integer,
negative or absolute integer,
or string (ARGSTR)
ARGUMENT
n
data
Command argument; always 2-byte integer or string
containing length prefix
CHECKSUM
2
computed
Packet integrity checksum
Table 4. AROS/P2OS/PSOS command set
COMMAND
#
ARGS
DESCRIPTION
AROS
P
2
OS
PSOS
Before Client Connection
SYNC
0
0
none
Start connection. Send in sequence. AROS echoes
1.0
1.0
3.x
SYNC
1
1
none
synchronization commands back to client, and
SYNC
2
2
none
robot-specific autosynchronization after SYNC2.
After Established Connection
PULSE
0
none
Resets server watchdog
1.0
1.0
3.x
OPEN
1
none
Starts the AROS servers
1.0
1.0
3.x
CLOSE
2
none
Close servers and client connection
1.0
1.0
3.x
POLL
ING
3 string Change sonar polling sequence (see text)
1.0
1.0
3.9
ENABLE
4
int
1=enable; 0=disable the motors
1.0
1.0
–
SETA
5
Sint
Translational
acceleration, if positive, or
deceleration, if negative; mm/sec/sec
1.0 1.0
–
SETV
6
int
Sets maximum translational velocity; mm/sec
1.0
1.0
4.8
SETO
7
none
Resets local position to 0,0,0 origin
1.0
1.0
3.x
MOVE
8
Sint
Translate (+) forward or (-) back mm distance
1.0
1.0
–
ROTATE
9
Sint
Rotate (+) counter- or (-) clockwise degrees/sec
1.0
1.0
–
SETRV
10
int
Sets maximum rotational velocity; degrees/sec
1.0
1.0
4.8
VEL
11
Sint
Translate at mm/sec forward (+) or backward (-)
1.0
1.0
3.x
HEAD
12
Sint
Turn to absolute heading; ±degrees (+ = ccw )
1.0
1.0
4.2
DHEAD
13
Sint
Turn relative to current heading; (+) counter- or
(–) clockwise degrees
1.0 1.0 3.x
SAY
15 string As many as 20 pairs of duration (20 ms
increments) /tone (half-cycle) pairs
1.0 1.0 4.2
CONFIG
18
none
Request
configuration
SIP
1.0
1.4
–
ENCODER
19
int
Request one (1), a continuous stream (>1), or stop 1.0 1.4 –
35