Login:
Stimmen - 2, Durchschnittliche Bewertung: 3.5 ( )

Anleitung Pioneer, modell 3TM

Hersteller: Pioneer
Dateigröße: 2.08 mb
Dateiname:
Unterrichtssprache:en
Link zum kostenlosen Download Hinweise finden Sie am Ende der Seite



Anleitung Zusammenfassung


Some data are strings of up to a maximum 200 bytes, prefaced by a length byte. Unlike common data integers, the two-byte checksum appears with its most- significant byte first (opposite order). Packet Checksum Calculate the PSOS/P2OS/AROS client-server packet checksum by successively adding data byte pairs (high byte first) to a running checksum (initially zero), disregarding sign and overflow. If there are an odd number of data bytes, the last byte is XORed to the low-order byte of the checksum. NOTE: The checksum integer is placed at the end of the packet, with its bytes in the reverse order of that used for data integers; that is, b0 is the high byte and b1 is the low byte. Packet Errors AROS ignores a client command packet whose byte count exceeds 204 (total packet size of 206 bytes) or has an erroneous checksum. The client should similarly ignore erroneous SIPs. AROS does not acknowledge receipt of a command packet nor does it have any facility to handle client acknowledgment of a SIP. Accordingly, when designing client applications, keep in mind serial communication limitations, particularly data rates and physical linkage. Communication between an onboard PC client connected with the server via a signal cable is much more reliable than over radios, for example. And don’t expect to send a client command every millisecond if the HOST serial port’s baud rate is set to 9,600 kbps. Because of the real-time nature of client-server mobile-robotics interactions, we made a conscious decision to provide an unacknowledged communication packet interface. Retransmitting server information or command packets would serve no useful purpose, because old data would be virtually useless in maintaining responsive robot behaviors. Nonetheless, the client-server interface provides a simple means for dealing with ignored command packets: Most of the client commands alter state variables in the server. By examining those values in respective SIPs, client software may detect ignored commands and re-issue them until achieving the correct state. Text Box: int calc_chksum(unsigned char *ptr) // ptr is array of bytes { // first is data count int n; int c = 0; n = *(ptr++); /* Step over byte count */ n -= 2; /* don't include checksum 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); } int calc_chksum(unsigned char *ptr) // ptr is array of bytes { // first is data count int n; int c = 0; n = *(ptr++); /* Step over byte count */ n -= 2; /* don't include checksum 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); } SERVER INFORMATION PACKETS Like its PSOS and P2OS predecessors, AROS automatically and repeatedly sends a packet of information over its HOST serial port to a connected client. The standard AROS SIP informs the client about a number of operating states and readings, using the order and data types described in the nearby Table. Table 3. Standard Server Information Packet NAME VALUE DESCRIPTION HEADER int Exactly 0xFA, 0xFB BYTE COUNT byte Number of data bytes + 2 (checksum), not including header or byte-count bytes STATUS/PACKET 0x3S = Motors status TYPE 2 Motors stopped 3 Robot moving XPOS int Wheel-encoder integrated coordinates; platform-dependent units; multiply by DistConvFactor‡ YPOS int to convert to millimeters. THPOS sint+ Orientation in platform-dependent units—multiply by AngleConvFactor‡ for degrees. L VEL sint Wheel velocities in mm/sec (VelConvFactor‡ = 1.0) R VEL sint BATTERY byte Battery charge in tenths of volts (101 = 10.1 volts, for example) STALL AND BUMPERS int Motor stall and bumper indicators. Bit 0 is the left wheel stall indicator, set to 1 if stalled. Bits 1-7 correspond to the first bumper I/O digital input states (accessory dependent). Bit 8 is the right wheel stall, and bits 9-15 correspond the second bumper I/O states, also accessory and application dependent. CONTROL sint Setpoint of the server’s angular position servo—multiply by AngleConvFactor‡ for degrees FLAGS sint Bit 0 motors status; bits 1-4 sonar array status; bits 5,6 M-STOP; bits 7,8 ledge-sense IRs; bit 9 joystick button; bit 10 auto— charger power-good. COMPASS byte Electronic compass accessory heading in 2-degree units SONAR COUNT byte Number of new sonar readings included in SIP NUMBER byte If Sonar Count>0, is sonar disc number 0-31; reading follows RANGE int Sonar range value; multiply by RangeConvFactor‡ …REST OF THE SONAR READINGS… GRIP_STATE byte Gripper state byte. ANPORT byte Selected analog port number 1-5 ANALOG byte User Analog input (0-255=0-5 VDC) reading on selected port DIGIN byte Byte-encoded User I/O digital input DIGOUT byte Byte-endcoded User I/O digital output CHECKSUM integer Packet-integrity checksum ‡ Client-side data-conversion factor. Consult the ARIA parameter file your robot. + Explicitly, a signed integer. AROS also supports several addi...

Dieses Handbuch ist für folgende Modelle:
Roboter - 2TM (2.08 mb)

Bewertungen



Bewerten
Vorname:
Geben Sie zwei Ziffern:
capcha





Kategorien