AntDroid on KurtE Arduino Phoenix on a Mega with Protoshield

Hi,

As a newbie with a 3D printer I was looking for an interesting project, I did find this project appealing github.com/antdroid-hexapod/antdroid/wiki
Unfortunately this project was not completely documented (for me at least) and I ran into trouble wiring and getting ROS to work.

Fortunately I found this: github.com/KurtE/Arduino_Phoenix_Parts
And I was able to get it to work! (for the most)

I started out with the Chr3_PS2_ServoEx an I was able to edit the Hex_Cfg.h to:

  • Use the wireless PS2 controller
  • Control all servo’s (Unfortunately I was scammed into fake Towerpro MG996R that seem to have weak positioning and ar not “digital” at all) but I am willing to upgrade to something better if neccesary.
  • Default MIN/MAX angles seem to work OK
  • Measured and entered leg dimensions C=55 / F = 70 / T = 166
  • Measured and entered Body dimensions Angle = 450 and measured and entered the appropriate offsets

Things I run into:
How to measure cHexInitXZ and when? (at powerup or in walking mode?)
How to measure CHexInitY and when? (at powerup or in walking mode?)

//[START POSITIONS FEET ] #define cHexInitXZ 200 // Distance from Center to middle feet in walking mode? #define CHexInitXZCos60 141 // COS(45) = .707 Angle = 45 so 200x.707=141 Or do I need parameters like CHexInitXZCos45 ?? #define CHexInitXZSin60 141 // Sin(45) = .707 Angle = 45 so 200x.707=141 Or do I need parameters like CHexInitXZCos45 ?? #define CHexInitY 65 //30 Start Height? (From where to where?)

What is the explanation for this items?

// Lets try some multi leg positions depending on height settings. #define CNT_HEX_INITS 3 // Now idea?? #define MAX_BODY_Y 90 // How and when do you measure this?? #ifdef DEFINE_HEX_GLOBALS const byte g_abHexIntXZ] PROGMEM = {cHexInitXZ, 99, 86}; // Where do the numbers 99,86 come from? const byte g_abHexMaxBodyY] PROGMEM = { 20, 50, MAX_BODY_Y}; // Where do the numbers 20,50 come from?

How and when do you attach the Femur and Tibia, and what is the starting angle?

  • For example is the Femur connected at a 45 or 0 degree starting angle?
  • For example it the Tibia connected at a 90 degree starting angle?
  • Timing? do you attach them with the appropriate starting angle at Poweron or when in walking mode?

I did search the forums and found some help on the “START POSITIONS FEET” in another tread but it is still unclear to me.

Any kind of help would be deeply appreciated.

Kind regards,
Hayo

If you’re using the standard BotBoarduino + SSC-32U servo controller, it’s simply a matter of following this guide:
lynxmotion.com/images/html/build99f.htm
If it’s a variation with custom lengths between sections, then just adapt the values within the code.

Thanks,

As I dont use the SSC-32 servo controller, I dont have any way to set up the middle position and do calibration, but i got a digital servo tester for this part of the setup.
The rest of the tips I found in a KurtE post on another forum forums.trossenrobotics.com/archi … -7762.html

Kind regards,

We do not have any specific suggestions regarding the code if you only use a Protoshield for servo control.
The sample hexapod code we offer requires the SSC-32U servo controller.
Perhaps someone in the community can offer additional insights.

What protoshield do you use for R/C servo driver?

KurtE’s software can handle direct servo control with PWM emulation next to the original PWM ports in the ServoEx fork: github.com/KurtE/Arduino_Phoeni … S2_ServoEx

So I just used a simple one like in the original AntDroid project

Wired like this: