Inverse kinematics

Last updated
Forward vs. inverse kinematics FWDvsINV Kinematics HighResTransp.png
Forward vs. inverse kinematics

In computer animation and robotics, inverse kinematics is the mathematical process of calculating the variable joint parameters needed to place the end of a kinematic chain, such as a robot manipulator or animation character's skeleton, in a given position and orientation relative to the start of the chain. Given joint parameters, the position and orientation of the chain's end, e.g. the hand of the character or robot, can typically be calculated directly using multiple applications of trigonometric formulas, a process known as forward kinematics. However, the reverse operation is, in general, much more challenging. [1] [2] [3]

Contents

Inverse kinematics is also used to recover the movements of an object in the world from some other data, such as a film of those movements, or a film of the world as seen by a camera which is itself making those movements. This occurs, for example, where a human actor's filmed movements are to be duplicated by an animated character.

Robotics

In robotics, inverse kinematics makes use of the kinematics equations to determine the joint parameters that provide a desired configuration (position and rotation) for each of the robot's end-effectors. [4] This is important because robot tasks are performed with the end effectors, while control effort applies to the joints. Determining the movement of a robot so that its end-effectors move from an initial configuration to a desired configuration is known as motion planning. Inverse kinematics transforms the motion plan into joint actuator trajectories for the robot. [2] Similar formulas determine the positions of the skeleton of an animated character that is to move in a particular way in a film, or of a vehicle such as a car or boat containing the camera which is shooting a scene of a film. Once a vehicle's motions are known, they can be used to determine the constantly-changing viewpoint for computer-generated imagery of objects in the landscape such as buildings, so that these objects change in perspective while themselves not appearing to move as the vehicle-borne camera goes past them.

The movement of a kinematic chain, whether it is a robot or an animated character, is modeled by the kinematics equations of the chain. These equations define the configuration of the chain in terms of its joint parameters. Forward kinematics uses the joint parameters to compute the configuration of the chain, and inverse kinematics reverses this calculation to determine the joint parameters that achieve a desired configuration. [5] [6] [7]

Kinematic analysis

A model of the human skeleton as a kinematic chain allows positioning using inverse kinematics. Modele cinematique corps humain.svg
A model of the human skeleton as a kinematic chain allows positioning using inverse kinematics.

Kinematic analysis is one of the first steps in the design of most industrial robots. Kinematic analysis allows the designer to obtain information on the position of each component within the mechanical system. This information is necessary for subsequent dynamic analysis along with control paths.

Inverse kinematics is an example of the kinematic analysis of a constrained system of rigid bodies, or kinematic chain. The kinematic equations of a robot can be used to define the loop equations of a complex articulated system. These loop equations are non-linear constraints on the configuration parameters of the system. The independent parameters in these equations are known as the degrees of freedom of the system.

While analytical solutions to the inverse kinematics problem exist for a wide range of kinematic chains, computer modeling and animation tools often use Newton's method to solve the non-linear kinematics equations. [2] When trying to find an analytical solution it is often convenient exploit the geometry of the system and decompose it using subproblems with known solutions. [8] [9]

Other applications of inverse kinematic algorithms include interactive manipulation, animation control and collision avoidance.

Inverse kinematics and 3D animation

Inverse kinematics is important to game programming and 3D animation, where it is used to connect game characters physically to the world, such as feet landing firmly on top of terrain (see [10] for a comprehensive survey on Inverse Kinematics Techniques in Computer Graphics).

An animated figure is modeled with a skeleton of rigid segments connected with joints, called a kinematic chain. The kinematics equations of the figure define the relationship between the joint angles of the figure and its pose or configuration. The forward kinematic animation problem uses the kinematics equations to determine the pose given the joint angles. The inverse kinematics problem computes the joint angles for a desired pose of the figure.

It is often easier for computer-based designers, artists, and animators to define the spatial configuration of an assembly or figure by moving parts, or arms and legs, rather than directly manipulating joint angles. Therefore, inverse kinematics is used in computer-aided design systems to animate assemblies and by computer-based artists and animators to position figures and characters.

The assembly is modeled as rigid links connected by joints that are defined as mates, or geometric constraints. Movement of one element requires the computation of the joint angles for the other elements to maintain the joint constraints. For example, inverse kinematics allows an artist to move the hand of a 3D human model to a desired position and orientation and have an algorithm select the proper angles of the wrist, elbow, and shoulder joints. Successful implementation of computer animation usually also requires that the figure move within reasonable anthropomorphic limits.

