Little Cat 4 X 4DOF Quadruped

would i be right in thinking this is how you would be expecting it to walk.

i changed the rotation servo to HipRotateAngle)/0.10588238)+650] so it would just hold its center place. another way would have been HipRotateAngle=1500].
the main part was also to change IKHipRotateAngle to just HipRotateAngle. it was giving me some funny positions that why i did this. i ended up not using these servos anyway now 'so the work on that part ended early.
Trial and error i say. :wink:

Maybe you’re right. I’d seen that 'bot, I remember the big round feet. Not a bad idea.

3DOF legs, kinda like mine, only shorter, and of course no roll servos. Could be a place to start.

Did you see the two other quads in that You-Tube strip? I think you’ve got them beat.

Thanks!

Alan KM6VV

So you’re not using either hip or ankle servos then? I’m fixing my yaw servos angles.

Alan KM6VV

im not using hip rotate (coxa).
what you see here is what is running.
Thats 4 dof per leg.
http://i531.photobucket.com/albums/dd355/innerbreed/100_2189.jpg

OK, you’ve got ankle, reverse knee, horz hip and roll (hip rotate).
I’ve got knee, horz hip, vert hip and roll . Not a 1:1 mapping.

But you’re walking without the hip rotate, which is not the same as the vert hip, right?

Looks like the servo pin mappings don’t match much!

  RRCoxaPin 	con P0	;Rear Right leg Hip Horizontal
  RRFemurPin 	con P1	;Rear Right leg Hip Vertical
  RRTibiaPin  	con P2	;Rear Right leg Knee
  RRRollPin		con P3	;Rear Right leg Hip

  RRHipSwayPin    con P20     ;Rear Right Hip Side Vertical
  RRHipRotatePin  con P21	;Rear Right Hip Horizontal
  RRHipZPin 	        con P22	;Rear Right Hip Vertical
  RRKneeZPin  	con P23	;Rear Right Knee
  RRTarPin           con P24     ;Rear Right Tarsal 

Alan kM6VV

hip vert works on the Z axis, moving the leg out to the side. (used for Side Stepping)
hiprotate works by rotating the leg around its Y axis, (used for rotating the leg)

From top to bottom:

RRCoxaPin con P0 ;Rear Right leg Hip Horizontal RRRollPin con P1 ;Rear Right leg Hip RRFemurPin con P2 ;Rear Right leg Hip Vertical RRTibiaPin con P3 ;Rear Right leg Knee

Campared to mine. (i have added the pins that correspond to your arrangement).

[code] RRHipRotatePin con P0 ;Rear Right Hip Horizontal (Coxa)
RRHipSwayPin con P1 ;Rear Right Hip Side Vertical (Roll)
RRHipZPin con P2 ;Rear Right Hip Vertical (Femur)
RRKneeZPin con P23 ;Rear Right Knee (Tibia)

RRTarPin con P24 ;Rear Right Tarsal (N/A)[/code]

I’m still seeing some discrepancies, or I’m not understanding.

 RRCoxaPin 	con P0	;Rear Right leg Hip Horizontal  OK
 RRFemurPin 	con P1	;Rear Right leg Hip Vertical  
 RRTibiaPin  	con P2	;Rear Right leg Knee
 RRRollPin	con	P3	        ;Rear Right leg Hip (roll)

You seem to say your “sway” is the same as my “roll”?

My knee shifts to P23?

Guess I’m dense today.

Alan KM6VV

Sticking to the original pin names may have been a good idea. when naming each servo i have started at the top of the bot. so from your description it shows the roll servo on the end of the foot! just a different way of working. no prob.

Here i was defining what names i have used, and the order they appear (top to bottom)
i use sway as it was the corresponding servo that makes the body sway either side. or shift… or roll

-------My names---------description----------(Your Names)
RRHipRotatePin = Rear Right Hip Horizontal (Coxa)
RRHipSwayPin =Rear Right Hip Side Vertical (Roll)
RRHipZPin = Rear Right Hip Vertical (Femur)
RRKneeZPin = Rear Right Knee (Tibia)

i was pointing out that if you connect your servos up in the same order (Top to bottom) and define your pin numbers then it would save this confusion. :confused:

once connected up and working then you could change the context if you wish. :wink:

lets just stick to the code as it is. :unamused: :wink:

i have been thinking about your IK… could you take a picture of it in its neutral pos?

Yeah, I didn’t want to change the names in your code. What else have you changed in the program? Did you have to change the IK? Seems like my “triangles” weren’t anything like the 3DOF of a hexapod. I attempted to use “Beyond Compare 2” to spot the changes you made to the program, but alas, everything came up as changed!

I think the two “hip verticals” was throwing me.

A simple #ifdef will take care of a new set of pin # to use for my case.

I can pose my little cat, and get some new pix. Your quad.jpg CAD drawing does a pretty good job of showing the SES parts of the lower leg, but it would be helpful if it showed a slightly “downward looking” view, so that the details of the “sway” and “hip vertical” servo details.

I wonder if we’re using crossed-coordinate systems? I’m thinking Z is the vertical axis, I forgot that old CH3 and Phoenix code made Y the vertical. I’ll bet that’s adding to my confusion! Your three lower servos are in a horizontal (X Y, in CAD/Engineering parlance) plane. You don’t have a “hip vertical” (yaw) servo in your 100-2192 quad pix. I see four (4) servos! I do see your “sway” (my roll) servo.

Alan KM6VV

yes im using the old Y as vertical.

as for the IK i cannot remember all i changed but i did change the LegIk sub to this.

[code];-------------------[LEG INVERSE KINEMATICS]
;Calculates the angles of the KneeZ and HipZ for the given position of the feet
LegIK [IKFeetPosX, IKFeetPosY, IKFeetPosZ]

;Length between the HipRotate and Feet
IKFeetPosXZ = TOINT(FSQRT(TOFLOAT((IKFeetPosX*IKFeetPosX)+(IKFeetPosZ*IKFeetPosZ))))

;IKSW - Length between HipZ and Tar
IKSW = FSQRT(TOFLOAT(((IKFeetPosXZ-HipRotateLength)*(IKFeetPosXZ-HipRotateLength))+(IKFeetPosY*IKFeetPosY)))		

;IKA1 - Angle between HipZ and Tar line and the ground in rad
GOSUB GetBoogTan [IKFeetPosXZ-HipRotateLength, IKFeetPosY]
IKA1 = BoogTan

;IKA2 - ?
IKA2 = FACOS((TOFLOAT((HipZLength*HipZLength) - (KneeZLength*KneeZLength)) + (IKSW*IKSW)) / (TOFLOAT(2*HipZlength) * IKSW))

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

;IKKneeZAngle
IKKneeZAngle = (90-TOINT(((FACOS((TOFLOAT((HipZLength*HipZLength) + (KneeZLength*KneeZLength)) - (IKSW*IKSW)) / TOFLOAT(2*HipZlength*KneeZLength)))*180.0) / 3.141592)) * -1

;IKTarAngle
IKTarAngle = IKHipZAngle - IKKneeZAngle     ;Calculates the Tarsals rotation relative to the Hip/Knee

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

;IKHipSwayAngle
GOSUB GetBoogTan [IKFeetPosZ, IKFeetPosX]
IKHipSwayAngle = TOINT((BoogTan*180.0) / 3.141592)
	
;Set the Solution quality	
IF(IKSW < TOFLOAT(HipZLength+KneeZLength-30)) THEN
	IKSolution = TRUE
ELSE
	IF(IKSW < TOFLOAT(HipZLength+KneeZLength)) THEN
		IKSolutionWarning = TRUE
	ELSE
		IKSolutionError = TRUE	
	ENDIF
ENDIF		

return [/code]
original hexapod:

[code];[LEG INVERSE KINEMATICS] Calculates the angles of the knee and HipV for the given position of the feet

LegIK [IKFeetPosX, IKFeetPosY, IKFeetPosZ]

IKFeetPosXZ = TOINT(FSQRT(TOFLOAT((IKFeetPosX*IKFeetPosX)+(IKFeetPosZ*IKFeetPosZ))))

IKSW = FSQRT(TOFLOAT(((IKFeetPosXZ-HipHLength)*(IKFeetPosXZ-HipHLength))+(IKFeetPosY*IKFeetPosY)))
	
GOSUB GetBoogTan [IKFeetPosXZ-HipHLength, IKFeetPosY]
IKA1 = BoogTan

IKA2 = FACOS((TOFLOAT((HipVLength*HipVLength) - (kneeLength*kneeLength)) + (IKSW*IKSW)) / (TOFLOAT(2*HipVlength) * IKSW))


IKHipVAngle = (TOINT(((IKA1 + IKA2) * 180.0) / 3.141592)*-1)+90
IKkneeAngle = (90-TOINT(((FACOS((TOFLOAT((HipVLength*HipVLength) + (kneeLength*kneeLength)) - (IKSW*IKSW)) / TOFLOAT(2*HipVlength*kneeLength)))*180.0) / 3.141592)) * -1
GOSUB GetBoogTan [IKFeetPosZ, IKFeetPosX]
IKHipHAngle = TOINT((BoogTan*180.0) / 3.141592)

IKkneeAngle = IKkneeAngle - IKHipVAngle
		
IF(IKSW < TOFLOAT(HipVLength+kneeLength-30)) THEN
	IKSolution = 1
ELSE
	IF(IKSW < TOFLOAT(HipVLength+kneeLength)) THEN
		IKSolutionWarning = 1
	ELSE
		IKSolutionError = 1	
	ENDIF
ENDIF		

return[/code]

i define the Sway servo as vertical as that’s its lineal plain. this servo is hidden inside the body. can be seen here.
the only downward view i have at hand is this:
http://i531.photobucket.com/albums/dd355/innerbreed/quadtop.jpg
or
http://i531.photobucket.com/albums/dd355/innerbreed/100_2029.jpg

This new CAD drawing must not be of the 'quad I’m looking at:

http://i531.photobucket.com/albums/dd355/innerbreed/100_2192.jpg
Jonny’s Wolf

Oh wait. In this view, the 'bot is looking to the LEFT. As is your previous CAD drawing. Got it. Sway = Roll.

The sway drives a yaw (hip vertical) servo in the CAD drawing?

Nope. I’m not seeing that servo in quad pix on the grass (100_2192). That’s the servo you removed?

I found the foot (tar) code. Clever!

Here’s a view of my leg bent:
http://www.marconettengineering.com/New4DOF_Leg2.jpg
http://www.marconettengineering.com/Old4DOF_Leg4.jpg
Little Cat leg bent

Alan KM6VV

I really like this design. I think it would look really good if you added round disk for the feet like in that example video and you can even attach toes to the disk like the star wars land walkers had. :smiley:

I found another little joystick that I think could be used for a foot. this one has a knob built-in. It can also be ordered with a microswitch that is actuated when the button is pushed (force unknown yet). A joystick could also give direction-of-contact readings.

p3america.com/pp/802.htm

http://www.marconettengineering.com/Joystick_802.jpg

A C&K Micro-Mini Push Button CKN4039-ND might also work:

And requires a very small force to actuate (5oz). A knob is available, however I’d machine a hemisphere like the first PB for it.

These switches would be very short.

Alan KM6VV

unfortunately the JStick would make the IK slightly off. although saying that you could implement code to read the values from it and correct the IK, but i would have thought the reaction of this would make more problems in the IKfunction i dont know. might be worth looking into. 8)

ok… i have highlighted the servos you question here.
RED is were the Sway servos are located.
BLUE is the Coxa servos that i have removed!
http://i531.photobucket.com/albums/dd355/innerbreed/100_2091-1.jpg

Hope this is clear. :wink:

I can see it now.

OK, coxa servos are removed, or just turned off? (don’t mean to picky)

Yeah, you’d have to add about 3/4" (maybe less) to the length of the tibia if you add a switch. And to use the info, we’ll have to figure out what to do with it! But it would immediately add a complaint foot, something I want to explore. Probably easier then finding a ball joint (from a scrapped joystick, which is what brought be back around to using a joystick foot).

I think they’d make a nice looking foot!

Alan KM6VV

yes i would agree. i did actually “try” the idea of using Jstick pots when we were discussing ball joint feet. i was looking about for the best one and even if i could strip out the mechanics to make the ball joint as i intended.
yes its worth exploring.

I got the samples, but never made them up to my aluminum plate legs. However these legs have a simple L bracket on the end (remove the flange and aluminum tube), so it might be easier to mate up a 1" x 1" (possibly smaller) compliant foot.

The joint is what I want, everything else is a plus.

Alan KM6VV