STEM 隨筆︰古典力學︰運動學【五‧四‧C 】

假使將雙擺看成由角 {\theta}_1{\theta}_2 所決定之折線 O m_1 m_2

 

那麼端點 m_2 ({\theta}_1 , {\theta}_2) 之於給定位置 = (x, y) 是否有解呢?也就是說求得 {\theta}_1, \ {\theta}_2 ,使滿足

L_1 \cdot \sin ({\theta}_1) + L_2 \cdot \sin({\theta}_2) = x

L_1 \cdot \cos ({\theta}_1) + L_2 \cdot \cos({\theta}_2) = y

方程式也。此所謂

逆運動學

逆運動學(Inverse kinematics)是決定要達成所需要的姿勢所要設置的關節可活動對象的參數的過程。例如,給定一個人體的三維模型,如何設置手腕和手肘的角度以便把手從放鬆位置變成揮手的姿勢?這個問題在機器人學中是很關鍵的,因為操縱機械手臂通過關節角度來控制。逆運動學在遊戲編程三維建模中也很重要,雖然其重要性因為運動捕獲數據的大型資料庫越來越多的使用而降低了。

以關節連接的物體由一組通過關節連接的剛性片段組成。變換關節的角度可以產生無窮的形狀。正向運動學問題的解,是給定這些角度時物體的姿勢。「逆運動學問題」的難度更高的解是給定物體的姿勢時——例如,給定終端效果器(end-effector)的位置時——找到關節的角度。一般情況下,逆運動學問題沒有解析解。但是,逆運動學可以通過非線性編程技術來解決。特定的特殊運動鏈—那些帶有球形腕的—允許運動去耦合。這使得我們可以把終端效果器的朝向和位置獨立的處理,並導致一個高效的閉形式解 。

對於動畫家(animator),逆運動學問題很重要。這些藝術家發現表達空間的形象比控制關節角度來要容易得多。逆運動學算法的應用包括交互操縱動畫控制碰撞避免

……

 

問題矣。重要性不言而喻乎︰

Inverse kinematics

Inverse kinematics is the mathematical process of recovering 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 is useful in robotics and in film animation.

In robotics, inverse kinematics makes use of the kinematics equations to determine the joint parameters that provide a desired position for each of the robot’s end-effectors.[1] Specification of the movement of a robot so that its end-effectors achieve the desired tasks is known as motion planning. Inverse kinematics transforms the motion plan into joint actuator trajectories for the robot. Similar formulae 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 not themselves 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.[2][3][4]

An industrial robot performing arc welding. Inverse kinematics computes the joint trajectories needed for the robot to guide the welding tip along the part.

Kinematic analysis

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.

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

 

恐一時離題太遠,唯簡介

/ikpy

An Inverse Kinematics library aiming performance and modularity http://phylliade.github.io/ikpy

IKPy

Join the chat at https://gitter.im/Phylliade/ikpy Travis-CI PyPI Documentation Status PyPI PyPI Binder

demo

Demo

A live demo of what IKpy can do : (click on the image below to see the video)

Also, a presentation of IKPy : Presentation.

Features

With IKPy, you can :

  • Compute the Inverse Kinematics of every existing robot.
  • Define your kinematic chain using arbitrary representations : DH (Denavit–Hartenberg), URDF standard, custom…
  • Automaticly import a kinematic chain from a URDF file.
  • IKPy is precise (up to 7 digits) : the only limitation being your underlying model’s precision, and fast : from 7 ms to 50 ms (depending on your precision) for a complete IK computation.
  • Plot your kinematic chain : no need to use a real robot (or a simulator) to test your algorithms!
  • Define your own Inverse Kinematics methods

Moreover, IKPy is a pure-Python library : the install is a matter of seconds, and no compiling is required.

Installation

sudo pip3 install ikpy

Quickstart

Follow this IPython notebook.

 

以饗讀者的呦。