A method of comparing both forward and inverse kinematics for the animation of a character can be defined by the advantages inherent to each. For instance, blocking animation where large motion arcs are used is often more advantageous in forward kinematics. However, more delicate animation and positioning of the target end-effector in relation to other models might be easier using inverted kinematics. Modern digital creation packages (DCC) offer methods to apply both forward and inverse kinematics to models.

Analytical solutions to inverse kinematics

In some, but not all cases, there exist analytical solutions to inverse kinematic problems. One such example is for a 6-DoF robot (for example, 6 revolute joints) moving in 3D space (with 3 position degrees of freedom, and 3 rotational degrees of freedom). If the degrees of freedom of the robot exceeds the degrees of freedom of the end-effector, for example with a 7 DoF robot with 7 revolute joints, then there exist infinitely many solutions to the IK problem, and an analytical solution does not exist. Further extending this example, it is possible to fix one joint and analytically solve for the other joints, but perhaps a better solution is offered by numerical methods (next section), which can instead optimize a solution given additional preferences (costs in an optimization problem).

An analytic solution to an inverse kinematics problem is a closed-form expression that takes the end-effector pose as input and gives joint positions as output, . Analytical inverse kinematics solvers can be significantly faster than numerical solvers and provide more than one solution, but only a finite number of solutions, for a given end-effector pose.

Many different software products (Such as FOSS programs IKFast and Inverse Kinematics Library) are able to solve these problems quickly and efficiently using different algorithms such as the FABRIK solver. One issue with these solvers, is that they are known to not necessarily give locally smooth solutions between two adjacent configurations, which can cause instability if iterative solutions to inverse kinematics are required, such as if the IK is solved inside a high-rate control loop.

Numerical solutions to IK problems

There are many methods of modelling and solving inverse kinematics problems. The most flexible of these methods typically rely on iterative optimization to seek out an approximate solution, due to the difficulty of inverting the forward kinematics equation and the possibility of an empty solution space. The core idea behind several of these methods is to model the forward kinematics equation using a Taylor series expansion, which can be simpler to invert and solve than the original system.

The Jacobian inverse technique

The Jacobian inverse technique is a simple yet effective way of implementing inverse kinematics. Let there be variables that govern the forward-kinematics equation, i.e. the position function. These variables may be joint angles, lengths, or other arbitrary real values. If, for example, the IK system lives in a 3-dimensional space, the position function can be viewed as a mapping . Let give the initial position of the system, and

be the goal position of the system. The Jacobian inverse technique iteratively computes an estimate of that minimizes the error given by .

For small -vectors, the series expansion of the position function gives

,

where is the (3 × m) Jacobian matrix of the position function at .

The (i, k)-th entry of the Jacobian matrix can be approximated numerically

,

where gives the i-th component of the position function, is simply with a small delta added to its k-th component, and is a reasonably small positive value.

Taking the Moore–Penrose pseudoinverse of the Jacobian (computable using a singular value decomposition) and re-arranging terms results in

,

where .

Applying the inverse Jacobian method once will result in a very rough estimate of the desired -vector. A line search should be used to scale this to an acceptable value. The estimate for can be improved via the following algorithm (known as the Newton–Raphson method):

Once some -vector has caused the error to drop close to zero, the algorithm should terminate. Existing methods based on the Hessian matrix of the system have been reported to converge to desired values using fewer iterations, though, in some cases more computational resources.

Heuristic methods

The inverse kinematics problem can also be approximated using heuristic methods. These methods perform simple, iterative operations to gradually lead to an approximation of the solution. The heuristic algorithms have low computational cost (return the final pose very quickly), and usually support joint constraints. The most popular heuristic algorithms are cyclic coordinate descent (CCD) [11] and forward and backward reaching inverse kinematics (FABRIK). [12]

See also

Related Research Articles

In numerical analysis, the condition number of a function measures how much the output value of the function can change for a small change in the input argument. This is used to measure how sensitive a function is to changes or errors in the input, and how much error in the output results from an error in the input. Very frequently, one is solving the inverse problem: given one is solving for x, and thus the condition number of the (local) inverse must be used. In linear regression the condition number of the moment matrix can be used as a diagnostic for multicollinearity.

Kinematics is a subfield of physics, developed in classical mechanics, that describes the motion of points, bodies (objects), and systems of bodies without considering the forces that cause them to move. Kinematics, as a field of study, is often referred to as the "geometry of motion" and is occasionally seen as a branch of mathematics. A kinematics problem begins by describing the geometry of the system and declaring the initial conditions of any known values of position, velocity and/or acceleration of points within the system. Then, using arguments from geometry, the position, velocity and acceleration of any unknown parts of the system can be determined. The study of how forces act on bodies falls within kinetics, not kinematics. For further details, see analytical dynamics.

