Calculating points on an arc (Quad Gait Related)

this seems like the best spot to put this thread…

I am working on a quadruped gait and I have a question that I’m hoping someone will be able to help out with.

Due to the nature of my quad, the usual kinematic driven gait will not work for me. I am using IK to convert my desired leg end values to servo positions fine, but for the actual walk I need more.

Essentially, I need to calculate a “path” that the legs must stay on. while it is on this path, it will do its walk…lift one leg, move other three forward, lift next leg…etc.

due to my limited DOF’s, I guess the best way to picture this would be the way a 4 wheel steer car would drive. I have an arc center point set somewhere out in space, and the inside wheels follow one arc, and the outside wheels follow a parallel arc.

To increase the radius of the turn I just need to move the point further from the body, and to decrease radius, move the point closer.

although none of that really matters as far as my question is concerned…

How do I calculate X & Y values for an arc? I don’t need EVERY point, maybe every 5mm or so. I am programming in C# but I can adapt whatever comes up to work. I know it can take a lot of processing power but I am doing this calculation on my PC, just sending servo positions to the bot so it should be no problem.

Any insight into how I would go about this would be greatly appreciated.

I have attached a little graphic to help illustrate with the center point slid to a couple different spots.

http://img.photobucket.com/albums/v146/gscustoms/ARCPOINTS.jpg

You don’t say how many DOFs you have! I’m guessing 2DOF, which would give you the tank-like steering you describe.

This is the same thing as calculating a arc tool path in CNC.

You’re basically solving a series of small triangles. I rotate a “vector” through the angles of the desired arc (start location to end location) given the radius, and solve for the X and Y coordinates in my Cartesian plane. then I move from my “current” X,Y to the “next” X,Y. That gives you a single arc. I believe you have to do that twice, one for each wheel (leg?) radius. Then you have two short line segments (old X,Y to new X,Y) one for each “track”. so the two legs on one side of the body move a slightly different distance then the legs on the other side of the body.

Alan KM6VV

It has 9 DOF, 2 per leg, and a twist in the body.

What you suggest should work good, it is a bit like tank steer, although I will also be able to strafe as well as turn(not at the same time though).

Thanks

Yes, that’s exactly what I was describing, tank steer. I did wind up mixing metaphors, between tank treads and wheels, but I think you get the picture.

I am still a bit undecided as to whether a 2DOF leg can actually perform any translation (strafing) operations. Turning, surely.

Alan KM6VV

Here is a really quick sketch of my plan. The legs have to move in a certain position in order for it to balance on 3 legs, so esentially each leg “swing” will be broken up into sections. I do have some freedom in the range of each leg (hatched area of image).

so I have a straight walk, a strafe, and a curve. Obviously my turning radius, as well as strafe angle will have to be adjusted to maintain balance, but it looks do-able.

http://img.photobucket.com/albums/v146/gscustoms/walking.jpg

The third sketch certainly looks like a translation (strafe). But I also see what looks like a “knee” joint that you are bending. You said 2DOF, right? Then how do you lift (vertical coxa joint) the leg?

Or maybe we should be calling it the shoulder instead of coxa, considering that this is a quadruped.

I don’t see any body twisting going on, so that’s not it.

Alan KM6VV

alan it might be of interest to you when discribing quad gait regarding this one (and well i might add :wink: ) if you had all the info.

he is using (per leg) two horizontal servos, and a center servo to act as the vertical, but also in a horizontal nature. aAnd not the conventional "one H and one V!

do you think Translation can be done with his conguration??

its this one i believe:
http://img.photobucket.com/albums/v146/gscustoms/bot2.jpg

gscustoms, great design i might add… :wink:

Yes, very interesting design, once I recall seeing it again. And with fully sprawled legs, and a body twist, you have in essence added a “pseudo” DOF to each leg. And indeed, you have the freedom to bend the leg, and effect a translation.

Good ketch Jonny!

What I am seeing is a very wide stance, due to the sprawled legs. I found (Creepy Hybrid) that when a leg was lifted, the remaining three legs that form a tripod of support shift laterally a considerable distance, and my 'bot would tip over. My legs were initially sprawled. My solution was to point my two (only!) front legs forward, rather then at radial angles.

I suggest you draw the triangles of support and calculate the COGs. If the COG lies outside of the support triangle, then you fall down! (If the 'quad were running, then perhaps it can “fly” through the unstable COG locations, and spend the majority of time with the COG inside the support triangle (tripods).

The body twist is there, but I’m not seeing how that would help the COG problem.

Alan KM6VV

not mine, its gscustoms.

No, but you brought up PIX of his 'bot, and pointed out the body twist servo.

And yes, great design GS! (Customs).

Alan KM6VV