Misplaced Pages

Inverse kinematics: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 21:02, 9 February 2014 edit145.53.180.22 (talk)No edit summary← Previous edit Revision as of 06:49, 27 March 2014 edit undo220 of Borg (talk | contribs)Extended confirmed users, Pending changes reviewers, Rollbackers43,622 edits Undid revision 594723297 by 145.53.180.22 (talk) rvt unexplained deletionNext edit →
Line 2: Line 2:
]. Inverse kinematics computes the joint trajectories needed for the robot to guide the welding tip along the part.]] ]. Inverse kinematics computes the joint trajectories needed for the robot to guide the welding tip along the part.]]
] ]
'''Inverse kinematics''' refers to the use of the ] equations of a ] to determine the joint parameters that provide a desired position of the ].<ref>{{cite book '''Inverse kinematics''' refers to the use of the ] equations of a robot to determine the joint parameters that provide a desired position of the ].<ref>{{cite book
| last = Paul | last = Paul
| first = Richard | first = Richard
| title = Robot manipulators: mathematics, programming, and control : the computer control of robot manipulators | title = Robot manipulators: mathematics, programming, and control : the computer control of robot manipulators
| publisher = MIT Press, Cambridge, MA | publisher = MIT Press, Cambridge, MA
| date = 1981 | date = 1981
| url = http://books.google.com/?id=UzZ3LAYqvRkC&printsec=frontcover#v=onepage&q&f=false | url = http://books.google.com/?id=UzZ3LAYqvRkC&printsec=frontcover#v=onepage&q&f=false
| isbn =978-0-262-16082-7 | isbn =978-0-262-16082-7
}} }}
</ref> Specification of the movement of a robot so that its end-effector achieves a desired task is known as ]. Inverse kinematics transforms the motion plan into joint ] trajectories for the robot.
</ref>


The movement of a ] 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. ] uses the joint parameters to compute the configuration of the chain, and inverse kinematics reverses this calculation to determine the joint parameters that achieves a desired configuration.<ref> J. M. McCarthy, 1990, ''Introduction to Theoretical Kinematics,'' MIT Press, Cambridge, MA.</ref><ref name=Uicker2003>J. J. Uicker, G. R. Pennock, and J. E. Shigley, 2003, '''Theory of Machines and Mechanisms,''' Oxford University Press, New York.</ref><ref name=McCarthy2010>J. M. McCarthy and G. S. Soh, 2010, Springer, New York.</ref>
Specification of the movement of a robot so that its end-effector achieves a desired task is known as ]. Inverse kinematics transforms the motion plan into joint ] trajectories for the robot.


For example, inverse kinematics formulas allow calculation of the joint parameters that position a ] arm to pick up a part. Similar formulas determine the positions of the skeleton of an ] that is to move in a particular way.
The movement of a ] 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. ] uses the joint parameters to compute the configuration of the chain, and inverse kinematics reverses this calculation to determine the joint parameters that achieves a desired configuration.<ref> J. M. McCarthy, 1990, ''Introduction to Theoretical Kinematics,'' MIT Press, Cambridge, MA.</ref><ref name=Uicker2003>J. J. Uicker, G. R. Pennock, and J. E. Shigley, 2003, 'Theory of Machines and Mechanisms', Oxford University Press, New York.</ref><ref name=McCarthy2010>J. M. McCarthy and G. S. Soh, 2010, Springer, New York.</ref>

For example, inverse kinematics formulas allow calculation of the joint parameters that position a robot arm to pick up a part. Similar formulas determine the positions of the skeleton of an ] that is to move in a particular way.


