Client commands, Lient, Ommands – Pioneer 2TM User Manual

Page 40

Advertising
background image

ActivMedia Robotics Operating System

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 ActivMedia 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 then

the argument value.

Table 4. 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 5. 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

POLLING

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
(0) encoder SIPs

1.0 1.4 –

RVEL

21

sint

Rotate at (+) counter- or (–) clockwise;
degrees/sec

1.0 1.0 4.2

DCHEAD

22

sint

Heading setpoint relative to last setpoint;

1.0

34

Advertising
This manual is related to the following products:

3TM