ActivMedia Robotics

Normally enabled (default was disabled in P2OS), change E_STALL by sending the AROS command #56. With argument of zero, E_STALL gets disabled. An argument value of one re-enables E_STALL.

ACCESSORY COMMANDS AND PACKETS

Several types of alternative server information packets (SIPs) come with AROS to better support the ActivMedia Robotics community. On request from the client by a related AROS command, the AROS server packages and sends one or a continuous stream of information packets to the client over the HOST serial communication line. Extended packets get sent immediately after the standard SIP that AROS sends to your client every SIP milliseconds (typically 100).22

The standard SIP takes priority and gets sent as soon as the communication port is free and the cycle timer expires. So you may have to adjust the communications baud rate to accommodate all data packets in the allotted cycle time, or some packets may never get sent.

Packet Processing

Identical with the standard SIP, all AROS server information packets get encapsulated with a header (0xFA, 0xFB), byte count, packet type byte, and trailing checksum. It is up to the client to parse the packets, sorted by type for content. Please consult the respective client application programming manuals for details.

ARIA, for example, comes with a framework for packet parsing and has an internal parser for the PSOS/P2OS/AROS packet type 0x3S (S=0-2; aka “standard” SIP), as well as for some of the extended packets we describe in this section.

Table 8. CONFIGpac contents (AROS v1.5 and later)

LABEL

DATA

DESCRIPTION

HEADER

int

Common packet header = 0xfAFB

TYPE

byte

IDs ENCODERpac = 0x20

BYTE COUNT

byte

Number of following data bytes

ROBOT TYPE

str

Typically “Pioneer”

SUBTYPE

str

Identifies the ActivMedia robot model; e.g. “p3dx”,

SERIALNUM

str

Serial number for the robot.

4MOTS

byte

Antiquated (=1 if AT with P2OS)

ROTVELTOP

int

Maximum

rotational velocity; deg/sec

TRANSVELTOP

int

Maximum

translation speed; mm/sec

ROTACCTOP

int

Maximum

rotation (de)acceleration; deg/sec2

TRANSACCTOP

int

Maximum

translational (de)acceleration; mm/sec2

PWMMAX

int

Maximum

motor PWM (500=fully on).

NAME

str

Unique name given to your robot.

SIP

byte

Server information packet cycle time

HOSTBAUD

byte

Baud rate for client-server HOST serial: 0=9.6k, 1=19.2k,

 

 

2=38.4k,

3=56.8k, 4=115.2k.

AUXBAUD

byte

Baud rate for AUX serial port 1; see HostBaud

GRIPPER

int

0 if no

Gripper; else 1

FRONT SONAR

int

1 if robot has front sonar array enabled, else 0

REAR SONAR

byte

1 if robot has rear sonar enabled, else 0

LOWBATTERY

int

In 1/10

volts; alarm activated when battery charge falls

 

 

below this value.

REVCOUNT

int

Current

number of differential encoder ticks for a 360

 

 

degree revolution of the robot.

WATCHDOG

int

Ms time

before robot automatically stops if it has not

22You may have to adjust the HOST serial baud rate to accommodate the additional communications traffic.

43

Page 49
Image 49
Pioneer 2TM, 3TM manual Accessory Commands and Packets, Packet Processing