INVERSE KINEMATICS
INTRODUCTION TO ROBOTICS: DISCUSSION 3 ROBERT PETER MATTHEW 20150915 DISCUSSION 3 INVERSE KINEMATICS ADMINISTRIVA
• HW1 Self Grades: Thursday 17th @1700 • HW2 Due: Thursday 17th @1700
• Discussion sections: Tues 1000-1100, Wed 1100-1200 • Office hours: Mon, Thurs 1100-1200 • DSP Students: Letters of Accommodation required asap.
rpmatthew
Translation of Origin Relative Rotation
rpmatthew
Points Vectors
rpmatthew
Homogeneous Coordinates:
Note: all configurations are RELATIVE.
rpmatthew
= 1 1 1 𝒒𝒒𝐴𝐴 𝑹𝑹𝐴𝐴𝐴𝐴 𝒑𝒑𝐴𝐴𝐴𝐴 𝒒𝒒𝐵𝐵 = 1 𝟎𝟎 1 1 𝒒𝒒𝐵𝐵 𝑹𝑹𝐵𝐵𝐶𝐶 𝒑𝒑𝐵𝐵𝐵𝐵 𝒒𝒒𝐶𝐶 = 𝟎𝟎 1 1 1 1 𝒒𝒒𝐴𝐴 𝑹𝑹𝐴𝐴𝐴𝐴 𝒑𝒑𝐴𝐴𝐴𝐴 𝑹𝑹𝐵𝐵𝐶𝐶 𝒑𝒑𝐵𝐵𝐵𝐵 𝒒𝒒𝐶𝐶 Note: all configurations are𝟎𝟎 RELATIVE. 𝟎𝟎
rpmatthew
= 1 1 1 1 𝒒𝒒𝐴𝐴 𝑹𝑹𝐴𝐴𝐴𝐴 𝒑𝒑𝐴𝐴𝐴𝐴 𝑹𝑹𝐵𝐵𝐶𝐶 𝒑𝒑𝐵𝐵𝐵𝐵 𝒒𝒒𝐶𝐶 =𝟎𝟎 𝟎𝟎 =
𝑹𝑹𝑨𝑨𝑨𝑨 𝑹𝑹𝒁𝒁 𝑹𝑹𝑩𝑩𝑩𝑩 𝑹𝑹𝒀𝒀 = = 𝟎𝟎 𝟑𝟑 𝒑𝒑𝑨𝑨𝑨𝑨 𝟎𝟎 𝒑𝒑𝑩𝑩𝑩𝑩 𝟎𝟎 𝟑𝟑 = 𝟎𝟎 𝟑𝟑 𝒒𝒒𝑪𝑪 𝟎𝟎 𝟎𝟎 rpmatthew
= 1 1 1 1 𝒒𝒒𝐴𝐴 𝑹𝑹𝐴𝐴𝐴𝐴 𝒑𝒑𝐴𝐴𝐴𝐴 𝑹𝑹𝐵𝐵𝐶𝐶 𝒑𝒑𝐵𝐵𝐵𝐵 𝒒𝒒𝐶𝐶 =𝟎𝟎 𝟎𝟎 =
𝑹𝑹𝑨𝑨𝑨𝑨 𝑹𝑹𝒁𝒁 𝑹𝑹𝑩𝑩𝑩𝑩 𝑹𝑹𝒀𝒀 = = 𝟎𝟎 𝟑𝟑 𝒑𝒑𝑨𝑨𝑨𝑨 𝟎𝟎 𝒑𝒑𝑩𝑩𝑩𝑩 𝟎𝟎 𝟑𝟑 = 𝟎𝟎 𝟑𝟑 𝒒𝒒𝑪𝑪 𝟎𝟎 𝟎𝟎 rpmatthew
Rigid body motion as:
solutions to coordinate transforms differential equations
rpmatthew
For any reference frame at a zero configuration, we can write:
= 0 𝜉𝜉�1𝜃𝜃1 𝜉𝜉�2𝜃𝜃2 𝑔𝑔 𝜃𝜃 𝑒𝑒 𝑒𝑒 𝑔𝑔 Note: all configurations are in ABSOLUTE coordinates.
rpmatthew
= 0 𝜉𝜉�1𝜃𝜃1 𝜉𝜉�2𝜃𝜃2 𝑔𝑔 𝜃𝜃 0 𝑒𝑒 𝑒𝑒 𝑔𝑔 3 0 0 − = 0 = 3 0 0 0 1 𝜉𝜉1 𝜉𝜉2 1 0 6 (0) = 0 3 𝕀𝕀3 1 𝑔𝑔 𝟎𝟎
rpmatthew
= 0 𝜉𝜉�1𝜃𝜃1 𝜉𝜉�2𝜃𝜃2 𝑔𝑔 𝜃𝜃 0 𝑒𝑒 𝑒𝑒 𝑔𝑔 3 0 0 − = 0 = 3 0 0 0 1 𝜉𝜉1 𝜉𝜉2 1 0 6 (0) = 0 3 𝕀𝕀3 1 𝑔𝑔 𝟎𝟎
rpmatthew
= 0 𝜉𝜉�1𝜃𝜃1 𝑔𝑔 𝜃𝜃 𝑒𝑒 𝑔𝑔 0 0 × = = 0 0 −𝜔𝜔 𝑞𝑞 0 𝜉𝜉1 𝜔𝜔 1 6 (0) = 0 0 𝕀𝕀3 1 𝑔𝑔 𝟎𝟎
rpmatthew
= 0 𝜉𝜉�1𝜃𝜃1 𝑔𝑔 𝜃𝜃 𝑒𝑒 𝑔𝑔 0 0 × = = 0 0 −𝜔𝜔 𝑞𝑞 0 𝜉𝜉1 𝜔𝜔 1 6 (0) = 0 0 𝕀𝕀3 1 𝑔𝑔 𝟎𝟎
rpmatthew
= 0 𝜉𝜉�1𝜃𝜃1 𝑔𝑔 𝜃𝜃 𝑒𝑒 𝑔𝑔 0 0 × = = 0 0 −𝜔𝜔 𝑞𝑞 0 𝜉𝜉1 𝜔𝜔 1 6 (0) = 0 0 𝕀𝕀3 1 𝑔𝑔 𝟎𝟎
rpmatthew
= 0 𝜉𝜉�1𝜃𝜃1 𝑔𝑔 𝜃𝜃 𝑒𝑒 𝑔𝑔 0 0 × = = 0 0 −𝜔𝜔 𝑞𝑞 0 𝜉𝜉1 𝜔𝜔 1 6 (0) = 0 0 𝕀𝕀3 1 𝑔𝑔 𝟎𝟎
rpmatthew
Given a valid configuration in the workspace, find .
2/2 2/2 𝜃𝜃10 3 2 ( ) = 2/2 2/2 0 3 2 0 − 0 1 0 𝑔𝑔𝑑𝑑 𝜃𝜃1 1
𝟎𝟎 = 0 𝜉𝜉�1𝜃𝜃1 𝑔𝑔 𝜃𝜃 𝑒𝑒 𝑔𝑔6 (0) = 0 0 𝕀𝕀3 1 𝑔𝑔 𝟎𝟎 rpmatthew
Given a valid configuration in the workspace, find .
2/2 2/2 𝜃𝜃10 3 2 ( ) = 2/2 2/2 0 3 2 0 − 0 1 0 𝑔𝑔𝑑𝑑 𝜃𝜃1 1
𝟎𝟎 = 0 𝜉𝜉�1𝜃𝜃1 −1 𝑒𝑒 2/2𝑔𝑔 𝜃𝜃 2𝑔𝑔/2 0 0 = 2/2 2/2 0 0 − 0 𝜉𝜉�1𝜃𝜃1 0 0 1 𝑒𝑒 1
𝟎𝟎
rpmatthew
2/2 2/2 0 0 = 2/2 2/2 0 0 − 0 𝜉𝜉�1𝜃𝜃1 0 0 1 𝑒𝑒 1
𝟎𝟎 0 /4 0 0 = /4 0 0 0 0 −𝜋𝜋0 1 0 𝜉𝜉̂1𝜃𝜃1 𝜋𝜋 0 𝟎𝟎 0 0 0 = 0 = /4 0 𝜉𝜉1𝜃𝜃1 1 /4 𝜃𝜃 𝜋𝜋
𝜋𝜋
rpmatthew
Given a valid configuration in the workspace, find .
𝜃𝜃1 If the point is not in the workspace it is infeasible, and no angle can be found.
𝜃𝜃1 The closest feasible point however can be found
rpmatthew
Given a point , , find the corresponding joint angles , 𝑥𝑥 𝑦𝑦 𝜃𝜃1 𝜃𝜃2 Think of this problem in polar coordinates. Each target point , has a corresponding ,
𝑥𝑥 𝑦𝑦 𝑟𝑟 𝜙𝜙 For , to be in the workspace, + 𝑥𝑥 𝑦𝑦 𝑟𝑟 ≤ 𝑙𝑙1 𝑙𝑙2
rpmatthew
Given a point , , find the corresponding joint angles , 𝑥𝑥 𝑦𝑦 𝜃𝜃1 𝜃𝜃2 Think of this problem in polar coordinates. Each target point , has a corresponding ,
𝑥𝑥 𝑦𝑦 𝑟𝑟 𝜙𝜙 For , to be in the workspace, + 𝑥𝑥 𝑦𝑦 𝑟𝑟 ≤ 𝑙𝑙1 𝑙𝑙2
rpmatthew
Given a point , , the lengths , , are known. 𝑥𝑥 𝑦𝑦 𝑟𝑟 𝑙𝑙1 𝑙𝑙2 Using the law of cosines: + = 2 2 2 2 𝑙𝑙1 𝑙𝑙2 − 𝑟𝑟 𝛼𝛼 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑙𝑙1𝑙𝑙2 Therefore = ±
𝜃𝜃2 𝜋𝜋 𝛼𝛼
rpmatthew
Similarly: = ,
𝜙𝜙 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎푎 𝑦𝑦 𝑥𝑥 Using the law of cosines: + = 2 2 2 2 𝑟𝑟 𝑙𝑙1 − 𝑙𝑙2 𝛽𝛽 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑙𝑙1𝑟𝑟 Therefore = ±
𝜃𝜃1 𝜙𝜙 𝛽𝛽
rpmatthew
Given a point , , find the corresponding joint angles , =𝑥𝑥 𝑦𝑦 ± 1 2 = ± 𝜃𝜃 𝜃𝜃 𝜃𝜃1 𝜙𝜙 𝛽𝛽 𝜃𝜃2 𝜋𝜋 𝛼𝛼 While , both determine the point , , they separately 1 2 control 𝜃𝜃the𝜃𝜃 radial position and distance𝑥𝑥 𝑦𝑦
Separation is a useful IK strategy
rpmatthew
Given a valid end effector configuration, find the corresponding joint angles
𝜃𝜃1 − 𝜃𝜃6
rpmatthew
Separation of joints:
: Distance
, : Polar position of 𝜃𝜃3 𝑞𝑞𝑤𝑤 − 𝑝𝑝𝑏𝑏 : Orientation of the end 𝜃𝜃1,2, 𝑞𝑞𝑤𝑤 effector 𝜃𝜃4 5 6
rpmatthew
The points and are special:
𝑞𝑞𝑤𝑤 𝑝𝑝𝑏𝑏 does not change with rotations about , 𝑝𝑝𝑏𝑏 𝜃𝜃1 2 does not change with rotations about , , 𝑞𝑞𝑤𝑤 𝜃𝜃4 5 6 These points are said to be invariant
rpmatthew
Invariant points line on axes of rotation: = 𝜉𝜉�𝑖𝑖𝜃𝜃𝑖𝑖 𝑝𝑝 𝑒𝑒 𝑝𝑝 ie: = = 𝜉𝜉�1𝜃𝜃1 𝜉𝜉�2𝜃𝜃2 𝑝𝑝𝑏𝑏 𝑒𝑒 𝑒𝑒 𝑝𝑝𝑏𝑏 𝜉𝜉�4𝜃𝜃4 𝜉𝜉�5𝜃𝜃5 𝜉𝜉�6𝜃𝜃6 𝑞𝑞𝑤𝑤 𝑒𝑒 𝑒𝑒 𝑒𝑒 𝑞𝑞𝑤𝑤
rpmatthew
rpmatthew
Analytical solutions for inverse kinematics: Fast, efficient
Other methods (numerical) exist and will be explored in the labs.
rpmatthew
Rotations about a single axis
𝝎𝝎 Given two points and find the angle of rotation 𝒑𝒑 𝒒𝒒 𝜽𝜽𝟏𝟏 Relative coordinates of and can be found from a point on the axis of rotation 𝒑𝒑 𝒒𝒒
= 𝒓𝒓 = 𝒖𝒖 𝒑𝒑 − 𝒓𝒓 𝒗𝒗 𝒒𝒒 − 𝒓𝒓
rpmatthew
These relative points can then be projected on the circle of revolution:
= ′ = 𝑻𝑻 𝒖𝒖 𝒖𝒖 − 𝝎𝝎𝝎𝝎𝑻𝑻𝒖𝒖 × 𝒗𝒗풗= 𝒗𝒗 − 𝝎𝝎𝝎𝝎 𝒗𝒗 ′ ′ = ′ ′ 𝟏𝟏 𝟐𝟐 𝟐𝟐 𝒖𝒖 ′ 𝒗𝒗 ′ 𝝎𝝎𝒔𝒔𝒔𝒔𝒔𝒔 𝜽𝜽 𝒖𝒖′ 𝒗𝒗′ 𝒖𝒖 ⋅ 𝒗𝒗 𝒄𝒄𝒄𝒄𝒄𝒄 𝜽𝜽𝟏𝟏 𝒖𝒖 𝟐𝟐 𝒗𝒗 𝟐𝟐 = × , 𝑻𝑻 ′ ′ ′𝑻𝑻 ′ 𝜽𝜽𝟏𝟏 𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂 𝝎𝝎 𝒖𝒖 𝒗𝒗 𝒖𝒖 𝒗𝒗
rpmatthew
Rotations about subsequent axes , .
𝝎𝝎𝟏𝟏 𝝎𝝎𝟐𝟐 , = 0,0 𝜉𝜉�1𝜃𝜃1 𝜉𝜉�2𝜃𝜃2 𝑔𝑔𝐴𝐴𝐴𝐴 𝜃𝜃1 𝜃𝜃2 𝑒𝑒 𝑒𝑒 𝑔𝑔𝐴𝐴𝐴𝐴 Given two points and find the angles , 𝒑𝒑 𝒒𝒒 𝜃𝜃1 𝜃𝜃2 Find intersection point .
𝒄𝒄
rpmatthew
= 𝜉𝜉�1𝜃𝜃=1 𝜉𝜉�2𝜃𝜃2 𝒒𝒒 𝑒𝑒 𝑒𝑒 𝒑𝒑 −𝜉𝜉�1𝜃𝜃1= =𝜉𝜉�2𝜃𝜃2 𝑒𝑒 𝒒𝒒 𝑒𝑒 𝒑𝒑 −𝜉𝜉�1𝜃𝜃1 𝜉𝜉�2𝜃𝜃2 𝑒𝑒 𝒒𝒒 𝒄𝒄 𝑒𝑒 𝒑𝒑 find a point common to both axes
𝒓𝒓 = = 𝒖𝒖 = 𝒑𝒑 − 𝒓𝒓 𝒛𝒛 𝒄𝒄 − 𝒓𝒓 𝒗𝒗 𝒒𝒒 − 𝒓𝒓
rpmatthew
= = −𝜉𝜉�1𝜃𝜃1 𝜉𝜉�2𝜃𝜃2 𝑒𝑒 𝒒𝒒= 𝒄𝒄 𝑒𝑒 𝒑𝒑 = 𝒖𝒖 = 𝒑𝒑 − 𝒓𝒓 𝒛𝒛 𝒄𝒄 − 𝒓𝒓 𝒗𝒗 𝒒𝒒 − 𝒓𝒓 = = −𝜉𝜉�1𝜃𝜃1 𝜉𝜉�2𝜃𝜃2 𝑒𝑒 𝒗𝒗 𝒛𝒛 𝑒𝑒 𝒖𝒖
rpmatthew
= = −𝜉𝜉�1𝜃𝜃1 𝜉𝜉�2𝜃𝜃2 , 𝑒𝑒 are𝒗𝒗 linearly𝒛𝒛 independent𝑒𝑒 𝒖𝒖 𝟏𝟏 𝟐𝟐 𝝎𝝎 =𝝎𝝎 + + ×
𝒛𝒛 𝜶𝜶𝝎𝝎𝟏𝟏 𝜷𝜷𝝎𝝎𝟐𝟐 𝜸𝜸 𝝎𝝎𝟏𝟏 𝝎𝝎𝟐𝟐 = 𝑇𝑇 𝑇𝑇 1 𝑇𝑇 𝜔𝜔1 𝜔𝜔2 𝜔𝜔2 𝑢𝑢 − 𝜔𝜔1 𝑣𝑣 𝛼𝛼 𝑇𝑇 2 = 1 2 𝑇𝑇 𝜔𝜔 𝜔𝜔 𝑇𝑇 − 1 𝑇𝑇 𝜔𝜔1 𝜔𝜔2 𝜔𝜔1 𝑣𝑣 − 𝜔𝜔2 𝑢𝑢 𝛽𝛽 𝑇𝑇 2 = 1 2 2 𝜔𝜔2 𝜔𝜔× 2 − 𝑇𝑇 2 𝑢𝑢 − 𝛼𝛼 − 𝛽𝛽 − 2𝛼𝛼𝛼𝛼𝜔𝜔1 𝜔𝜔2 𝛾𝛾 2 Two𝜔𝜔1 𝜔𝜔solutions!2
rpmatthew
= = = −𝜉𝜉�1𝜃𝜃1+ + 𝜉𝜉�2𝜃𝜃2× =𝑒𝑒 +𝒗𝒗 𝒛𝒛+ 𝑒𝑒 ×𝒖𝒖 𝒛𝒛𝟏𝟏 𝜶𝜶𝝎𝝎𝟏𝟏 𝜷𝜷𝝎𝝎𝟐𝟐 𝜸𝜸𝟏𝟏 𝝎𝝎𝟏𝟏 𝝎𝝎𝟐𝟐 𝟐𝟐 𝟏𝟏 𝟐𝟐 𝟐𝟐 𝟏𝟏 𝟐𝟐 Solve𝒛𝒛 𝜶𝜶as𝝎𝝎 PK I:𝜷𝜷𝝎𝝎 𝜸𝜸 𝝎𝝎 𝝎𝝎 = = −𝜉𝜉�1𝜃𝜃1 = = 𝜉𝜉�2𝜃𝜃2 𝑒𝑒 𝒗𝒗 𝒛𝒛𝟏𝟏 𝑒𝑒 𝒖𝒖 −𝜉𝜉�1𝜃𝜃1 𝜉𝜉�2𝜃𝜃2 𝑒𝑒 𝒗𝒗 𝒛𝒛𝟐𝟐 𝑒𝑒 𝒖𝒖
rpmatthew
Rotations about axis to a distance 𝟏𝟏 = 𝝎𝝎 𝜹𝜹 𝜉𝜉�1𝜃𝜃1 𝜹𝜹 𝒒𝒒 − 𝑒𝑒 𝒑𝒑 Given two points and find the angles 𝒑𝒑 𝒒𝒒 𝜃𝜃1 can be thought of as a ball around 𝜹𝜹 𝒒𝒒
rpmatthew
Given a point on the rotational axis, the relative coordinates can𝒓𝒓 be found: = = 𝒖𝒖 𝒑𝒑 − 𝒓𝒓 𝒗𝒗 𝒒𝒒 − 𝒓𝒓 The projection on the plane of rotation is given by: = ′ = 𝑇𝑇 𝒖𝒖′ 𝒖𝒖 − 𝝎𝝎𝝎𝝎𝑇𝑇𝒖𝒖 𝒗𝒗 𝒗𝒗 − 𝝎𝝎𝝎𝝎 𝒗𝒗
rpmatthew
The projection of on the rotational plane can also be found: 𝜹𝜹 = ′2 2 𝑇𝑇 2 𝜹𝜹 𝜹𝜹 − 𝝎𝝎 𝒑𝒑 − 𝒒𝒒 This defines two angles of rotation: = ±
Two𝜃𝜃 solutions!𝜃𝜃0 𝜃𝜃𝑑𝑑
rpmatthew
The two solutions have the form: = ±
𝜃𝜃 𝜃𝜃0 𝜃𝜃𝑑𝑑 where: = × , 𝑇𝑇 ′+ ′ ′𝑇𝑇 ′ 0 = cos 𝜃𝜃 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎푎 𝝎𝝎 ′ 𝒖𝒖2 𝒗𝒗′ 2 𝒖𝒖 ′𝒗𝒗2 −1 𝒖𝒖 𝒗𝒗 − 𝜹𝜹 𝜃𝜃𝑑𝑑 ′ ′ 𝒖𝒖 𝒗𝒗
rpmatthew
If the desired point is on the edge of the ball there is only one solution
rpmatthew
If the desired point outside the edge of the ball there are no solutions
rpmatthew
Separation of joints:
: Distance
, : Polar position of 𝜃𝜃3 𝑞𝑞𝑤𝑤 − 𝑝𝑝𝑏𝑏 : Orientation of the end 𝜃𝜃1,2, 𝑞𝑞𝑤𝑤 effector 𝜃𝜃4 5 6
rpmatthew
rpmatthew
rpmatthew
Separation of joints:
: Distance
, : Polar position of 𝜃𝜃3 𝑞𝑞𝑤𝑤 − 𝑝𝑝𝑏𝑏 : Orientation of the end 𝜃𝜃1,2, 𝑞𝑞𝑤𝑤 effector 𝜃𝜃4 5 6
rpmatthew
rpmatthew
Separation of joints:
: Distance
, : Polar position of 𝜃𝜃3 𝑞𝑞𝑤𝑤 − 𝑝𝑝𝑏𝑏 : Orientation of the end 𝜃𝜃1,2, 𝑞𝑞𝑤𝑤 effector 𝜃𝜃4 5 6
rpmatthew
rpmatthew
rpmatthew