I have heard of a few reports of some issues with the Arduino Phoenix code running on some of the Round Hex robots. Note: some of these issues are not specific to the Arduino code and the BAP code would have the same issues…
Was not limiting the Body Y positions when you used the UP/DOWN buttons on the pad. So for this test version I did not allow the Y to go below 0 or > than some value that can be defined in the config header file and defaults to 100. There were cases before that if this value went unchecked that some operations may crash…
The design of the legs (long tibia…) are such if you defined the init position for walking optimally, the body of the robot could not rest on the ground, but would instead be on top of the legs… So in this test version, I am playing with some code that when you adjust the Body Y position (triangle, Up and Down buttons), it checks a table in the CFG file that there are a set of Y values, that if the body is less than entry 0 than it will use a an init XZ value and adjust the position of the legs depending on their angle… So in this case the robot starts off with the legs farther apart at ground level, as the robot gets higher, it moves the legs closer in to the body… There is code in place that when the adjustment is done one complete step in place in the current gait happens, to allow all the legs to move into place…
This code is in test phase and is not part of the Github code (yet). Would be good if others who had problems could try it out for their configuration and see if it solves the issues. Before I would integrate this into Github, need to also do a test through to see how it interacts with other modes, in particular single leg mode… Also Turn on and off…
As far as the max body height ~90 worked best for me.
Issues:
The bot does not obey the max height in a specific situation:
Turn on the Bot, press Start to activate the servos, press up on the Dpad to raise the body then hit L1 to activate Translate mode, and finally max out the Right Stick Y axis. The box goes too far up and the legs sprawl apart in a crash. However the bot seems to correct this 1. after the first crash 2. if you instead use triangle to raise the body.
Sortof as expected. I am only restricting one out of the two height variables. Now simply need to change where the two are added. Will probably change the lines to:
//Calculate g_InControlState.BodyPos.y
g_InControlState.BodyPos.y = min(max(g_BodyYOffset + g_BodyYShift, 0), MAX_BODY_Y);
Will try this out later, may first try plugging your values in and see if I can get mine to crash first…
But you might give this change to the PS2 code a try. I added the min( to the line…
Alright, the body height no long causes the robot to crash no matter how hard I try to break it.
The only other bug is when in Body rotate mode. The higher the body is the more likely the legs are to lift off the ground and crash when at the extreme rotations. It becomes more apparent when the body is high enough to be level with the femurs and higher.