background image

Pioneer 2 Operating System

26

Table 6-1. Main elements of PSOS communication packet protocol

Packet Data Types

Packetized client commands and server information blocks use several data types, as defined below in
Table 6-2. There is no convention for sign; each packet type is interpreted idiosyncratically by the receiver.
Negative integers are sign-extended.

 Table 6-2. P2OS Communication Packet Data Types

Packet Checksum

Calculate the communication packet checksum by successively adding data byte pairs (high byte first) to
the running checksum (initially zero), disregarding sign and overflow. If there is an odd number of data
bytes, the last byte is XORed to the low-order byte of the checksum.

NOTE:

 The checksum word is placed at the end of the packet, with its bytes in the reverse order of

that used for arguments and data; that is, b

0

 is the high byte, and b

1

 is the low byte.

Use the following C-code fragment in your client applications to compute a checksum:

int
calc_chksum(unsigned char *ptr) /* ptr is array of bytes, first is data count
*/
{
  int n;
  int c = 0;
  n = *(ptr++);
  n -= 2;

/* don't use chksum word */

  while (n > 1) {
    c += (*(ptr)<<8) | *(ptr+1);
    c = c & 0xffff;
    n -= 2;
    ptr += 2;
  }
  if (n > 0) c = c ^ (int)*(ptr++);
  return(c);
}

Packet Errors

Currently, P2OS ignores a client command packet whose byte count exceeds 200 or has an erroneous
checksum. The client should similarly ignore erroneous server information packets.

P2OS does not acknowledge receipt of a command packet nor does it have any facility to handle client
acknowledgment of a server information packet. Consequently, Pioneer client/server communications are

Component

Bytes

Value

Description

Header

2

0xFA, 0xFB

Packet header; same for client and server

Byte Count

1

N + 2

Number of subsequent data bytes, including
checksum word, but not Byte Count.
Maximum 200 total bytes.

Data

N

command

or SIB

Client command or server information block
(SIB; discussed in subsequent sections)

Checksum

2

computed

Packet integrity checksum

Data Type

Bytes

Order

integer

2

b

0

 low byte; b

1

 high byte

word

4

b

0

 low byte; b

3

 high byte

string

up to ~200,

length-prefixed

b

0

 length of string;

b

1

 first byte of string

Summary of Contents for Pioneer 2

Page 1: ...Pioneer 2 M O B I L E R O B O T S with Pioneer 2 Operating System Servers OPERATIONS MANUAL THE PIONEER 2 MOBILE ROBOT...

Page 2: ...ers are authorized by revocable license to develop and operate custom software for personal research and educational use only Duplication distribution reverse engineering or commercial application of...

Page 3: ...ers 10 Sonars 10 Batteries and Power 11 Electronics 12 Power Motor Board 12 Microcontroller 12 Sonar Boards 13 Controls Ports and Indicators 13 Main Power Fuse and Indicator 13 Recharge Power Port 13...

Page 4: ...ackets 35 Encoder Packets 35 AUX Serial Packets 36 Standalone Mode 37 7 UPDATING RECONFIGURING P2OS 38 Where to Get P2OS Software 38 Installing the P2OS Utilities 38 Updating P2OS 38 Step 1 Serial Con...

Page 5: ...Port 47 The General I O Bus 48 APPENDIX B 50 User Power Connections 50 Onboard Computer Option 51 Power Switch J7 and Delayed Shutdown Logic 51 Power State Logic 51 Computer Power 51 APPENDIX C 52 APP...

Page 6: ...vi...

Page 7: ...inst mechanical electronic and labor defects for one year Third party accessories are warranted by their manufacturers typically for 90 days All of these precautions ensure that you have many years to...

Page 8: ...ensed customers To gain access enter the username and password written on the Pioneer Registration Account Sheet that accompanied your robot and this manual Pioneer Newsgroup We maintain an E mail bas...

Page 9: ...ber look for it beside the Main Power switch we often need to understand your robot s configuration to best answer your question Your message goes directly to the Pioneer technical support team There...

Page 10: ...h a common application interface to the robot server software P2OS With the onboard computer option Pioneer 2 has four additional RS 232 ports a PCI bus and space for up to five PC104 accessory cards...

Page 11: ...nging availability of resources See the Ayllu Programmer s Manual for details An important benefit of Pioneer s client server architecture is that different robot servers can be run using the same hig...

Page 12: ...ontroller with independent motor power and sonar controller boards for a versatile operating environment The controller has two RS232 standard communications ports and an expansion bus to support the...

Page 13: ...may reprogram the onboard flash ROM and RAM for direct and stand alone operation of Pioneer 2 We supply the means to download but not the microcontroller s programming software for you to work in stan...

Page 14: ...Figure 3 1 The Pioneer 2 DX CE physical dimensions and swing radius Weighing only 9 Kg 20 pounds with one battery the basic Pioneer 2 Mobile Robot is lightweight but its strong aluminum body material...

Page 15: ...e cables to the accessory panels on each side of the DX CE or trough an access panel on top of the Pioneer 2 AT A removable plug in the middle of the Deck gives you convenient access to the interior o...

Page 16: ...eal place for you to attach your own custom accessories and sensors Accessory Panels The Pioneer 2 DX comes with a removeable panel on each side of the robot on which you can install accessory connnec...

Page 17: ...gain control counterclockwise to make the sonar less sensitive to external noise and false echoes Low sonar gain settings reduce the robots ability to see small objects under some circumstances that...

Page 18: ...e robot controls power for the entire system Processor control switches and indicators fit through the Deck Console Power Motor Board Inside the robot mounted to the battery box is the Pioneer 2 Motor...

Page 19: ...erate below 10 VDC The microcontroller will sound a warning when the battery voltage falls below that set level see Chapter 7 Updating and Reconfiguring P2OS and the optional computer power circuitry...

Page 20: ...grams downloaded in stand alone mode get restarted The MOTORS pushbutton is NOT a power switch it does not directly control power to the motors P2OS does and your stand alone software must The MOTORS...

Page 21: ...dem s power off if you use the Console Serial Port to connect a piggyback laptop or another external computer to the robot The radio modem gets connected to the microcontroller via the internal shared...

Page 22: ...during shipping Consult any Tech Notes and accessory assembly manuals that may accompany your Pioneer 2 for final assembly details Saphira Client Installation The Saphira client development software...

Page 23: ...3 8 The heartbeat asterisk character following the battery voltage should be flashing on and off The same P2OS initialization sequence occurs whenever you press the red RESET button Unlike the origina...

Page 24: ...rs The associated green LED should stop flashing and light continuously The amber SERIAL port indicator LEDs on the robot s Console should blink to indicate Saphira client P2OS server communications T...

Page 25: ...to Pioneer One of Saphira s behaviors by the way is to have Pioneer seek and traverse the center of a corridor Figure 4 3 The main window of Pioneer s Saphira client You may enable and disable Saphir...

Page 26: ...oting You must have a valid Saphira license to connect with Pioneer or any other robot Unlicensed Saphira clients may only connect with the Pioneer simulator Licensed versions of Saphira come with the...

Page 27: ...the Saphira client and Pioneer server but both the client and server remain active you may revive the connection with little effort If you are using radio modems first check and see if the robot is o...

Page 28: ...bstacles from within a diameter of four to five feet around the Pioneer When ready press the white MOTORS button once again The motors self test begins by engaging the left drive wheel first forward t...

Page 29: ...lled the DIGOUT self test gets bypassed Like DIGIN the DIGOUTself test software maps into series of eight ones and zeros the current state of each the eight digital output ports OD0 7 and displays the...

Page 30: ...ample only the second and third bumps are on Front Bumps 00100010 13 2 Rear Bumps 00101100 13 2 The basic Pioneer 2 has no attachments to the bump ports Because their normal state is floating the Bump...

Page 31: ...th your robot This chapter explains how to communicate with Pioneer via the P2OS client server interface The same P2OS functions and commands are supported in the various client programming libraries...

Page 32: ...o compute a checksum int calc_chksum unsigned char ptr ptr is array of bytes first is data count int n int c 0 n ptr n 2 don t use chksum word while n 1 c ptr 8 ptr 1 c c 0xffff n 2 ptr 2 if n 0 c c i...

Page 33: ...eving the correct state Server Information Packets Like its PSOS predecessor P2OS automatically sends a packet of information over the serial communication port back to the client every 100 millisecon...

Page 34: ...wer versions of the P2OS SIP will be implemented as a different packet type Client Commands P2OS implements a structured command format for receiving and responding to directions from a client for con...

Page 35: ...celeration if negative in millimeters per second2 1 0 SETV 6 int Reset maximum translational velocity in millimeters per second 4 8 1 0 SETO 7 none Resets server to 0 0 0 origin 3 x 1 0 SETRV 10 int R...

Page 36: ...n find prototypes in SAPHIRA handler include saphira h and saphira pro Saphira s P2OS command names have the prefix sfCOM followed by the command names listed in subsequent tables See the Saphira Soft...

Page 37: ...nds Otherwise it assumes the client server connection is broken and shuts down the robot s motors It s good practice to send a PULSE to Pioneer just after opening the servers And if your client applic...

Page 38: ...n Registration between external and internal coordinates deteriorates rapidly with movement due to gearbox play wheel imbalance and slippage and many other real world factors You can rely on the dead...

Page 39: ...bered octal 1 through 10 and the rear sonar are numbers 11 through 100 You may repeat a sonar number and have it ping more than one per sequence For example sfRobotComStrn sfCOMPOLLING 1 2 1 2 4 ping...

Page 40: ...nteger argument The first byte is a mask whose bit pattern selects 1 or ignores 0 the state bit pattern expressed in the second byte Accordingly you might use Saphira to set digital output ports 1 and...

Page 41: ...acket processor is included with the Saphira distribution packet c in the apps directory Configuration Packets Send the CONFIG command number 18 with any integer argument to request P2OS send back a s...

Page 42: ...and send those incoming data in a special SERAUXpac type 176 0xB0 SIP back to the client via the common HOST serial port P2OS maintains a circular buffer for incoming serial data from the AUX port an...

