Vorpal Robotics Wiki
Log in

Difference between revisions of "Vorpal The Hexapod Radio Protocol Technical Information"

From Vorpal Robotics Wiki
(Created page with "{{float_box|{{VCH Quick Links}} }} COMING SOON!")
 
Line 1: Line 1:
 
{{float_box|{{VCH Quick Links}} }}
 
{{float_box|{{VCH Quick Links}} }}
  
COMING SOON!
+
== Gamepad to Hexapod Communication Packet ==
 +
 
 +
A communication packet from the gamepad to the hexapod has the following format:
 +
 
 +
* The literal character 'V' starts the packet.
 +
* The literal character '1' indicates protocol version 1.
 +
* A one-byte length, called L in this description. This is the length of the payload data only, it does not include the 'V1' header, the length byte, or the checksum byte.
 +
* The actual payload data consisting of a number of bytes equal to L.
 +
* A checksum byte. This is the modulo 256 sum of the length byte L and all of the payload bytes.
 +
 
 +
The payload can contain one or more commands to the hexapod. There are three different formats for these commands:
 +
* A 3-byte gamepad function specification, which consists of:
 +
** A mode letter: W, D, or F
 +
** A mode number: the literal characters 1, 2, 3, or 4
 +
** A DPAD letter: f, b, l, r, s, w.
 +
** For example, W2f which means that the function to execute is walk mode 2 with the forward DPAD button pressed. As such, this type of command always starts with a literal character of W, D, or F.
 +
* A 5-byte beep command. This command consists of:
 +
** Starts with the literal letter 'B'
 +
** A 2-byte frequency, high byte first. Frequency is only effective between about 50 and 2000 Hertz.
 +
** A 2-byte duration, high byte first. This is the duration of the beep in milliseconds, interpreted as an unsigned integer.
 +
** The robot may queue up to 32 beep commands which are played in succession in accordance with their duration.
 +
* A 4-byte leg motion command. This command consists of:
 +
** The literal character L.
 +
** The next byte is the leg selection mask, which has one bit for each leg that is affected by the command. The low bit is leg 0, the next higher bit is leg 1, etc.
 +
** A 1-byte bitmaks of flags. Currently, the flags may take the value 0 or 1, where 1 means that hip motions should be mirrored on the left and right sides of the robot (useful for most types of walking).
 +
** The hip position value, from 0 to 179, followed by the knee value, from 0 to 179. For either the hip or knee position, the special value 255 means no movement is required. This allows the leg motion command to move just the hips or just the knees.

Revision as of 14:36, 13 August 2017

Vorpal Hexapod Quick Links:

Gamepad to Hexapod Communication Packet

A communication packet from the gamepad to the hexapod has the following format:

  • The literal character 'V' starts the packet.
  • The literal character '1' indicates protocol version 1.
  • A one-byte length, called L in this description. This is the length of the payload data only, it does not include the 'V1' header, the length byte, or the checksum byte.
  • The actual payload data consisting of a number of bytes equal to L.
  • A checksum byte. This is the modulo 256 sum of the length byte L and all of the payload bytes.

The payload can contain one or more commands to the hexapod. There are three different formats for these commands:

  • A 3-byte gamepad function specification, which consists of:
    • A mode letter: W, D, or F
    • A mode number: the literal characters 1, 2, 3, or 4
    • A DPAD letter: f, b, l, r, s, w.
    • For example, W2f which means that the function to execute is walk mode 2 with the forward DPAD button pressed. As such, this type of command always starts with a literal character of W, D, or F.
  • A 5-byte beep command. This command consists of:
    • Starts with the literal letter 'B'
    • A 2-byte frequency, high byte first. Frequency is only effective between about 50 and 2000 Hertz.
    • A 2-byte duration, high byte first. This is the duration of the beep in milliseconds, interpreted as an unsigned integer.
    • The robot may queue up to 32 beep commands which are played in succession in accordance with their duration.
  • A 4-byte leg motion command. This command consists of:
    • The literal character L.
    • The next byte is the leg selection mask, which has one bit for each leg that is affected by the command. The low bit is leg 0, the next higher bit is leg 1, etc.
    • A 1-byte bitmaks of flags. Currently, the flags may take the value 0 or 1, where 1 means that hip motions should be mirrored on the left and right sides of the robot (useful for most types of walking).
    • The hip position value, from 0 to 179, followed by the knee value, from 0 to 179. For either the hip or knee position, the special value 255 means no movement is required. This allows the leg motion command to move just the hips or just the knees.