I'm working on adjusting custom commands for use in the ardSerial.py and example.py scripts. Just looking for clarification on the individual parameters. As an example, the crawl forward command from InstinctBittle.h is defined as: const int8_t crF[] PROGMEM = {
34, 0, 2, 1,
42, 73, 83, 75, -43, -42, -49, -41,
37, 75, 78, 77, -41, -41, -50, -41,
36, 78, 73, 80, -38, -41, -50, -41,
37, 81, 68, 82, -36, -41, -50, -40,
41, 83, 62, 85, -36, -40, -48, -40,
42, 88, 57, 85, -36, -40, -47, -39,
45, 92, 51, 88, -37, -44, -44, -38,
48, 91, 50, 90, -38, -45, -41, -37,
51, 89, 55, 91, -39, -48, -40, -36,
53, 84, 55, 93, -40, -49, -40, -35,
56, 80, 58, 99, -40, -50, -41, -37,
59, 75, 61, 101, -41, -50, -41, -40,
62, 69, 64, 101, -41, -50, -41, -42,
64, 64, 65, 99, -41, -49, -41, -44,
67, 58, 68, 95, -42, -48, -42, -46,
70, 53, 71, 92, -42, -47, -42, -47,
73, 48, 74, 88, -42, -45, -41, -48,
74, 42, 75, 83, -41, -43, -41, -49,
77, 37, 78, 78, -41, -41, -41, -50,
80, 36, 81, 73, -41, -38, -41, -50,
82, 37, 83, 68, -40, -36, -40, -50,
85, 41, 85, 62, -40, -36, -40, -48,
89, 42, 87, 57, -41, -36, -39, -47,
93, 45, 89, 51, -45, -37, -38, -44,
92, 48, 91, 50, -47, -38, -37, -41,
88, 51, 93, 55, -48, -39, -36, -40,
83, 53, 96, 55, -49, -40, -35, -40,
78, 56, 100, 58, -50, -40, -38, -41,
73, 59, 102, 61, -50, -41, -42, -41,
68, 62, 99, 64, -50, -41, -43, -41,
62, 64, 96, 65, -48, -41, -45, -41,
57, 67, 93, 68, -47, -42, -47, -42,
51, 70, 89, 71, -46, -42, -48, -42,
46, 73, 84, 74, -45, -42, -49, -41,
};
And I believe the first entry on the first column represents the number of lines in the command, and the last line is related to the time of the command in some way, but I'm not sure what this time corresponds to exactly. I don'n know what the second and third entry in this line do. The subsequent lines with 8 columns are the servo angles. For the line entry, it appears that if a negative sign is placed in front, the command executes once without repeating, where as normally it would execute until receiving a new command. For the skills like sit: const int8_t sit[] PROGMEM = {
1, 0, -30, 1,
0, 0, -45, 0, -5, -5, 20, 20, 45, 45, 105, 105, 45, 45, -45, -45,};
I'm not sure what the first 8 commands do, but the last 8 correspond to the servo angles. On the first line, what does the -30 correspond to? Is this the head angle?
You may use the takeQueue's addTask() to arrange the turning's time, rather than spliting a full cycle of a gait.
Please check this documenetaion on the data structure: https://docs.petoi.com/applications/skill-creation