<!--This is a discussion that seems out of place: Solving these problems is usually more involved than simply moving an object from one location to another. Typically, it requires the ] and ] of a series of interconnected objects while observing limitations to the range of motions that are physically possible&mdash;A robot might damage itself if mechanical limitations are disregarded; An animation looks unrealistic if a character's hand moves through their own body to pick up an object located behind their back.-->
==Kinematic analysis== ==Kinematic analysis==
<!--{{See|Physics|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. 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 ] 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 ] of the system. Inverse kinematics is an example of the kinematic analysis of a constrained system of rigid bodies, or ]. The ] 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 ] 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 ] to solve the non-linear kinematics equations. While analytical solutions to the inverse kinematics problem exist for a wide range of kinematic chains, computer modeling and animation tools often use ] to solve the non-linear kinematics equations.
Line 32: Line 33:
Inverse kinematics is important to ] and ], where it is used to connect ] physically to the world, such as feet landing firmly on top of terrain. Inverse kinematics is important to ] and ], where it is used to connect ] physically to the world, such as feet landing firmly on top of terrain.


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 ] 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. An animated figure is modeled with a skeleton of rigid segments connected with joints, called a ]. The kinematics equations of the figure define the relationship between the joint angles of the figure and its pose or configuration. The ] 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. 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 ]. 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 ] usually also requires that the figure move within reasonable ] limits. 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 ] usually also requires that the figure move within reasonable ] limits.
<!-- this section was rewritten above: ==Robotics and 3D animation==
{{See|Robotics|Computer animation}}
Inverse kinematics is the process of determining the parameters of a ] flexible object (a ]) in order to achieve a desired pose. Inverse kinematics is a type of ]. Inverse kinematics are also relevant to ] and ], where a common use is making sure ] connect physically to the world, such as feet landing firmly on top of terrain.

Inverse kinematics is that branch of robotics which deals with the study and application of the process of determining the parameters of a flexible object in order to achieve a desired pose.

An articulated figure consists of a set of rigid segments connected with joints. Varying angles of the joints yields an indefinite number of configurations. The solution to the ] problem, given these angles, is the pose of the figure. The solution to the more difficult ''inverse kinematics problem'' is to find the joint angles given the desired configuration of the figure (i.e., ]). In the general case there is no analytic solution for the inverse kinematics problem. However, inverse kinematics may be solved via ] techniques. Certain special kinematic chains&mdash;those with a ]&mdash;permit ]. This treats the ]'s orientation and position independently and permits an efficient ].

Inverse kinematics is a tool utilized frequently by 3D artists. It is often easier for an artist to express the desired spatial appearance rather than manipulate joint angles directly. 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.

For example, when one wants to reach for a door handle, their ] must make the necessary ]s to position his limbs and torso such that the hand locates near the door. The main objective is to move the hand but the many complex articulations of several joints must occur to get the hand to the desired location. Similarly with many ] applications, inverse kinematic ] calculations must be performed to articulate limbs in the correct ways to meet desired goals. One example where inverse kinematic calculations are often essential is ], where an operator wants to position a ] using a robot arm but certainly does not want to manipulate each robot joint individually. Other applications include ] where animators may want to operate a computer generated character, but find it impossibly difficult to animate individual joints. The solution is to model the virtual joints of the puppet and allow the animator to move the hands, feet and torso, and the computer automatically generates the required limb positions to accomplish this using inverse kinematics.

Key to the successful implementation of inverse kinematics is ] within constraints: computer characters' limbs must behave within reasonable ] limits. Similarly, robotic devices have physical constraints such as the environment they operate in, the limitations of the articulations their joints are capable of, and the finite physical loads and speeds at which they are able to operate.

The ] open-source program can solve for the complete analytical solutions of most common robot manipulators and generate C++ code for them. The generated solvers cover most degenerate cases and can finish in microseconds on recent computers.

Other applications of inverse kinematic algorithms include ], ] and ].
-->


== Approximating solutions to IK systems == == Approximating solutions to IK systems ==

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


=== The Jacobian inverse technique === === The Jacobian inverse technique ===

