Hi all,

I try to put my FanCat into operation with the Shoulder Rolls. In opencat.h there is #define WALKING_DOF 8 which I changed to 12. A first test led to my FanCat fidgeting uncontrollably.

Are there any other points to consider?

Greetings from Germany

Steffen

the factors are the coefficient of P control (one part of PID control). It adjusts the joint angles proportional to the body orientation angles (in radian).

X leg is the joint configuration similar to humans, with elbow and knee pointing inward. >> leg is like a dog, with elbow and knee joints pointing in the same direction.

The 16 elements in the matrix are arranged as a 4x4 array, corresponding to each joint. The sub-element(pair of numbers) is the coefficient for pitch and roll angles' coefficient on each joint.

s(houlder): shoulder roll joint

u(pper): shoulder pitch joint

l(ower): knee pitch joint

R: Roll angle

P: Pitch angle

F: Factor

Hi, can you explain what are values (factors - are they degrees or some other values and what is 1.5 and -1.5? ), what is X_Leg and what is Leg and what number pairs in matrix mean and how are they grouped?

Thanks.

The following parameters are all used in the balancing, each corresponds to one DoF.

`#define panF 60 #define tiltF 60 #define sRF 50 //shoulder roll factor #define sPF 12 //shoulder pitch factor #define uRF 30 //upper leg roll factor #define uPF 30 //upper leg pitch factor #define lRF (-1.5*uRF) //lower leg roll factor #define lPF (-1.5*uPF)//lower leg pitch factor #define LEFT_RIGHT_FACTOR 1.5 #define FRONT_BACK_FACTOR 1.5 //#define POSTURE_WALKING_FACTOR 1 #ifdef POSTURE_WALKING_FACTOR float postureOrWalkingFactor; #endif`

`#ifdef X_LEG int8_t adaptiveParameterArray[16][NUM_ADAPT_PARAM] = { { -panF, 0}, { -panF, -tiltF}, { -2 * panF, 0}, {0, 0}, {sRF, -sPF}, { -sRF, -sPF}, { -sRF, sPF}, {sRF, sPF}, {uRF, uPF}, {uRF, uPF}, { -uRF, uPF}, { -uRF, uPF}, {lRF, lPF}, {lRF, lPF}, { -lRF, lPF}, { -lRF, lPF} };`

`#else // >> leg int8_t adaptiveParameterArray[16][NUM_ADAPT_PARAM] = { { -panF, 0}, { -panF / 2, -tiltF}, { -2 * panF, 0}, {0, 0}, {sRF, -sPF}, { -sRF, -sPF}, { -sRF, sPF}, {sRF, sPF}, {uRF, uPF}, {uRF, uPF}, {uRF, uPF}, {uRF, uPF}, {lRF, lPF}, {lRF, lPF}, {lRF, lPF}, {lRF, lPF} }; #endif`

There's a lot of play around the numbers. I recommend you start by tuning only one to see the effects. And you will have to reupload the

WrtieInstincts.inoto overwrite these parameters in EEPROM.Hi, I am trying to understand balancing, I see that Kitty is making small but not enough adjustments when using "wk" under different angles. It somehow concentrates more on the wk instructions than on the angle correction. Can anyone explain how adaptiveParameterArray is working with all upper leg and lower leg Roll factor?

Any hint/help appreciated

Ahhh, thank you!

But....... even the 8 DOF version is significant slower as my first catmini version. There must be more aspects.

I see, thank you!

Hi Li, as you can see in the video Bela 12 moves quite slowly using the normal kwk skill. wkR and wkL is even worse.

Do you think its because of the weight? She has 700 gr, Lipo 2200 mAh 7,4 V 25 C 2S included.

I step down the voltage to 6.7 V.

float adjust(byte i) {

float rollAdj, pitchAdj, retval;

if (i == 1 || i > 3) {//check idx = 1

bool leftQ = (i - 1 ) % 4 > 1 ? true : false;

//bool frontQ = i % 4 < 2 ? true : false;

//bool upperQ = i / 4 < 3 ? true : false;

float leftRightFactor = 1;

if ((leftQ && RollPitchDeviation[0]*slope > 0 )

|| ( !leftQ && RollPitchDeviation[0]*slope < 0))

leftRightFactor = LEFT_RIGHT_FACTOR;

rollAdj = fabs(RollPitchDeviation[0]) * adaptiveCoefficient(i, 0) * leftRightFactor;

}else{

if (i>3){

rollAdj = postureOrWalkingFactor * RollPitchDeviation[0] * adaptiveCoefficient(i, 0) ;

}else{

rollAdj = RollPitchDeviation[0] * adaptiveCoefficient(i, 0) ;

}

}

if (i == 4 || i == 5 ){

retval = rollAdj + adaptiveCoefficient(i, 1) * ((i % 4 < 2) ? RollPitchDeviation[1] : abs(RollPitchDeviation[1]));

}else if(i == 6 || i == 7){

retval = -rollAdj - RollPitchDeviation[1] * adaptiveCoefficient(i, 1);

}else{

retval = -rollAdj - RollPitchDeviation[1] * adaptiveCoefficient(i, 1);

}

return ( retval );

}

Yes, balancing was included in my original 12 DoF model. But I haven't fine tuned the Arduino code, so the direction and amplitudes may be wrong. With shoulder roll joints, the cat will be more robust to side disturbances so I'd keep balancing active on those joints.

I agree Robogeppo! :)

The 4 additional columns I have implemented and it works great. Now I notice that during balancing the servos 4, 5, 6 and 7 move outwards and inwards, depending on the angle of the stand. Is balancing already built into DOF 12 mode? I'm thinking about adjusting the transform function so that the balancing excludes the servos 4, 5, 6, 7. But maybe there is a more elegant way?

Thanks, always kind and quick to respond.

joseph

giuseppe

Thank you for the information. I saw it in the manual, Page 47 (yes, I read the manual :]).

So I have to change WALKING_DOF 8 to 12 and edit each gait to add the 4 additional columns.

For example, the original

vtarray was`const char vt[] PROGMEM = { 17, 0, 0, 51, 39,-57,-43,-18, 7, 19, -7, 42, 39,-47,-43, 1, 7, 0, -7, 39, 39,-43,-43, 7, 7, -7, -7, 39, 39,-43,-43, 7, 7, -7, -7, 39, 42,-43,-47, 7, 0, -7, 0, 39, 51,-43,-57, 7,-19, -7, 19, 39, 59,-43,-67, 7,-36, -7, 36, 39, 59,-43,-66, 7,-35, -7, 36, 39, 51,-43,-57, 7,-18, -7, 19, 39, 42,-43,-47, 7, 1, -7, 0, 39, 39,-43,-43, 7, 7, -7, -7, 39, 39,-43,-43, 7, 7, -7, -7, 40, 39,-45,-43, 3, 7, -3, -7, 50, 39,-56,-43,-16, 7, 16, -7, 58, 39,-65,-43,-33, 7, 33, -7, 60, 39,-68,-43,-38, 7, 38, -7, 52, 39,-59,-43,-21, 7, 22, -7, };`

To make it compatible with walking DOF = 12, you need to add 4 columns to the left, to represent the additional shoulder roll joints.

`const char vt[] PROGMEM = { 17, 0, 0, 0,0,0,0,51, 39,-57,-43,-18, 7, 19, -7, 0,0,0,0,42, 39,-47,-43, 1, 7, 0, -7, 0,0,0,0,39, 39,-43,-43, 7, 7, -7, -7, 0,0,0,0,39, 39,-43,-43, 7, 7, -7, -7, 0,0,0,0,39, 42,-43,-47, 7, 0, -7, 0, 0,0,0,0,39, 51,-43,-57, 7,-19, -7, 19, 0,0,0,0,39, 59,-43,-67, 7,-36, -7, 36, 0,0,0,0,39, 59,-43,-66, 7,-35, -7, 36, 0,0,0,0,39, 51,-43,-57, 7,-18, -7, 19, 0,0,0,0,39, 42,-43,-47, 7, 1, -7, 0, 0,0,0,0,39, 39,-43,-43, 7, 7, -7, -7, 0,0,0,0,39, 39,-43,-43, 7, 7, -7, -7, 0,0,0,0,40, 39,-45,-43, 3, 7, -3, -7, 0,0,0,0,50, 39,-56,-43,-16, 7, 16, -7, 0,0,0,0,58, 39,-65,-43,-33, 7, 33, -7, 0,0,0,0,60, 39,-68,-43,-38, 7, 38, -7, 0,0,0,0,52, 39,-59,-43,-21, 7, 22, -7, };`

The zeros could be replaced by better calculated angles.

There may be more lines to adjust. I have not fully validated the 12DoF case when converting from the python code on my original 12 DoF cat.

hi, you would be kind enough to give a practical example.

thanks Giuseppe

You will need to add 4 columns of zeros to the left of all the gait arrays. The shoulder joints will start from index 4.