Open correderadiego opened 6 years ago
Gaits are periodical movements of limbs. The limb movements are divided to frames with short time intervals. Each frame defines the joints' angles and will be converted to PWM signals sent to the servos.
Currently the gaits are stored in PROGMEM(slow flash momory) as character strings. One character has 1 byte, which can hold integers ranging -128~127. Number 0, however, is confusing as '\0'(the termination symbol of C type string) so I shifted all 0 angles to 1.
The gait list is stored in modes.h, formatted as (taking bound as example)
const char bd[] PROGMEM = { 19, //number of frames
93, 93, 63, 63,-36,-36, 7, 7, //frame1
83, 83, 49, 49,-41,-41, 14, 14, //frame2
....
'\0'};
Depending on the control token in catMini.ino, the dutyAng will copy those information from PROGMEM to SRAM(faster memory). The robot will "display" those frames with it's limb servos, to perform walking.
Hello, I already have a basic structure where I could make work together :
Serial port
Right now I would need one explanation of the connection between gait and servo. Could you explain the way you use the data stored in gait to move servos?
In addition, the second step would be to add the data from the accelerometer.
Thanks ;)