I would like to create a new Gait for my Nybble. You can tell me what parameters to use and how to create my own array in instinct.h.
(Like: const char tr[] PROGMEM = {
30, 0, 0,
35, 38,-41,-46, 11, 2,-10, -1,
39, 23,-37,-57, 11, 9,-11, -5,
43, 6,-33,-64, 11, 21,-12,-13,...)
I am new with the robotics, please clarify me in the simplest way
Thank you
It’s better to start with static postures.
Type "kzero" in serial monitor and Nybble should move to zero state. Then type "m12 -30" to rotate the left elbow. 12 is the joint index. -30 is the rotational angle. Compare the array in Instinct.h:
const char zero[] PROGMEM = { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,};
The first number is frame count. For static posture it's 1, for gait is the number of following rows.
The next two numbers are the default body roll/pitch orientation. The next 16 numbers are indexed joint angles. Index starts from 0, as C language style. The angle's range is between -70~70. More details can be found in Instruction 7.2: Example Instinct.h
If you change the array to
const char zero[] PROGMEM = { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -30, 0, 0, 0,};
and reupload Nybble.ino, type "kzero", Nybble will move to a new posture as if you typed "m12 -30". Get familiar with joint indexes and their rotational angles. You can change many angles in the array at once to make a new posture.
A gait is just continuous postures like animation frames. You need to interpolate between postures. You will only need the last 8 joint angles for Nybble. It's an animation of frames with 8 leg joints. The angles of head and tail are calculated in real time.
It's challenging to train good gaits even for graduate students in robotics. So don't be too worried about it.