Introducing the STALKER! (project ended)

no the processor doesnt reset. im having problems with the init pos at the moment. well if thats the prob.!! legs not correct at start up.
:cry:

SES tubing is:
11mm Inside Diam
1mm wall
14mm Outside Diam.

im using:
14mm ID
1mm wall
16mm OD

bit wider than needed but that all i cound find. i could have ses SES but i couldnt find a bending spring to fit!

The init position. Try limiting actions to a single leg (remove power) and see if it works correctly. also try obvious offsets, and see if the leg is positioned. these tests might tell you something.

I’ve heard that you can pack the tubing with sand, or freeze water in it, and then use a bending jig (between two radius pulleys). I’ve see that somewhere. Yeah, but it was just plans (sketches). I don’t have time to make one now!

Alan KM6VV

Hi innerbreed,

I just found out that there is a small error in the code I gave you. Apparently I miss a neg(-) sign in one of the equation.

[code]
OffsetCoxa = 90 - (any value, measured from x-axis, counter clockwise)

IKFeetPosX_NEW = IKFeetPosXCos(-OffsetCoxa) - IKFeetPosYSin(OffsetCoxa)
IKFeetPosY_NEW = IKFeetPosXSin(OffsetCoxa) + IKFeetPosYCos(OffsetCoxa)[/code]

Then, I found that I make another error on the OffsetCoxa direction when I did the IK. By reversing the equation; and here’s the code:

[code]
OffsetCoxa = (any value, measured from x-axis, counter clockwise) - 90

IKFeetPosX_NEW = IKFeetPosXCos(-OffsetCoxa) - IKFeetPosYSin(OffsetCoxa)
IKFeetPosY_NEW = IKFeetPosXSin(OffsetCoxa) + IKFeetPosYCos(OffsetCoxa)[/code]

You might want to try both. If it still doesn’t work, could you take a video of your bot doing some X, Y, Z movement?

To extend your battery life, you might want to try powering 1 leg for trouble-shooting. :wink:

Hi innerbreed,

Well, I think this problem is really easy to explain. I think this is caused by 2 different problems. To start you need to figure out where you want to put the tars in the init position. It’s done in this piece of code.

[code]'Feet Positions
RFPosX = 53 ;Start positions of the Right Front leg
RFPosY = 25
RFPosZ = -91

RRPosX = 53 ;Start positions of the Right Rear leg
RRPosY = 25
RRPosZ = 91

LFPosX = 53 ;Start positions of the Left Front leg
LFPosY = 25
LFPosZ = -91

LRPosX = 53 ;Start positions of the Left Rear leg
LRPosY = 25
LRPosZ = 91[/code]

The legs need to be in about 45 deg referring to the body and 90 deg referring to each other. To do this you want XXPosX = XXPosZ. Keep the +/- sign in place though.

The second thing is that do have one servo on a totally different position. Since the Coxa servo is in a angle of 45 deg you need to get the IK fixed for that.

I hope this helps.

Xan

Hi,

For the time I’m not very active into robotics lately, simply because I’m doing other outdoor projects with my house. Anyway, I’m gonna try help you when I find time for it.

First, have you implemented the code tnay have posted? My advice is not to do any changes to the code yet. Are you using the code you posted on page 10?
Exactly how or in what position did you calibrate the coxa servo as its 0 deg position?

[code];-----------------------------[BODY/LEG DIMENSIONS]
;Phoenix setup
;CoxaLength con 29 ;Length of the Coxa [mm]
;FemurLength con 76 ;Length of the Femur [mm]
;TibiaLength con 106 ;Lenght of the Tibia [mm]

;Stalker setup 124/106*100=# -100 =#%
CoxaLength con 55 ;Length of the Coxa [mm] 47.0% bigger
FemurLength con 96 ;Length of the Femur [mm] 26.3% bigger
TibiaLength con 140 ;Lenght of the Tibia [mm] 32.0% bigger
; These percentages show size difference to the Phoenix

CoxaAngle con 90 ;Default Coxa setup angle was 60

RFOffsetX con -60 ;Distance X from center of the body to the Right Front coxa
RFOffsetZ con -75 ;Distance Z from center of the body to the Right Front coxa

RROffsetX con -60 ;Distance X from center of the body to the Right Rear coxa
RROffsetZ con 75 ;Distance Z from center of the body to the Right Rear coxa

LFOffsetX con 60 ;Distance X from center of the body to the Left Front coxa
LFOffsetZ con -75 ;Distance Z from center of the body to the Left Front coxa

LROffsetX con 60 ;Distance X from center of the body to the Left Rear coxa
LROffsetZ con 75 ;Distance Z from center of the body to the Left Rear coxa
;--------------------------------------------------------------------
[/code]

At this moment we want the coxa to stay in the “0 deg” position. Try changing the CoxaAngle back to 60 deg

CoxaAngle con 60

The reason for why I’m asking you to do that is that the init position of the legs require a coxa offset of about 60 deg.

Let me know how that went :wink:

I didn’t see Xan’s post because I started writting my post before a meeting at work :laughing: .

So if you do both what I and Xan says it wont do any good. And as Xan mention the IK still needs to be solved. My only intention was to make the coxa stay in its 0 deg position.

I’ve not found time to make the rotation matrix code yet, but I’ll post the simplified formula once I got it ready.

Another thing, the femur and tibia servos must be calibrated relative to the tilted coxa joint not relative to the horisontal plane of the body. I think I mentioned before?

I tried to tell you not to use the little 28 gage wires and connectors to carry 6-8 amps. :unamused: Look, these are not my rules. They are standard logical practices established by Electrical Engineers decades ago. It’s no wonder your not getting reliable performance from the 1600mAh battery. Also the battery will become more efficient after it has been through several charge / discharge cycles. You should get well over 20 minutes use from the pack.

More accurately it’s this.

0.42" / 10.67mm ID
0.04" / 1.02mm wall
0.50" / 12.70mm OD

28 gage? :open_mouth:

That’s like trying to drink a shake using a coffee straw. :open_mouth: :laughing:

I havent had time to impliment the code yet. i will try and have a go tonight…Like this?

OffsetCoxa con 60  

add these too: or do i change all IKfeetPos# in the code to (_New)

IKFeetPosX_NEW var sword ;Input position of the Feet X IKFeetPosY_NEW var sword ;Input position of the Feet Y

what would be the right place for this?

IKFeetPosX_NEW = IKFeetPosX*Cos(-OffsetCoxa) - IKFeetPosY*Sin(OffsetCoxa) IKFeetPosY_NEW = IKFeetPosX*Sin(OffsetCoxa) + IKFeetPosY*Cos(OffsetCoxa)

is this all i need to change?

[code]LegIK [IKFeetPosX_NEW, IKFeetPosY_NEW, IKFeetPosZ]

IKFeetPosXZ = TOINT(FSQRT(TOFLOAT((IKFeetPosX_NEWIKFeetPosX_NEW)+(IKFeetPosZIKFeetPosZ)))) ;Input position of the Feet X/Y/Z

IKCF = FSQRT(TOFLOAT(((IKFeetPosXZ-CoxaLength)(IKFeetPosXZ-CoxaLength))+(IKFeetPosY_NEWIKFeetPosY_NEW)))

GOSUB GetBoogTan [IKFeetPosXZ-CoxaLength, IKFeetPosY_NEW]
IKA1 = BoogTan

IKA2 = FACOS((TOFLOAT((FemurLengthFemurLength) - (TibiaLengthTibiaLength)) + (IKCFIKCF)) / (TOFLOAT(2Femurlength) * IKCF))

;IKFemurAngle
IKFemurAngle = (TOINT(((IKA1 + IKA2) * 180.0) / 3.141592)*-1)+90

