yep, it doesn’t really shake, the body is shifting in circles while standing still. It should be shifting in circles only while gaiting
Humm. i have looked right through my post to look for inspiration on this problem as i remember i was faced with the same thing but to sort it i placed the command lines for the Z/X shift in the GaitSeq as we have done.
looking at this a bit closer i have noticed that in my code im using the line:
GaitInMotion
GaitInMotion = ((ABS(TravelLengthX)>cTravelDeadZone) | (ABS(TravelLengthZ)>cTravelDeadZone) | (ABS(TravelRotationY)>cTravelDeadZone) )
Yours uses:
**TravelRequest **
TravelRequest = ((ABS(TravelLengthX)>cTravelDeadZone) | (ABS(TravelLengthZ)>cTravelDeadZone) | (ABS(TravelRotationY)>cTravelDeadZone) )
But these are both doing the same thing. Im not completely sure as to why its not working…
Kurt:
could binary mode be effecting this? Im all out!!
I strongly doubt it as it sounds like you have some movement. Usually if the problem is that the robot code is trying to do binary mode and the SSC-32 does not support it, nothing happens…
The two lines are setting two different variables, so you may want to see how those variables are used in the two different versions of the code.
Kurt
Thanks Kurt.
PermaFrost can you post {Use Attachments}the original code (all of it) you are using that works for you. The one you had working “before i got involved” lol
ill then try working from the ground up with that…
I dont have a ABB2 etc or your bot so you’ll have to do the testing.
Can you also post a link to the original code you downloaded before you changed the cfg file.
Humm, did you say you even tried using “my” code from my thread? and you say your getting the same problem…?
Something not right here…
These are the codes im using. About the part where im using your code, i only copied the “4dofhex_v20” file from this link lynxmotion.net/download/file.php?id=877 and pasted it over my core code, i thought that its not working because its only a part of the program so i tried configuring your entire code to try and use it but there are some variables im not sure what value to set for them.
Phoenix_Driver_SSC32.bas (9.41 KB)
Phoenix_Core.bas (41.4 KB)
Phoenix_Control_ps2.bas (13.1 KB)
Phoenix_Config_3DOFTHex.bas (8.96 KB)
Wrong placement.
try this:
[code];[GAIT Sequence]
GaitSeq
;Check IF the Gait is in motion
TravelRequest = ((ABS(TravelLengthX)>cTravelDeadZone) | (ABS(TravelLengthZ)>cTravelDeadZone) | (ABS(TravelRotationY)>cTravelDeadZone) )
BodyPosX = (X_Axis_Shift(GaitStep))-128
BodyPosZ = (Z_Axis_Shift(GaitStep))-128
IF NrLiftedPos = 5 THEN
LiftDivFactor = 4
ELSE
LiftDivFactor = 2
ENDIF
;Calculate Gait sequence
LastLeg = 0
for LegIndex = 0 to 5 ; for all legs
if LegIndex = 5 then ; last leg
LastLeg = 1
endif
GOSUB Gait [LegIndex]
next ; next leg
return[/code]
unfortunately No luck
Could someone tell me what is wrong with this code ?
IF DualShock(5) <> 128 | DualShock(6) <> 128 THEN
BodyPosX = (X_Axis_Shift(GaitStep))-128
BodyPosZ = (Z_Axis_Shift(GaitStep))-128
ENDIF
At the line where the “IF” starts, there is an error saying " Error: [TOKEN (] : Unexpected token type ". The brackets seem to be fine.
Hi,
I believe one solution is something like this:
[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]
I’ve not compiled this, but it should work I think.
Yep, now it looks like its working properly, i only need to set the appropriate values now … and replace that servo that snapped and broke >.> ( it happened a while ago when i tried fixing the code ). Thank you everyone for your time and valuable help, i’ll post a video as soon as i get the robot to gait properly
Thanks zenta. strange how it works for me (original configuration) but not for Permafrost’s code. who cares! 'it works!
Now the fun can start.
Looking forward to see it working in your video.
making the steps as wide as you can will allow for a a better smoother gait.
to achieve this i Toggle Double gait travel length
in your code this can be activated by pressing R2 in walk mode
;Double Travel Length
IF (DualShock(2).bit1 = 0) and LastButton(1).bit1 THEN ;R2 Button test
sound cSpeakerPin, [50\4000]
DoubleTravelOn = DoubleTravelOn^1
ENDIF
i added this function to the Walk pos command so DoubleTravelOn is on as soon as the robot is ready to walk.
IF (DualShock(2).bit4 = 0) and LastButton(1).bit4 THEN ;Triangle Button test
IF (BodyYOffset>0) THEN
BodyYOffset = 0
ELSE
BodyYOffset = 35 ;SET TO 75 IN MY CODE
DoubleTravelOn = DoubleTravelOn^1
ENDIF
ENDIF
Hello everyone, im back again. yea i know i kind of deserted the robot for a while ( 2 months exactly ) but now im back . Picking up from where we left, I needed to experiment with the values in this table :
; (RF) (LR) LF) (RR)
; (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 80,90,100,110,120,130,140,150,151,152,153,152,151,150,145,140,132,125,115, 100, 90, 80, 78, 79, 80,
; (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 80,90,100,110,120,130,140,150,151,152,153,152,151,150,145,140,132,125,115, 100, 90, 80, 78, 79, 80,
until the robot is balanced while gaiting.
When i was trying out values, a question crossed my mind, “What are these values exactly ?” are they the displacement from the center in (mm) ? or some unit used in calculations of the program ?. If i know what these values are exactly, i can pin point how much is the displacement needed for the robot to balance without the need of trial and error.
Thanks for the help :slight_smile:
There will be others here that will know far more about the in’s and out’s of the computer world.
and please correct me if i am wrong.
The Byte-table program requires a set of values 0 to 255. or ±127
In computer systems a byte is a binary unit of measurement made of bits
The easiest way to understand bits is to compare them to something like digits or number value.
A digit is a single place that can hold numerical values between 0 to 255.
By placing these values along the XYZ axis 'we can give the center point of the body a coordinate using these values.
I see, so im actually specifying the position of the center not the displacement from it ?. if the center is at 128, does that mean 158 is 30mm away from it ?
I think the actual measured distance is something unique to each setup. Body size, leg lengths, will all play a factor in what distance is achieved from these values.
With this you could experiment with the values, and write down the measurements along side the input value.
This would give you a really nice chart to work from.
So you could just say 'ok I need to move the body another 10mm, then by looking at your chart you can see what value is required.
hmm, i probably need a new design for my robot to solve a couple of problems:
-
I need to reduce the weight of the robot. it can stand up and do push ups but it crumbles when gaiting. since most of the weight is in the central body, i’ll try to make one with more holes/less material instead of the “full plate” one that i have.
-
There is too much space between the coxa joint and the central body, this space makes the legs bend a little when standing up. Im gonna need to reduce that space as much as possible.
Im also thinking about changing the position of the servos that rotate the legs upside down. At the moment they’re in the central body, if i moved them to any point in the leg after the coxa, i can reduce the size of the center body. later on today, if im done with all my homework, i’ll make an autocad drawing of the new center body and post it here.
That’s it for now, im open for design tips and suggestions
Yes those improvements sound good. Although I’m not sure I’ve seen your robot yet. A cad design would be very nice. Look forward to it.
Here we go:
truploader.com/uploads/11_15_2012/416866Chromiumv2.png
Upper left is the Bottom Plate, i poked as many holes as i can without making it too thin.
Upper right corner is the Top Plate: I think i can poke more holes in that one but im keeping it like this for now, the vertical line in the middle is to hold the receiver on the top, planning to use plastic straps to hold it.
Bottom left is whats inside the robot: Red is for the brackets, they hold the hip servos and the 2 plates apart, green is the circuits, Blue is the battery.
Bottom right is the thickness, the 2 green boxes are the circuits and the yellow bars are the spacers, the blue one is the battery.
I will cut these parts as soon as i get the brackets i will order, Im open for tips and suggestions .
Thanks everyone :slight_smile:
Edit: Here is the body im already using:
truploader.com/uploads/11_16_2012/618513chromiumold.png
Left is bottom, right is top. The new one is smaller and more light weight.
So, I’ve been thinking for a while now about the location of the servo that rotates the legs upside down, and i cant seem to find a place for it without making it a weak point ( a point where the legs bend when applied pressure to ). With the servo erector set i can build a pretty nice and rigid limbs for the robot, but when i try to put a 4th servo anywhere after the coxa, i cant make it as good as the 3DOF limbs. Has anyone made a 4DOF robot that rotate its legs upside?, i could get an idea on how he/she made the leg work.
Can you provide an image / drawing of how you want to configure the 4DoF leg?