The ] inverse technique is a simple yet effective way of implementing inverse kinematics. Let there be <math>m</math> 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 the IK system lives in a 3-dimensional space, the position function can be viewed as a mapping <math>p(\hat{x}): \Re^m \rightarrow \Re^3</math>. Let <math>p(\hat{x_0})</math> give the initial position of the system, and <math>p(\hat{x_0} + \sigma)</math> be the goal position of the system. The Jacobian inverse technique simply attempts to generate iteratively improved estimates of <math>\sigma</math> to minimize the error given by <math>||p(\hat{x_0} + \sigma) - p(\hat{x_0})||</math>. Each one of the intermediate estimates can be added to <math>\hat{x_0}</math> and evaluated by the position function to ] the system. The ] inverse technique is a simple yet effective way of implementing inverse kinematics. Let there be <math>m</math> 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 the IK system lives in a 3-dimensional space, the position function can be viewed as a mapping <math>p(\hat{x}): \Re^m \rightarrow \Re^3</math>. Let <math>p(\hat{x_0})</math> give the initial position of the system, and <math>p(\hat{x_0} + \sigma)</math> be the goal position of the system. The Jacobian inverse technique simply attempts to generate iteratively improved estimates of <math>\sigma</math> to minimize the error given by <math>||p(\hat{x_0} + \sigma) - p(\hat{x_0})||</math>. Each one of the intermediate estimates can be added to <math>\hat{x_0}</math> and evaluated by the position function to ] the system.


For small <math>\sigma</math>-vectors, the series expansion of the position function gives: For small <math>\sigma</math>-vectors, the series expansion of the position function gives:


<math>p(\hat{x_0} + \sigma) \approx p(\hat{x_0}) + J_p(\hat{x_0})\sigma</math> <math>p(\hat{x_0} + \sigma) \approx p(\hat{x_0}) + J_p(\hat{x_0})\sigma</math>


Where <math>J_p(\hat{x_0})</math> is the (3 x m) Jacobian matrix of the position function at <math>\hat{x_0}</math>. Where <math>J_p(\hat{x_0})</math> is the (3 x m) ] matrix of the position function at <math>\hat{x_0}</math>.


Note that the (i, k)-th entry of the Jacobian matrix can be determined numerically: Note that the (i, k)-th entry of the Jacobian matrix can be determined numerically:


<math>\frac{\partial p_i}{\partial x_k} \approx \frac{p_i(x_{0,k} + h) - p_i(\hat{x_0})}{h}</math> <math>\frac{\partial p_i}{\partial x_k} \approx \frac{p_i(x_{0,k} + h) - p_i(\hat{x_0})}{h}</math>
Line 56: Line 77:
Where <math>p_i(\hat{x})</math> gives the i-th component of the position function, <math>x_{0,k} + h</math> is simply <math>\hat{x_0}</math> with a small delta added to its k-th component, and <math>h</math> is a reasonably small positive value. Where <math>p_i(\hat{x})</math> gives the i-th component of the position function, <math>x_{0,k} + h</math> is simply <math>\hat{x_0}</math> with a small delta added to its k-th component, and <math>h</math> is a reasonably small positive value.


Taking the ] of the Jacobian and re-arranging terms results in: Taking the ] of the Jacobian and re-arranging terms results in:


<math>\sigma \approx J_p^+(\hat{x_0})\delta p</math> <math>\sigma \approx J_p^+(\hat{x_0})\delta p</math>
Line 73: Line 94:
*] *]
*] *]
*]
*]
*]
*] *]
*]
*]
*] *]
*] *]
Line 80: Line 104:
*] *]
*] *]
*]
</div> </div>



Revision as of 06:49, 27 March 2014

File:Arc-welding.jpg
An industrial robot performing arc welding. Inverse kinematics computes the joint trajectories needed for the robot to guide the welding tip along the part.
A model of the human skeleton as a kinematic chain allows positioning using inverse kinematics.

Inverse kinematics refers to the use of the kinematics equations of a robot to determine the joint parameters that provide a desired position of the end-effector. Specification of the movement of a robot so that its end-effector achieves a desired task is known as motion planning. Inverse kinematics transforms the motion plan into joint actuator trajectories for the robot.

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 achieves a desired configuration.

