For my robot I'm developing an Inverse Kinematics (IK) engine from scratch. The purpose of the IK engine is to convert actions and positions from coordinate systems which makes sense for the complete robot (and the operator) into angular movements of the leg servos (see
Wikipedia)
Although this is long since a 'solved' problem, it is nonetheless difficult to get right on an embedded platform because the equations are tough to solve symbolically or numerically. I'll be developing an approach where a workstation precomputes a number of tables which are downloaded with the robot firmware and then used by the robot in real time.
The first step is to get accurate positioning of a single leg. We wish to compute the three servo angles...
- theta S - Swing angle
- theta H - Hip angle
- theta K - Knee angle
... in terms of our input parameters:
- X - leg displacement forwards (horizontal)
- Y - leg displacement perpendicular to body (horizontal)
- Z - distance from hip to tip of foot (vertical)