Kinematics
Kinematics is the geometry of motion, without forces. Forward kinematics maps joint angles to the foot position. Inverse kinematics maps a foot position back to joint angles. The Jacobian links joint velocities to foot velocities. This page derives all three for the Strido leg, including its knee linkage.
In Strido
- Leg model:
packages/strido-core/src/strido/leg.py(foot_position,inverse_kinematics,calf_from_crank,crank_from_calf,transmission_angles), mirrored in C++ infirmware/strido_esp32s3/lib/strido_core/. - Dimensions:
hardware/kinematics.yaml(legs_linkage,legs_base), measured from the CAD. Limits:hardware/joint_limits.yaml. - Practical guide: Kinematics and gaits shows how the gait uses these functions.
The leg as a kinematic chain
Each leg has three revolute joints (leg.py docstring; the conventions match the Unitree Go2):
| Joint | Axis | Zero | Positive |
|---|---|---|---|
| hip | leg vertical | foot towards | |
| thigh | femur straight down | knee backwards | |
| calf | calf in line with femur | negative = knee bent |
From hardware/kinematics.yaml (front-left leg, rounded): the hip is at base_link, the leg plane sits
The thigh and calf move in a vertical leg plane. The hip joint tilts that plane about
Forward kinematics
In the leg plane, let
The angles add because
Next, the hip rotation. The foot in the hip frame, before abduction, is
This is foot_position line for line. For the frame conventions, see frames and rotations.
Inverse kinematics
We are given a foot target
Hip abduction
A rotation about
The foot is below the hip, so we take the negative root:
If the term under the root is not positive, the target lies inside the cylinder of radius
The planar two-link problem: law of cosines
Now set
There are two solutions,
The thigh angle is the direction to the foot minus the angle the calf adds inside the triangle:
The minus signs in the first term come from the "zero = straight down, positive = backwards" convention. Use atan2, never atan, so that the quadrant is correct.
The knee four-bar
The knee servo does not drive
Moving the thigh alone also moves the knee. crank_from_calf inverts this geometrically. The far end of the crank lies on a circle of radius circle_intersection returns None when the circles do not meet. That means the linkage cannot be assembled in that pose.
The Jacobian
The Jacobian maps joint rates to foot velocity,
The full
For the drive, the chain rule adds one more factor. The knee servo's rate is
Workspace and singularities
Ignoring joint limits, the planar foot reaches an annulus:
The joint limits and self-collisions cut this down. hardware/joint_limits.yaml limits
A singularity is a pose where
The four-bar has its own singularities. When the long link lines up with the crank or with the tibia crank (a transmission angle near transmission_angles measures both angles, and joint_limits.yaml requires at least transmission_min_deg).
Worked example: the stand pose
The stand pose puts each foot straight below its hip, stand_pose(height=0.17) in strido/gait.py). For the front-left leg,
Hip.
Knee. With
Thigh.
These match stand_pose(), which returns
Jacobian. At this pose,
A thigh rate of
Linkage. leg.py gives a crank angle of
Check yourself
- Why can the hip angle be solved before, and separately from, the thigh and knee?
- What does
mean physically? - At the stand pose, which joint mainly moves the foot forward, and which mainly moves it vertically?
- Why do the transmission angles matter even when
is far from zero?
Answers
- The hip axis is the
axis, and , never change the foot's distance from it. So depends only on the planar depth and the fixed offset . - The target is farther than
or closer than , so no triangle exists. - The thigh moves it forward and back (
, ). Only the knee column has a vertical component. - They describe the drive linkage, not the leg. Near
or the knee servo loses leverage and the crank–knee map becomes ill-conditioned, whatever the leg Jacobian says.
Further reading
- K. M. Lynch and F. C. Park, Modern Robotics, Cambridge University Press, 2017, ch. 4–6 (forward kinematics, velocity kinematics, inverse kinematics).
- B. Siciliano et al., Robotics: Modelling, Planning and Control, Springer, 2009, ch. 2–3.
- R. L. Norton, Design of Machinery, McGraw-Hill, ch. 4 (four-bar position analysis and transmission angle).
- Kinematics and gaits in this wiki.