Is there a general way to convert rotational energy from a gear or something into lateral motion toward or away from the gear? I could use a piston type construction, but I only want the lateral motion to be in effect when the rotation just begins.
For instance I have a motor that turns 180 degrees each direction at an equal time interval. When it is rotating clockwise, I need a "foot" on the end to move toward the pivot by about 1/4 the total length of the leg (about 4 centimeters) and stay there until the counterclockwise motion begins.
When rotating counter clockwise, foot is extended.
When rotating clockwise, foot is drawn in.
Edit:
Here is a drawing. It may not be any help at all, but I will try to explain it as best I can with this.
In figure one the leg is at it's full extension forward and placed on the ground.
In figure two the leg pivots backward to push the body forward. this happens when anything walks.
Figure three is where I'm having the problem: the foot needs to lift off the ground so it can begin it's forward motion to take another step.
In figure four, the foot is at full forward extension and is ready to be put back on the ground for the second step, which is continued back at step 1, 2, 3, 4 and repeat repeat ect.
any living thing that walks follows these steps in order to move. I would like to replicate it in my robot.
NOTE; I have not drawn any of the leg, since the solution to this problem will likely determine what it looks like. sorry if this doesn't help at all, but I think it must be required for there to be an image for this site or something like that. :)
I have considered both the answers for a similar question on robotics stack exchange, and most of them will not work because they require continuous motion whereas I only have 180* cycles. The accepted answer ended up not working because it interfered with the foot design needing to move straight up and down and because there was no-way to stiffen the gears of the mechanism reasonably without creating too much strain for the motor when it reached full extension.
Another idea I've fiddled with is an equal gear ratio essentially always keeping the foot level and being triggered by extraneous motion upon the top gear, but it failed for the same reasons as above.