For example, inverse kinematics formulas allow calculation of the joint parameters that position a robot arm to pick up a part. Similar formulas determine the positions of the skeleton of an animated character that is to move in a particular way.

Kinematic analysis

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.

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

Inverse kinematics and 3D animation

Further information: Robotics and Computer 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.

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.

Approximating solutions to IK systems

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 m {\displaystyle m} 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 the IK system lives in a 3-dimensional space, the position function can be viewed as a mapping p ( x ^ ) : m 3 {\displaystyle p({\hat {x}}):\Re ^{m}\rightarrow \Re ^{3}} . Let p ( x 0 ^ ) {\displaystyle p({\hat {x_{0}}})} give the initial position of the system, and p ( x 0 ^ + σ ) {\displaystyle p({\hat {x_{0}}}+\sigma )} be the goal position of the system. The Jacobian inverse technique simply attempts to generate iteratively improved estimates of σ {\displaystyle \sigma } to minimize the error given by | | p ( x 0 ^ + σ ) p ( x 0 ^ ) | | {\displaystyle ||p({\hat {x_{0}}}+\sigma )-p({\hat {x_{0}}})||} . Each one of the intermediate estimates can be added to x 0 ^ {\displaystyle {\hat {x_{0}}}} and evaluated by the position function to animate the system.

For small σ {\displaystyle \sigma } -vectors, the series expansion of the position function gives:

p ( x 0 ^ + σ ) p ( x 0 ^ ) + J p ( x 0 ^ ) σ {\displaystyle p({\hat {x_{0}}}+\sigma )\approx p({\hat {x_{0}}})+J_{p}({\hat {x_{0}}})\sigma }

Where J p ( x 0 ^ ) {\displaystyle J_{p}({\hat {x_{0}}})} is the (3 x m) Jacobian matrix of the position function at x 0 ^ {\displaystyle {\hat {x_{0}}}} .

Note that the (i, k)-th entry of the Jacobian matrix can be determined numerically:

p i x k p i ( x 0 , k + h ) p i ( x 0 ^ ) h {\displaystyle {\frac {\partial p_{i}}{\partial x_{k}}}\approx {\frac {p_{i}(x_{0,k}+h)-p_{i}({\hat {x_{0}}})}{h}}}

Where p i ( x ^ ) {\displaystyle p_{i}({\hat {x}})} gives the i-th component of the position function, x 0 , k + h {\displaystyle x_{0,k}+h} is simply x 0 ^ {\displaystyle {\hat {x_{0}}}} with a small delta added to its k-th component, and h {\displaystyle h} is a reasonably small positive value.

Taking the Moore-Penrose pseudoinverse of the Jacobian and re-arranging terms results in:

σ J p + ( x 0 ^ ) δ p {\displaystyle \sigma \approx J_{p}^{+}({\hat {x_{0}}})\delta p}

Where δ p = p ( x 0 ^ + σ ) p ( x 0 ^ ) {\displaystyle \delta p=p({\hat {x_{0}}}+\sigma )-p({\hat {x_{0}}})} . It is possible to use a singular value decomposition to obtain the pseudo-inverse of the Jacobian.

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

σ k + 1 = J p + ( x k ^ ) δ p k {\displaystyle \sigma _{k+1}=J_{p}^{+}({\hat {x_{k}}})\delta p_{k}}

Once some σ {\displaystyle \sigma } -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 σ {\displaystyle \sigma } values using fewer iterations, though, in some cases more computational resources.

See also

References

  1. 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.
  2. J. M. McCarthy, 1990, Introduction to Theoretical Kinematics, MIT Press, Cambridge, MA.
  3. J. J. Uicker, G. R. Pennock, and J. E. Shigley, 2003, Theory of Machines and Mechanisms, Oxford University Press, New York.
  4. J. M. McCarthy and G. S. Soh, 2010, Geometric Design of Linkages, Springer, New York.

External links

Categories: