Just noticed and back to playing for a little bit. So I guess the next bit is for everyone. What I have and checked so far is this:
#define DEFAULT_GAIT_SPEED 30 // Default gait speed - Will depend on what Servos you are using…
#define DEFAULT_SLOW_GAIT 50 // Had a couple different speeds…
//--------------------------------------------------------------------
//[MIN/MAX ANGLES] - Start off assume same as Phoenix...
//Zenta Changes Tibia min/max
#define cXXTibiaMin1 -60
#define cXXTibiaMax1 75
#define cXXFemurMin -90
#define cXXFemurMax 90
#define cXXCoxaMin -75
#define cXXCoxaMax 75
//[LEG DIMENSIONS] - from Lynxmotion drawing
//Universal dimensions for each leg in mm
#define cXXCoxaLength 50 // 50.8 to be exact
#define cXXFemurLength 80 // 80.32mm to be exact
#define cXXTibiaLength 116 //116.24 from drawing
//--------------------------------------------------------------------
//[BODY DIMENSIONS]
#define cRRCoxaAngle -34 //Default Coxa setup angle, 34.280877 degs from center line? atan-1(60.6/88.9)
#define cRMCoxaAngle 0 //Default Coxa setup angle
#define cRFCoxaAngle 34 //Default Coxa setup angle
#define cLRCoxaAngle -34 //Default Coxa setup angle
#define cLMCoxaAngle 0 //Default Coxa setup angle
#define cLFCoxaAngle 34 //Default Coxa setup angle
#define cRROffsetX -61 //Distance X from center of the body to the Right Rear coxa
#define cRROffsetZ 89 //Distance Z from center of the body to the Right Rear coxa
#define cRMOffsetX -81 //Distance X from center of the body to the Right Middle coxa
#define cRMOffsetZ 0 //Distance Z from center of the body to the Right Middle coxa
#define cRFOffsetX -61 //Distance X from center of the body to the Right Front coxa
#define cRFOffsetZ -89 //Distance Z from center of the body to the Right Front coxa
#define cLROffsetX 61 //Distance X from center of the body to the Left Rear coxa
#define cLROffsetZ 89 //Distance Z from center of the body to the Left Rear coxa
#define cLMOffsetX 81 //Distance X from center of the body to the Left Middle coxa
#define cLMOffsetZ 0 //Distance Z from center of the body to the Left Middle coxa
#define cLFOffsetX 61 //Distance X from center of the body to the Left Front coxa
#define cLFOffsetZ -89 //Distance Z from center of the body to the Left Front coxa
min/max angles are based off of zero for all servos. Now the fun begins:
- Can not effective measure these values:
//MIN MAX control definitions:
#define MaxLegLiftHeight 120
#define MedHighLegLiftHeight 90
#define MedLegLiftHeight 60
#define MinLegLiftHeight 40
#define cFemurHornOffset1 -140 //- 14 deg
#define cTibiaHornOffset1 580 //+ 58 deg due to how the MKIII is mounted ref. Trossen assembly instruction
//#define UseFootSensors //bug bug not installed, must disable
with the way my setup is. I would assume the heights would be based on low/med/high stance positions?
-
Ok since I set the gyre’s (cw/ccw) they would have to transpose some how with this:
#define cRRFemurInv 0
#define cRMFemurInv 0
#define cRFFemurInv 0
#define cLRFemurInv 1
#define cLMFemurInv 1
#define cLFFemurInv 1
#define cRRTibiaInv 0
#define cRMTibiaInv 0
#define cRFTibiaInv 0
#define cLRTibiaInv 1
#define cLMTibiaInv 1
#define cLFTibiaInv 1
Which brings up the point what the program does with these - do you still need to set offsets/configs programmatically for the servos like we do in the sketch and then make the above values match so the right angles get sent to the servos? -
I will leave the following values to you all to configure and let me know.
//--------------------------------------------------------------------
//[START POSITIONS FEET]
#ifdef MKI_AX18
#define cHexInitXZ 147
#define CHexInitXZCos60 104 // COS(45) = .707
#define CHexInitXZSin60 104 // sin(45) = .707
#define CHexInitY 15 //30
#define cHexGroundPos 23 //bug bug no sensors used here yet
#endif
//I’ll probably make the init position more dynamic one time…// Lets try some multi leg positions depending on height settings.
#define CNT_HEX_INITS 2 //Number of init setting
#ifdef MXPhoenix
#define MAX_BODY_Y 250
#define MAX_BODY_Z 120
#define MIN_BODY_Z -120
#else
#define MAX_BODY_Y 150
#define MAX_BODY_Z 80
#define MIN_BODY_Z -80
#endif
extern const byte g_abHexIntXZ[] PROGMEM;
extern const byte g_abHexMaxBodyY[] PROGMEM;//[PARKED POSITIONS FEET] //Zenta BETA, not sure if I’ll do it this way afterall
#ifdef MXPhoenix
#define cHexParkXZ 180
#define CHexParkXZCos60 103 // COS(55) = .574 *180 = 103
#define CHexParkXZSin60 147 // sin(55) = .819 *180 =147
#define CHexParkY 25 //30
#else
//Not defined yet
#define cHexParkXZ 130
#define CHexParkXZCos60 74 // COS(55) = .574 *180 = 103
#define CHexParkXZSin60 106 // sin(55) = .819 *180 =147
#define CHexParkY 25 //30
#endif