beautypg.com

Host-to-aux serial transfers, Encoder packets, Gripper packets – Pioneer 2TM User Manual

Page 51: Ncoder packets

background image

ActivMedia Robotics

For auto-baud, the HOST serial port automatically reverts to its FLASH default baud rate if,

after being reset by the HOSTBAUD client command, it does not receive a subsequent

and valid client-command packet within 500 milliseconds.

HOST-to-AUX Serial Transfers

Use the client-side TTY2 command #42 with a string argument to have that string sent

out the AUX1 port to the attached serial device, such as a robotic camera. Similarly, use
the TTY3 command #66 to send a string argument to the AUX2 port.

AROS also maintains two circular buffers for incoming serial data from the AUX1 and

AUX2 ports. On request, AROS sends successive portions of the buffers to your client via
the HOST port in the respective SERAUXpac (type = 176; 0xB0) and SERAUX2pac (type =
184; 0xB8) SIPs. Use the GETAUX command 43 for AUX1 or GETAUX2 command number 67

for AUX2. Use the integer argument value of zero to flush the contents of the respective

buffer. Use an argument value of up to 253 bytes to have AROS wait to collect the

requested number of incoming AUX-port serial bytes and them send them in the
respective SERAUXpac or SERAUX2pac SIP.

E

NCODER PACKETS

Issue the ENCODER command #19 with an argument of one for a single, or with an
argument value of two or more for a continuous stream of ENCODERpac (type 144; 0x90)
SIPs. Discontinue the packets with the ENCODER command #19 with an argument of

zero.

Table 9. ENCODERpac SIP contents

Header integer

Exactly

0xFA,

0xFB

Byte Count

byte

Number of data bytes + 2 (checksum)

Left Encoder

integer

Least significant, most significant portion of the

integer

current accumulated encoder counts from the left wheel

Right Encoder

integer

Least significant, most significant portion of the

integer

current accumulated encoder counts from the left wheel

Checksum integer Checksum

for packet integrity

Gripper packets

AROS controls the Gripper accessory for the Pioneer and Performance PeopleBot robots.

The client sends commands to the Gripper servers and gets Gripper status information

from the standard SIP. Please consult the respective manuals for details.

Table 10. GRIPPERpac packet contents

HEADER

int

Exactly 0xFA, 0xFB

BYTE COUNT

byte

Number of data bytes + 2 (checksum)

TYPE

byte

Packet type = 0xE0

H

AS

G

RIPPER

byte

Gripper type: 0=none; 1=User; 2=PeopleBot

GRIP

_

STATE

byte See

nearby Table

GRASP

_T

IME

byte

MS time controls grasping pressure

CHECKSUM

integer

Computed

checksum

AROS supports a GRIPPERpac (type=224; 0xE0) packet type and related GRIPREQUEST

P2OS command #37 to retrieve setup and status information from the servers.

Normally disabled, your client program may request one or a continuous stream
(command argument > one) of Gripper packets. Send GRIPREQUEST with the

argument value zero to stop continuous packets.

45

This manual is related to the following products: