hello… lol
Your quad looks to be walking ok. a great effort for your first robot. hats off. 8)
yes you can get a quad to walk using the Phoenix code by adding a few things.
The code uses a bytetable to shift the body as each opposite leg is lifted. i would assume a few adjustments will need to be made to get it to shift correctly for your quad.
**Firstly **What version of the code are you using? i used Software version: V2.0.1 but any of them can be changed this way.
**Second **your first goal is to configure the Cfg. files so that the parameters and values match your robot…
Leg/body dimensions, leg starting init pos annd also the min/max ranges on the leg servos.
Add this near to the start of your code…
; (RF) (LR) (LF) (RR)
;0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
X_Axis_Shift bytetable 89, 90,100,110,120,130,140,150,151,152,153,152,151,150,140,130,120,110,100, 90, 89, 88, 87, 88, 89,
; (RF) (LR) (LF) (RR)
;0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
Z_Axis_Shift bytetable 130,128,130,132,134,136,138,140,138,136,134,132,130,128,130,132,134,136,138,140,138,136,134,132,130,
Also remove all the gaits and replace them with this one:
[code]GaitSelect
;Gait selector
IF (GaitType = 0) THEN ;Wave 24 steps
GaitLegNr(cLR) = 1
GaitLegNr(cRF) = 21
GaitLegNr(cRR) = 13
GaitLegNr(cLF) = 9
NrLiftedPos = 3
HalfLiftHeigth = 0
TLDivFactor = 20
StepsInGait = 24
NomGaitSpeed = 100
ENDIF
return
[/code]
need to add:
X_Axis_Shift = (Xcomp(GaitStep))-128
Z_Axis_Shift = (Zcomp(GaitStep))-128
To the code in the [GAIT] section:
[code];[GAIT]
GaitCurrentLegNr var nib
Gait [GaitCurrentLegNr]
;Clear values under the cTravelDeadZone
IF (TravelRequest=0) THEN
TravelLengthX=0
TravelLengthZ=0
TravelRotationY=0
ELSE
BodyPosX = (X_Axis_Shift(GaitStep))-128
BodyPosZ = (Z_Axis_Shift(GaitStep))-128
ENDIF
;Leg middle up position[/code]
The bytetabe will then need to be configured so it shifts correctly for your quad…
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.