A leg mechanism (walking mechanism) is a mechanical system designed to provide a propulsive force by intermittent frictional contact with the ground. This is in contrast with wheels or continuous tracks which are intended to maintain continuous frictional contact with the ground. Mechanical legs are linkages that can have one or more actuators, and can perform simple planar or complex motion. Compared to a wheel, a leg mechanism is potentially better fitted to uneven terrain, as it can step over obstacles. 
An early design for a leg mechanism called the Plantigrade Machine by Pafnuty Chebyshev was shown at the Exposition Universelle (1878). The original engravings for this leg mechanism are available.  The design of the leg mechanism for the Ohio State Adaptive Suspension Vehicle (ASV) is presented in the 1988 book Machines that Walk.  In 1996, W-B. Shieh presented a design methodology for leg mechanisms. 
The artwork of Theo Jansen,  see Jansen's linkage, has been particularly inspiring for the design of leg mechanisms, as well as the Klann patent, which is the basis for the leg mechanism of the Mondo Spider.
- horizontal speed as constant as possible while touching the ground (support phase)  
- while the foot is not touching the ground, it should move as fast as possible
- constant torque/force input (or at least no extreme spikes/changes)
- stride height (enough for clearance, not too much to conserve energy)
- the foot has to touch the ground for at least half of the cycle for a two/four leg mechanism  or respectively, a third of the cycle for a three/six leg mechanism
- minimized moving mass
- vertical center of mass always inside the base of support 
- the speed of each leg or group of legs should be separately controllable for steering 
- the leg mechanism should allow forward and backward walking 
Another design goal can be, that stride height and length etc. can be controlled by the operator.  This can relatively easily be achieved with a hydraulic leg mechanism, but is not practicable with a crank-based leg mechanism. 
The optimization has to be done for the whole vehicle – ideally the force/torque variation during a rotation should cancel each other out. 
Patents for leg mechanism designs range from rotating cranks to four-bar and six-bar linkages.  See for example the following patents:
- U.S. Patent No. 469,169 Figure Toy, F. O. Norton (1892).
- U.S. Patent No. 1,146,700, Animated Toy, A. Gund (1915). A leg mechanism formed by an inverted slider-crank.
- U.S. Patent No. 1,363,460, Walking Toy, J. A. Ekelund (1920). A leg mechanism formed by a rotating crank with extensions that contact the ground.
- U.S. Patent No. 1,576,956, Quadruped Walking Mechanism, E. Dunshee (1926). A four-bar leg mechanism that shows the coupler curve forms the foot trajectory.
- U.S. Patent No. 1,803,197, Walking Toy, P. C. Marie (1931). Another rotating crank leg mechanism.
- U.S. Patent No. 1,819,029, Mechanical Toy Horse, J. St. C. King (1931). A crank-rocker leg mechanism with a one-way friction mechanisms in the foot.
- U.S. Patent No. 2,591,469, Animated Mechanical Toy, H. Saito (1952). An inverted slider crank mechanism for the front foot and crank-rocker for the back foot.
- U.S. Patent No. 4095661, Walking Work Vehicle, J. R. Sturges (1978). A lambda mechanism combined with a parallelogram linkage to form a translating leg that follows the coupler curve.
- U.S. Patent No. 6,260,862, Walking Device, J. C. Klann (2001). The coupler curve of a four-bar linkage guides the lower link of an RR serial chain to form a leg mechanism, known as the Klann linkage.
- U.S. Patent No. 6,481,513, Single Actuator per Leg Robotic Hexapod, M. Buehler et al. (2002). A leg mechanism that consists of a single rotating crank.
- U.S. Patent No. 6,488,560, Walking Apparatus, Y. Nishikawa (2002). Another rotating crank leg mechanism.
Eight-bar leg mechanism 
Tokyo Institute of Technology walking chair 
2 DOF pantograph leg mechanism 
2 DOF leg mechanism of the RPRPR type. 
Ghassaei Linkage 
Tchebyshevs plantigrade machine 
TrotBot Linkage (without heel linkage) 
TrotBot  Linkage Speed Variability as Ground Height Changes
Strider  Linkage Speed Variability as Ground Height Changes
Strider Linkage 
|*||4 legs||6 legs|
|Klann linkage 1|
|Klann linkage 2|
|Strider Linkage |
Shown above are only planar mechanisms, but there are also more complex mechanisms:
- Hexapod (robotics)
- Jansen's linkage
- Kinematic pairs
- Klann linkage
- Chebyshev's Lambda Mechanism
- Linkage (mechanical)
- Mobile robot
- Ghassaei, Amanda (20 April 2011). The Design and Optimization of a Crank-Based Leg Mechanism (PDF) (Thesis). Pomona College. Archived (PDF) from the original on 29 October 2013. Retrieved 27 July 2016.
- P. L. Tchebyshev. Plantigrade Machine Engraving. stored in the Musée des arts et métiers du Conservatoire national des arts et métiers Paris, France CNAM 10475-0000.
- S. M. Song and K. J. Waldron (November 1988). Machines that Walk: The Adaptive Suspension Vehicle. The MIT Press.
- W. B. Shieh (1996). Design and Optimization of Planar Leg Mechanisms Featuring Symmetrical Foot-Point Paths (Thesis). PhD Dissertation, The University of Maryland.
- Theo Jansen. Strangdbeest.
- Shigley, Joseph E. (September 1960). The Mechanics of Walking Vehicles: A Feasibility Study (PDF) (Report). University of Michigan Department of Mechanical Engineering. Archived (PDF) from the original on 4 March 2016. Retrieved 27 July 2016. Alt URL
- Giesbrecht, Daniel (8 April 2010). Design and optimization of a one-degree-of-freedom eight-bar leg mechanism for a walking machine (Thesis). University of Manitoba. hdl: 1993/3922.
- Uglow, Jenny (2002). The Lunar Men: Five Friends Whose Curiosity Changed the World. New York, New York: Farrar, Strauss and Giroux. ISBN 0-374-19440-8. Retrieved 27 July 2016.
- J. Michael McCarthy (March 2019). Kinematic Synthesis of Mechanisms: a project based approach. MDA Press.
- Simionescu, P.A.; Tempea, I. (20–24 June 1999). Kinematic and kinetostatic simulation of a leg mechanism (PDF). 10th World Congress on the Theory of Machines and Mechanisms. Oulu, Finland. pp. 572–577. Retrieved 27 July 2016.
- Funabashi, H.; Takeda, Y.; Kawabuchi, I.; Higuchi, M. (20–24 June 1999). Development of a walking chair with a self-attitude-adjusting mechanism for stable walking on uneven terrain. 10th World Congress on the Theory of Machines and Mechanisms. Oulu, Finland. pp. 1164–1169.
- Simionescu, P.A. (21–24 August 2016). MeKin2D: Suite for Planar Mechanism Kinematics (PDF). ASME 2016 Design Engineering Technical Conferences and Computers and Information in Engineering Conference. Charlotte, NC, USA. pp. 1–10. Retrieved 7 January 2017.
- Simionescu, P.A. (2014). Computer Aided Graphing and Simulation Tools for AutoCAD Users (1st ed.). Boca Raton, Florida: CRC Press. ISBN 978-1-4822-5290-3.
- Vagle, Wade. "TrotBot Linkage Plans". DIYwalkers.
- "Shigley's Study Applied". DIYwalkers.
- Vagle, Wade. "Strider Linkage Plans". DIYwalkers.
|Wikibooks has a book on the topic of: Comparison of crank based leg mechanism|
- Media related to Leg mechanism at Wikimedia Commons