Low-Level Communication Example
UDP Data Content Details
Section titled “UDP Data Content Details”/* Raw data, total length 108 bytes * 0209 0000 6000 0000 0100 0000 2efd 3ccf * 47e4 e1bf f130 4992 f49e e7bf c3d7 eefe * 8567 f13f 9ae4 b66d 6583 f1bf 24d8 f33c * 3d00 f13f 8c16 222a 0b1f 0140 e8ba aaaa * 3803 ef3f d009 0000 60bd d2bf db04 3353 * 1150 e73f 7d0b 0000 72f0 e53f 0a3d 0cc3 * f071 e73f c3d7 eefe 7b52 f93f */
/// Content parsing// 0209 0000 // xxxx command word is 0x0902// 6000 0000 // yyyy payload data length is 0x60, i.e., 96 bytes// 0100 0000 // zzzz is 1, indicating complex command with payload data
/* * bbbbbbbbbb................... * The following is the data payload, 96 bytes total, an array of 12 double values * 2efd 3ccf 47e4 e1bf f130 4992 f49e e7bf * c3d7 eefe 8567 f13f 9ae4 b66d 6583 f1bf * 24d8 f33c 3d00 f13f 8c16 222a 0b1f 0140 * e8ba aaaa 3803 ef3f d009 0000 60bd d2bf * db04 3353 1150 e73f 7d0b 0000 72f0 e53f * 0a3d 0cc3 f071 e73f c3d7 eefe 7b52 f93f */
// Corresponds to robot joint anglesdouble joint_angle[12] = { -0.5591162726995316, -0.7381537301203293, 1.0877742727584383, -1.0945791516990426, 1.0625584011991203, 2.1401580135014395, 0.9691432317102597, -0.2928085327149832, 0.7285238862024487, 0.6856012344363617, 0.7326587495353192, 1.5826377828902742};Robot State Lookup Table
Section titled “Robot State Lookup Table”The states corresponding to (robot_basic_state, robot_gait_state, robot_motion_state) values:
| Value | State |
|---|---|
| (1, 0, 0) | Lying down |
| (1, 0, 11) | Performing forward jump |
| (4, 0, 0) | Preparing to stand |
| (5, 0, 0) | Standing up |
| (6, 0, 0) | Force control (standing still) with flat ground low-speed gait |
| (6, 0, 1) | Stepping with flat ground low-speed gait or twisting body per axis command |
| (6, 0, 2) | Performing body twist |
| (6, 0, 4) | Performing twist jump |
| (6, 2, 0) | Force control (standing still) with general obstacle-crossing gait |
| (6, 2, 1) | Stepping with general obstacle-crossing gait |
| (6, 4, 0) | Force control (standing still) with flat ground medium-speed gait |
| (6, 4, 1) | Stepping with flat ground medium-speed gait |
| (6, 5, 0) | Force control (standing still) with flat ground high-speed gait |
| (6, 5, 1) | Stepping with flat ground high-speed gait |
| (6, 6, 0) | Force control (standing still) with grip obstacle-crossing gait |
| (6, 6, 1) | Stepping with grip obstacle-crossing gait |
| (6, 12, 1) | Performing moonwalk |
| (6, 13, 0) | Force control (standing still) with high-step obstacle-crossing gait |
| (6, 13, 1) | Stepping with high-step obstacle-crossing gait |
| (7, 0, 0) | Lying down in progress |
| (8, 0, 0) | Loss-of-control protection |
| (9, 0, 0) | Posture adjustment |
| (11, 0, 0) | Performing turn-over |
| (17, 0, 0) | Homing |
| (18, 0, 0) | Performing backflip |
| (20, 0, 0) | Performing wave |