Page 43: ...SERAUXpac send along to default else sfProcessClientPacket packet_type void main int argc char argv Initialize client and connect with robot sfRobotComInt 43 0 flush the aux buffer sfRobotComStrn 42 f...

Page 44: ...command is tar zxvf p2os1_3 tgz The command creates a p2os directory in the current path and stores the P2OS software there Updating P2OS Use the p2osdl exe program to download a fresh copy of PSOS t...

Page 45: ...l or not If it was simply reboot the robot and go on to connect with a client or change its operating parameters see next section Otherwise try the download from Step 1 again to be sure you performed...

Page 46: ...To see a parameter s current value individually type its keyword alone To change a P2OS variable parameter s value type its keyword followed by the replacement value That value may be a string no quo...

Page 47: ...ivated when battery charge falls below this value RevCount integer 20000 The number of encoder ticks for a 360 degree revolution of the robot Reset this parameter to a number that best reflects the ch...

Page 48: ...strates the restore save process Notice that the name stored on the robot doesn t change until the change is saved command name Your robot s name is Son_of_Flakey command restore p2dx command name You...

Page 49: ...used by the robot after each startup You may choose not to change the FLASH ROM values Rather you may record the new configuration values and set reset them using the p2oscf tool described earlier in...

Page 50: ...isrupting operation of the onboard systems except the motors of course Either connect the charger which powers the robot s systems while you change the battery or batteries Or if you have two or three...

Page 51: ...describe the problem in as much detail as possible Also include your name e mail and mail addresses as well as phone and fax numbers Tell us when and how we can best contact you we will assume e mail...

Page 52: ...ed odd pins on top and even pins on the bottom from right to left relative to the key Figure A 1 13 11 9 7 5 3 1 14 12 10 8 6 4 2 Figure A 1 Common IDC connector pinouts Figure A 2 Pioneer 2 microcont...

Page 53: ...hares its transmit TxD1 and receive RxD1 lines with the external serial port on the Console The P2OS connector also has three data lines P3_12 _14 and _15 that are used by the Pioneer compass Table A...

Page 54: ...D ports and the PWM ports are shared with digital input and output lines respectively Table A 4 User I O Expansion Port Pin Label Use Pin Label Use 1 P2_12 OD0 or PWM 1 2 P3_0 ID0 3 P2_13 OD1 or PWM 2...

Page 55: ...Pin Label Pin Label 1 P3_0 2 D0 3 P3_1 4 D1 5 P3_2 6 D2 7 P3_3 8 D3 9 P3_4 10 D4 11 P3_5 12 D5 13 P3_6 14 D6 15 P3_7 16 D7 17 WR 18 CS2 19 Vpp 20 CS3 Bumpers 21 P2_12 22 CS4 23 P2_13 24 CS5 25 P2_14...

Page 56: ...d Ethernet radio Find the Motor Power Board attached to the back of the battery box Figure B 1 Pioneer 2 Motor Power Board User Power Connections On the Pioneer 2 Motor Power board four sets of un swi...

Page 57: ...wer not system wide shutdown Similarly when the computer power is manually switched off the comparator is grounded below 10 VDC of course and the same two minute delayed shutdown occurs In all cases p...

Page 58: ...of octagon Holonomic 1 turns in own radius These are for sixteen sonars six each front and rear two each side Sonar parameters SonarNum N is number of sonar SonarUnit I X Y TH is unit I 0 to N 1 desc...

Page 59: ...These are for the eight front sonars six front two sides Sonar parameters SonarNum N is number of sonars SonarUnit I X Y TH is unit I 0 to N 1 description X Y are position of sonar in mm TH is bearin...

Page 60: ...wer Battery 3x12V lead acid Same Charge 252 watt hr hot swappable Same Run time 8 10 hrs 4 6 hrs Recharge time 8 hrs Same Mobility Drive wheels 2 solid rubber with 4 pneumatic rear balancing caster 4...

Page 61: ...5 0 5 VDC Same Digital timer output 8 1 sec resolution Same Digital timer inputs 8 1 sec resolution Same Comm port 2 RS 232 serial Same FLASH PROM 32 KB P2OS encoded software Same RAM 32 KB user prog...

Page 62: ...31 Deck 9 DHEAD 31 Digin 33 Digital Input 33 Digital Output 33 DIGOUT 33 Drive Lubrication 43 Electronics 12 Email pioneer support 3 pioneer users 2 saphira users 2 ENABLE 31 ENCODER 35 ENCODERpac 35...

Page 63: ...al ports AUX 35 Server Information packets 27 Server information packets 27 Servers 25 ADSEL 33 Autoconfiguration 30 BUMPSTALL 34 CLOSE 31 DCHEAD 31 DHEAD 31 DIGOUT 33 OPEN 31 Pioneer 2 Operating Syst...

Page 64: ...r no liabilities for operation and use of the robot or any accompanying software except that covered by the warranty and period The developers marketers or manufacturers shall not be held responsible...

Page 65: ...44 Concord Street Peterborough NH 03458 603 924 9100 603 924 2184 fax http www activmedia com robots...

Reviews: