Pioneer 2 / PeopleBot manual Extended Packets, Packet Processing, CONFIGpac and Config Command

Page 46

Pioneer 2 Operating System

For example,

sfRobotComInt (35,4); /* select AN4 to b in the standard SIP */

later…

if (sfRobot.timer & 0xff = = 4 && sfRobot.analog > 200) /* E-Stop button pressed and engaged */

else

/* E-stop not engaged. */

Extended Packets

Several different, additional types of server information packets come with P2OS to better support the ActivMedia Robotics community. On request from the client by a related P2OS command, the P2OS server packages and sends one or a continuous stream (one per cycle) of information packets back to the client over the Host serial communication line. Extended packets get intermingled with the standard SIP that P2OS sends to your client every 100 or 50 milliseconds, depending on the SinfoCycle parameter.21

Packet Processing

Like the standard SIP, all P2OS 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.

Saphira, for example, has an internal parser for the PSOS/P2OS packet type 0x3S (S=0-2; aka “standard” SIP), but not for the P2OS extended packets we describe in this section. However, you are able to program and add packet handlers to Saphira: either as a special plugin program as found at the http://robots.activmedia.com support website (look for details in the contributed directory) or directly in your own Saphira client. A sample packet processor is included with the Saphira distribution—packet.cin the apps/ directory, and see the AUX serial SIP processing code in the following section.

CONFIGpac and CONFIG Command

21You may have to adjust the Host port serial baud rate to accommodate the additional communications traffic.

40

Image 46
Contents Pioneer 2 / PeopleBot TM Page Important Safety Instructions Table of Contents Pioneer 2 Operating System Appendix C Basic Components all shipments IntroductionRobot Package Optional Components and Attachments partial listSoftware Additional ResourcesUser-Supplied Components / System Requirements NewsgroupsSupport Support@activmedia.comWhat Is Pioneer? Client SoftwareHttp//robots.activmedia.com ActivMedia Robotics Basic SuiteAria SaphiraPioneer Pioneer LegacyPioneer 2 and PeopleBot Page Modes of Operation Physical Characteristics Specifications & ControlsMain Components Decks and Console Pioneer 2-AT Console and hinged DeckBody, Nose, and Accessory Panels Sonar Arrays with Gain Adjustment Electronics Batteries and PowerMotors and Position Encoders Controls, Ports, and Indicators Liquid-Crystal Display & Contrast Adjustment Reset and MotorsSerial Pioneer 2 Arm-related SIPs and Commands Safety Watchdogs and ConfigurationPeopleBot Sensors and Emergency Stop Quick Start Preparative AssemblySaphira Client Installation Http//robots.activmedia.comSET SAPHIRA=C\Saphira\ver62 Saphira Client Start-UpRobot Cold Start-Up Export DISPLAY=remotecomputer0Starting Client-Server Communications Successful ConnectionOperating the Saphira Demonstration Client ConnectedQuickstart Troubleshooting Quick Start Joystick Connection Joydrive and Self-TestsJoydrive Operation Press again to begin tests Engaging Self-TestsMotors Test Left forward 13.2Gripper Sonar TestBumpers CompassUser PWMs Digin and Digout TestAnalog Tests Digin DigoutPioneer 2 Operating System Communication Packet ProtocolPacket Data Types Packet ErrorsPacket Checksum Name Data Type Description Client Commands Server Information PacketsBefore Client Connection Client Command Argument Types PtuposProgramming P2OS Saphira Client Command SupportAutoconfiguration Establishing a Client-Server Connection-SYNCKeeping the Beat-PULSE Movement CommandsClosing the Connection-CLOSE Pioneer in Motion PID ControlsSonar Position IntegrationEstop and Estall SfRobotComInt44,1Extended Packets CONFIGpac and Config CommandPacket Processing SERAUXpac and Getaux GRIPPERpac and Griprequest ENCODERpac and Encoder CommandPLAYLISTpac and Playlist Command Checksum Integer Computed checksumInput / Output I/O TCM2pac and TCM2 CommandDIGIN, TIMER, and Adsel SfSMessageDigin is %i,sfRobot.diginDigout and Psupos IOpac and IorequestPerformance PeopleBot IRs Installing the P2OS Utilities Updating & Reconfiguring P2OSWhere to Get P2OS Software Updating P2OSDownload Troubleshooting Enable FlashPut Microcontroller into Download Mode Run p2osdlChanging Configuration Parameters Configuring P2OS Operating ParametersSteps 1-3 Preparing for Configuration Run p2oscfEditing P2OS Parameters Arm Parameters Saving and RestoringSave C\p2os\myP2DX Keyword PID Parameters Encoder and RevcountCalibration Tools revcountcal and compasscal Parameter DXe Performance PBCompasscal /dev/ttyS3 Drive Lubrication Maintenance & RepairBatteries Getting Inside Alternative Battery ChargersRemoving the Nose Opening the Deck Remove indicated screws to remove Original Pioneer 2-AT DeckFactory Repairs Support@activmedia.com 603 924-2184 fax 603 924-9100 voiceAppendix a C166 Controller Ports & ConnectionsInternal Serial Connectors User I/O Expansion PortPerformance PeopleBot I/O Pin Label UseGeneral I/O Bus Appendix B User Power ConnectionsPower Switch J7 and Delayed Shutdown Logic Onboard Computer OptionPower-State Logic Computer PowerJoystick Connector Appendix CSpecifications Appendix DControls and Ports Index ControlsSpecifications Warranty & Liabilities Page Concord Street Peterborough, NH 603