In power engineering, the power-flow study, or load-flow study, is a numerical analysis of the flow of electric power in an interconnected system. A power-flow study usually uses simplified notations such as a one-line diagram and per-unit system, and focuses on various aspects of AC power parameters, such as voltages, voltage angles, real power and reactive power. It analyzes the power systems in normal steady-state operation.

<span class="mw-page-title-main">Optical flow</span> Pattern of motion in a visual scene due to relative motion of the observer

Optical flow or optic flow is the pattern of apparent motion of objects, surfaces, and edges in a visual scene caused by the relative motion between an observer and a scene. Optical flow can also be defined as the distribution of apparent velocities of movement of brightness pattern in an image.

In mathematics and computing, the Levenberg–Marquardt algorithm, also known as the damped least-squares (DLS) method, is used to solve non-linear least squares problems. These minimization problems arise especially in least squares curve fitting. The LMA interpolates between the Gauss–Newton algorithm (GNA) and the method of gradient descent. The LMA is more robust than the GNA, which means that in many cases it finds a solution even if it starts very far off the final minimum. For well-behaved functions and reasonable starting parameters, the LMA tends to be slower than the GNA. LMA can also be viewed as Gauss–Newton using a trust region approach.

<span class="mw-page-title-main">Gauss–Newton algorithm</span> Mathematical algorithm

The Gauss–Newton algorithm is used to solve non-linear least squares problems, which is equivalent to minimizing a sum of squared function values. It is an extension of Newton's method for finding a minimum of a non-linear function. Since a sum of squares must be nonnegative, the algorithm can be viewed as using Newton's method to iteratively approximate zeroes of the components of the sum, and thus minimizing the sum. In this sense, the algorithm is also an effective method for solving overdetermined systems of equations. It has the advantage that second derivatives, which can be challenging to compute, are not required.

<span class="mw-page-title-main">Robot kinematics</span> Geometric analysis of multi-DoF kinematic chains that model a robot

In robotics, robot kinematics applies geometry to the study of the movement of multi-degree of freedom kinematic chains that form the structure of robotic systems. The emphasis on geometry means that the links of the robot are modeled as rigid bodies and its joints are assumed to provide pure rotation or translation.

<span class="mw-page-title-main">Linkage (mechanical)</span> Assembly of systems connected to manage forces and movement

A mechanical linkage is an assembly of systems connected to manage forces and movement. The movement of a body, or link, is studied using geometry so the link is considered to be rigid. The connections between links are modeled as providing ideal movement, pure rotation or sliding for example, and are called joints. A linkage modeled as a network of rigid links and ideal joints is called a kinematic chain.

Inverse dynamics is an inverse problem. It commonly refers to either inverse rigid body dynamics or inverse structural dynamics. Inverse rigid-body dynamics is a method for computing forces and/or moments of force (torques) based on the kinematics (motion) of a body and the body's inertial properties. Typically it uses link-segment models to represent the mechanical behaviour of interconnected segments, such as the limbs of humans or animals or the joint extensions of robots, where given the kinematics of the various parts, inverse dynamics derives the minimum forces and moments responsible for the individual movements. In practice, inverse dynamics computes these internal moments and forces from measurements of the motion of limbs and external forces such as ground reaction forces, under a special set of assumptions.

Quasi-Newton methods are methods used to either find zeroes or local maxima and minima of functions, as an alternative to Newton's method. They can be used if the Jacobian or Hessian is unavailable or is too expensive to compute at every iteration. The "full" Newton's method requires the Jacobian in order to search for zeros, or the Hessian for finding extrema.

Multibody system is the study of the dynamic behavior of interconnected rigid or flexible bodies, each of which may undergo large translational and rotational displacements.

<span class="mw-page-title-main">Forward kinematics</span> Computing a robots end-effector position from joint values and kinematic equations

In robot kinematics, forward kinematics refers to the use of the kinematic equations of a robot to compute the position of the end-effector from specified values for the joint parameters.

In computational chemistry, a constraint algorithm is a method for satisfying the Newtonian motion of a rigid body which consists of mass points. A restraint algorithm is used to ensure that the distance between mass points is maintained. The general steps involved are: (i) choose novel unconstrained coordinates, (ii) introduce explicit constraint forces, (iii) minimize constraint forces implicitly by the technique of Lagrange multipliers or projection methods.

<span class="mw-page-title-main">Kinematic chain</span> Mathematical model for a mechanical system

In mechanical engineering, a kinematic chain is an assembly of rigid bodies connected by joints to provide constrained motion that is the mathematical model for a mechanical system. As the word chain suggests, the rigid bodies, or links, are constrained by their connections to other links. An example is the simple open chain formed by links connected in series, like the usual chain, which is the kinematic model for a typical robot manipulator.

