Im back , the battery is full and the robot is powered. The idle state is back and stable and the gait is fine, now i only need to set the proper values on the tables. Can you explain to me what are the values on those tables are exactly ?
ok looking at the robot from above the robot moving back/forward is X axis and Z axis is Left/Right
If we assume the value for the robots body center is 128 then any values below or above will change the direction that the body shifts to.
http://i531.photobucket.com/albums/dd355/innerbreed/shiftcode.png
The idea as we know is for the body to move away from the lifted leg by positioning the bodyâs center of mass away from the leg.
X Axis:
RED = Body is at Center
BLUE = Body is moving toward the Left
GREEN = Body is moving toward the Right
Z Axis:
RED = Body is at Center
PURPLE = Body is moving toward the Front
LIGHT BLUE = Body is moving toward the back
to get an idea of how your quad will work using this code is to slightly change the values and see if the robots body moves correctly.
The idea is to get the body moving in a circle as the robots legs move it forward.
Hope this helps.
What are the numbers at the top ( 1-24) ?
They represent the 24 steps in the gait.
It allow you to see at what point the leg (RF,LR,LF,RR) is lifted in the 24 step sequence.
They are not programmed to the MicroChip as they are commented out by the ; symbol and are just for the user to see reference notes along side the code. They can be deleted. They dont effect the code.
Any range of numbers will ruin the idle state of the robot, The robot seem to be moving away from the legs even when not gaiting
humm⊠any value?
need to adjust them slightly.
might also be better to start with one table at a time.
For now lets forget about the Z axis shift.
just slighty change the numbers so they run smoothly up and down. even if you increase and decrease by -+1 at a time?
yep, thatâs exactly what i did, the robot moves slightly left and right as soon as the servos are on.
Good thatâs a start. Now need to refine those values in till you get the right shifting.
hmm, how is that good ?, the robot isnât standing still, it keeps moving left and right without pressing forward or backward on the left analog stick
yep
ok try it the other way⊠not sure why its still moving as the code 0 the body if not gait is in motionâŠ
same result, this is weird >.>
Im all out⊠Sorry this is taking longer than it should.
Ill have a better look shortly.
I used the program in this link you posted lynxmotion.net/download/file.php?id=877, it also has the same effect. Does that program from the link work properly on your robot ?
Try commenting out all the shift code and see if it still does it.
Just to make sure its that making the problem.
Cannot see why it wouldnât work. Works for me.
i did that, the robot goes back to normal. stable while standing, falls when gaiting
Ok try changing BodyPosX and BodyPosZ from sbyte to sword.
Same result
So just to clarify, your code works fine without the shift parts added with the exception that it falls due to balance, but with the shift code added it shakes, except when all values are at 128?