Which reference system is used in the hexapod software


I’d like to modify the phoenix core software to adapt it to my MegaHexapod. Reason is that the Hexapod makes a light curve to the left, in spite I gave a command only for moving in z-direction.

In the phoenix core software I can identify a lot of Init parameters (length of legs, starting angles etc.). Trying to understand the calculations I can not see which reference system is used, which directions the axis have. For example the Init coordinates of the rear right leg are given as x=70, y=40, z=70. For the front right leg is given x=70, y=40, z=-70 .Left side identical. So it seems that the z-axis is pointing to the rear, not in forward direction. Left side must have negative x’es .
There are several points in the software where signs for many angles are modified. It’s very confusing. Has anybody have answers?

Hardware concerned:

Software concerned:
phoenix core, phoenixServoUSC

Troubleshooting steps already taken:
Debugging prints at BodyIK, LegIK
Additional information:
I’m trying to transfer the angle data for the legs to a blender simulation, to better study the gaits.
Thank you so much in advance for your help!

@Gule Although we have all of the top hobby robotic hexapod developers here: Kurte, Xan, Zenta, these days with Covid, there’s quite a delay. Matt Denton even pops in every so often. You might want to ask in the thread below since the Phoenix code is being reworked in order to use the Lynxmotion Smart Servos:

Ideally the new code will be equation-based rather than predetermined coordinates.

If it helps, the original PEP spreadsheet and thread:


Hi @cbenson,
thanks for the documents. I will have a look at them and follow the development.
The hex I build is a design published in https://www.thingiverse.com/thing:448619 . It is mechanically a bit different from the design offered by lynxmotion.
In the last days I managed to tweak some values of the Init defs, for example cINITPOS and c*CoxaAngle1. Additionally I switched the GetAtan2 function with the atan2 of the math-lib as a quick check for the behavior of the coxa servos. Now the movement of the legs, according to the coxas looks quite better. The original getAtan2 does not give me the correct angles. Now I am thinking about to replace the trigo functions by the AVRfix library. Do you have some experience on this issue? it looks like the mathlib functions are more time consuming, but when I measured the time for the function calls I received the same values. I’m doubting about the result.


1 Like

Unfortunately not. You can try an @ kurte, xan and/or zenta to see if they can offer some insight.

1 Like