Numerical continuation is a method of computing approximate solutions of a system of parameterized nonlinear equations,

Non-linear least squares is the form of least squares analysis used to fit a set of m observations with a model that is non-linear in n unknown parameters (m ≥ n). It is used in some forms of nonlinear regression. The basis of the method is to approximate the model by a linear one and to refine the parameters by successive iterations. There are many similarities to linear least squares, but also some significant differences. In economic theory, the non-linear least squares method is applied in (i) the probit regression, (ii) threshold regression, (iii) smooth regression, (iv) logistic link regression, (v) Box–Cox transformed regressors ().

Kinematics equations are the constraint equations of a mechanical system such as a robot manipulator that define how input movement at one or more joints specifies the configuration of the device, in order to achieve a task position or end-effector location. Kinematics equations are used to analyze and design articulated systems ranging from four-bar linkages to serial and parallel robots.

<span class="mw-page-title-main">Linear seismic inversion</span> Interpretation of seismic data using linear model

Inverse modeling is a mathematical technique where the objective is to determine the physical properties of the subsurface of an earth region that has produced a given seismogram. Cooke and Schneider (1983) defined it as calculation of the earth's structure and physical parameters from some set of observed seismic data. The underlying assumption in this method is that the collected seismic data are from an earth structure that matches the cross-section computed from the inversion algorithm. Some common earth properties that are inverted for include acoustic velocity, formation and fluid densities, acoustic impedance, Poisson's ratio, formation compressibility, shear rigidity, porosity, and fluid saturation.

The product of exponentials (POE) method is a robotics convention for mapping the links of a spatial kinematic chain. It is an alternative to Denavit–Hartenberg parameterization. While the latter method uses the minimal number of parameters to represent joint motions, the former method has a number of advantages: uniform treatment of prismatic and revolute joints, definition of only two reference frames, and an easy geometric interpretation from the use of screw axes for each joint.

Powell's dog leg method, also called Powell's hybrid method, is an iterative optimisation algorithm for the solution of non-linear least squares problems, introduced in 1970 by Michael J. D. Powell. Similarly to the Levenberg–Marquardt algorithm, it combines the Gauss–Newton algorithm with gradient descent, but it uses an explicit trust region. At each iteration, if the step from the Gauss–Newton algorithm is within the trust region, it is used to update the current solution. If not, the algorithm searches for the minimum of the objective function along the steepest descent direction, known as Cauchy point. If the Cauchy point is outside of the trust region, it is truncated to the boundary of the latter and it is taken as the new solution. If the Cauchy point is inside the trust region, the new solution is taken at the intersection between the trust region boundary and the line joining the Cauchy point and the Gauss-Newton step.

References

  1. Donald L. Pieper, The kinematics of manipulators under computer control. PhD thesis, Stanford University, Department of Mechanical Engineering, October 24, 1968.
  2. 1 2 3 Lynch, Kevin M.; Park, Frank C. (2017-05-25). Modern Robotics. Cambridge University Press. ISBN   978-1-107-15630-2.
  3. Siciliano, Bruno; Khatib, Oussama (2016-06-27). Springer Handbook of Robotics. Springer International Publishing. ISBN   978-3-319-32550-7.
  4. Paul, Richard (1981). Robot manipulators: mathematics, programming, and control : the computer control of robot manipulators. MIT Press, Cambridge, MA. ISBN   978-0-262-16082-7.
  5. J. M. McCarthy, 1990, Introduction to Theoretical Kinematics, MIT Press, Cambridge, MA.
  6. J. J. Uicker, G. R. Pennock, and J. E. Shigley, 2003, Theory of Machines and Mechanisms, Oxford University Press, New York.
  7. J. M. McCarthy and G. S. Soh, 2010, Geometric Design of Linkages, Springer, New York.
  8. Paden, Bradley Evan (1985-01-01). Kinematics and Control of Robot Manipulators (Thesis). Bibcode:1985PhDT........94P.
  9. Murray, Richard M.; Li, Zexiang; Sastry, S. Shankar; Sastry, S. Shankara (1994-03-22). A Mathematical Introduction to Robotic Manipulation. CRC Press. ISBN   978-0-8493-7981-9.
  10. A. Aristidou, J. Lasenby, Y. Chrysanthou, A. Shamir. Inverse Kinematics Techniques in Computer Graphics: A Survey. Computer Graphics Forum, 37(6): 35-58, 2018.
  11. D. G. Luenberger. 1989. Linear and Nonlinear Programming. Addison Wesley.
  12. A. Aristidou, and J. Lasenby. 2011. FABRIK: A fast, iterative solver for the inverse kinematics problem. Graph. Models 73, 5, 243–260.