;IKTibiaAngle
IKTibiaAngle = (90-TOINT(((FACOS((TOFLOAT((FemurLengthFemurLength) + (TibiaLengthTibiaLength)) - (IKCFIKCF)) / TOFLOAT(2Femurlength*TibiaLength)))*180.0) / 3.141592)) * -1

;IKCoxaAngle
GOSUB GetBoogTan [IKFeetPosZ, IKFeetPosX_NEW]
IKCoxaAngle = TOINT((BoogTan*180.0) / 3.141592)

IF(IKCF < TOFLOAT(FemurLength+TibiaLength-30)) THEN
IKSolution = POSITIVE ;Output POSITIVE IF the solution is possible
ELSE
IF(IKCF < TOFLOAT(FemurLength+TibiaLength)) THEN
IKSolutionWarning = POSITIVE ;Output POSITIVE IF the solution is NEARLY possible
ELSE
IKSolutionError = POSITIVE ;Output POSITIVE IF the solution is NOT possible
ENDIF
ENDIF

return[/code]

Jim.
i will be ordering one of your packs jim. :wink:

Here is the code currently on the Atom:

[code]CoxaLength con 55 ;Length of the Coxa [mm]
FemurLength con 96 ;Length of the Femur [mm]
TibiaLength con 145 ;Lenght of the Tibia [mm]

CoxaAngle con 0

RFOffsetX con -60 ;Distance X from center of the body to the Right Front coxa
RFOffsetZ con -75 ;Distance Z from center of the body to the Right Front coxa

RROffsetX con -60 ;Distance X from center of the body to the Right Rear coxa
RROffsetZ con 75 ;Distance Z from center of the body to the Right Rear coxa

LFOffsetX con 60 ;Distance X from center of the body to the Left Front coxa
LFOffsetZ con -75 ;Distance Z from center of the body to the Left Front coxa

LROffsetX con 60 ;Distance X from center of the body to the Left Rear coxa
LROffsetZ con 75 ;Distance Z from center of the body to the Left Rear coxa[/code]

[code];The robot’s right front leg is (-,-) on the axis and it’s rear left leg is (+,+).
;Z-axis is front to back.
;X-axis is side to side.
;Y-axis is down (+) and up (-)

;Feet Positions in mm
RFPosX = 50 ;Start positions of the Right Front leg
RFPosY = 25
RFPosZ = -90

RRPosX = 50 ;Start positions of the Right Rear leg
RRPosY = 25
RRPosZ = 90

LFPosX = 50 ;Start positions of the Left Front leg
LFPosY = 25
LFPosZ = -90

LRPosX = 50 ;Start positions of the Left Rear leg
LRPosY = 25
LRPosZ = 90[/code]

regarding the XXPos# i think i must be measuring these wrong… i know you have been over this with me but i did what i was told. i still feel i must be doing something wrong. would it be ok to have a picture of were these measurements are from.

i have changed these numbers as you can see but it didnt really make much difference. maybe once i get a proper battery i can test it.

i think i know whats wrong but like i said ill need my new bat! :blush:

when i did the registers the coxa was at 0 and all legs pointed out 90º from each other. the femurs are horizontal and the tars are directly under the tibia servos.

i tested the registers before adding the botboard and they works fine and legs returned to the same position as i calabrated when turned off-on.

also i have reversed the direction of the servos accordingly as the servos are set up differently for that phoenix:

[code]ServoDriver:
;Front Right leg
serout SSC_OUTPUT,SSC_BAUD,"#",dec RFCoxaPin,“P”,dec TOINT(TOFLOAT(-RFCoxaAngle +90)/0.10588238)+650]
serout SSC_OUTPUT,SSC_BAUD,"#",dec RFFemurPin,“P”,dec TOINT(TOFLOAT(RFFemurAngle+90)/0.10588238)+650]
serout SSC_OUTPUT,SSC_BAUD,"#",dec RFTibiaPin,“P”,dec TOINT(TOFLOAT(-RFTibiaAngle+90)/0.10588238)+650]

;Rear Right leg
serout SSC_OUTPUT,SSC_BAUD,"#",dec RRCoxaPin,“P”,dec TOINT(TOFLOAT(-RRCoxaAngle +90)/0.10588238)+650]
serout SSC_OUTPUT,SSC_BAUD,"#",dec RRFemurPin,“P”,dec TOINT(TOFLOAT(RRFemurAngle+90)/0.10588238)+650]
serout SSC_OUTPUT,SSC_BAUD,"#",dec RRTibiaPin,“P”,dec TOINT(TOFLOAT(-RRTibiaAngle+90)/0.10588238)+650]

;Front Left leg
serout SSC_OUTPUT,SSC_BAUD,"#",dec LFCoxaPin,“P”,dec TOINT(TOFLOAT(LFCoxaAngle +90)/0.10588238)+650]
serout SSC_OUTPUT,SSC_BAUD,"#",dec LFFemurPin,“P”,dec TOINT(TOFLOAT(-LFFemurAngle+90)/0.10588238)+650]
serout SSC_OUTPUT,SSC_BAUD,"#",dec LFTibiaPin,“P”,dec TOINT(TOFLOAT(LFTibiaAngle+90)/0.10588238)+650]

;Rear Left leg
serout SSC_OUTPUT,SSC_BAUD,"#",dec LRCoxaPin,“P”,dec TOINT(TOFLOAT(LRCoxaAngle +90)/0.10588238)+650]
serout SSC_OUTPUT,SSC_BAUD,"#",dec LRFemurPin,“P”,dec TOINT(TOFLOAT(-LRFemurAngle+90)/0.10588238)+650]
serout SSC_OUTPUT,SSC_BAUD,"#",dec LRTibiaPin,“P”,dec TOINT(TOFLOAT(LRTibiaAngle+90)/0.10588238)+650]
[/code]
:confused:

understood, i think i now know what i was doing wrong. :wink: :blush:

IK Tests:

youtube.com/watch?v=1Um7Uw27jLc
youtube.com/watch?v=k2SdzSOUifk

Nice Moves!

When will you take the first tentative steps?

Alan KM6VV

there will be a few more tweaks to the code yet. i will be pulling in the tibia’s so they are not stretch out so far, to try and save the stress on the servos.

once the Tilted coxa ik arrangement has been worked on i will upload its first steps. :stuck_out_tongue:

thanks alan for your comment.
its been ages since i started this project so its kinda nice im at this stage.

there is credit due for technical support on this project and i will make sure its mentioned in the next vid.

Wow, excellent work! The proportional of the leg to body length really make it an outstanding quad. The servos look strong. HS-645?

Yeah, you are right, definitely need to move in those legs. Seems like the IK transformation I give you is not working right :unamused: Sorry about that.

yes 645’s.
i havent yet implimaented the snippet of code you gave me. i had been modiflying the current code for hour just to get it to this stage, so i followed it with a quick vid.

i shall be adding it soon and i will let you know how that goes.
Like this?

OffsetCoxa con 60   

add these too: or do i change all IKfeetPos# in the code to (_New)

IKFeetPosX_NEW var sword ;Input position of the Feet X IKFeetPosY_NEW var sword ;Input position of the Feet Y

what would be the right place for this?

IKFeetPosX_NEW = IKFeetPosX*Cos(-OffsetCoxa) - IKFeetPosY*Sin(OffsetCoxa) IKFeetPosY_NEW = IKFeetPosX*Sin(OffsetCoxa) + IKFeetPosY*Cos(OffsetCoxa)

is this all i need to change?

[code] LegIK [IKFeetPosX_NEW, IKFeetPosY_NEW, IKFeetPosZ]

IKFeetPosXZ = TOINT(FSQRT(TOFLOAT((IKFeetPosX_NEWIKFeetPosX_NEW)+(IKFeetPosZIKFeetPosZ)))) ;Input position of the Feet X/Y/Z

IKCF = FSQRT(TOFLOAT(((IKFeetPosXZ-CoxaLength)(IKFeetPosXZ-CoxaLength))+(IKFeetPosY_NEWIKFeetPosY_NEW)))

GOSUB GetBoogTan [IKFeetPosXZ-CoxaLength, IKFeetPosY_NEW]
IKA1 = BoogTan

IKA2 = FACOS((TOFLOAT((FemurLengthFemurLength) - (TibiaLengthTibiaLength)) + (IKCFIKCF)) / (TOFLOAT(2Femurlength) * IKCF))

;IKFemurAngle
IKFemurAngle = (TOINT(((IKA1 + IKA2) * 180.0) / 3.141592)*-1)+90

;IKTibiaAngle
IKTibiaAngle = (90-TOINT(((FACOS((TOFLOAT((FemurLengthFemurLength) + (TibiaLengthTibiaLength)) - (IKCFIKCF)) / TOFLOAT(2Femurlength*TibiaLength)))*180.0) / 3.141592)) * -1

;IKCoxaAngle
GOSUB GetBoogTan [IKFeetPosZ, IKFeetPosX_NEW]
IKCoxaAngle = TOINT((BoogTan*180.0) / 3.141592)

IF(IKCF < TOFLOAT(FemurLength+TibiaLength-30)) THEN
IKSolution = POSITIVE ;Output POSITIVE IF the solution is possible
ELSE
IF(IKCF < TOFLOAT(FemurLength+TibiaLength)) THEN
IKSolutionWarning = POSITIVE ;Output POSITIVE IF the solution is NEARLY possible
ELSE
IKSolutionError = POSITIVE ;Output POSITIVE IF the solution is NOT possible
ENDIF
ENDIF

return [/code]

ok an update on pics and new legs positions standing under its own weight.

Old legs pos:
http://i531.photobucket.com/albums/dd355/innerbreed/100_1159.jpghttp://i531.photobucket.com/albums/dd355/innerbreed/100_1163.jpg

New leg pos:
http://i531.photobucket.com/albums/dd355/innerbreed/100_1166.jpghttp://i531.photobucket.com/albums/dd355/innerbreed/100_1164.jpg

Changing the legs so that the tars are closer into the body gives the
robot more room for movement when performing body moves.

http://i531.photobucket.com/albums/dd355/innerbreed/100_1165.jpg

Amazing. I like the close-up view. The amount of SES you used there, give the bot a real solid and techy look.

Your battery seems out of place, though I can see your effort of trying to hide it in the pictures :laughing: What is the blue box wrapped in red, on both of your rear legs?

I just completed assemblied my phoenix legs into my quad, not as impressive though :frowning:

I’ll be out of town for the next 2 weeks, have to put my quad project on hold.

I will counter check the code later when I have time, but it should be correct. Without having the same board and prototype, it’s difficult to check and debugged the code. Try running it on 1 leg, and we’ll see what’s wrong with it (if any) and troubleshoot together. :wink:

Thanks. :wink:

the battery actually pops under the body but as i was busy i quickly put
it on the leg as you mentioned for a quick snap.

on the rear legs are the 9v batterys used to control the electronics.
there are battery clips holding them inplace, although in the picture
you can see one of them has slipped. i will tighten this up and take
a close up picture soon.

shame you were not happy with your build. i went though many
different designs for leg/body so i know how you feel.

your efforts will be rewarded in the end… :wink:

YEAH! Happy to see you’re quad standing on his own! Great pics! 8)

Are you still planning on the vacuum formed parts? You could add a body part over the electronics tower and let it move with the servo. Should look cool!

Keep up the good work!

Xan