Pages

Saturday, November 24, 2018

Analytical IK Solution - Research

As explored in my previous entry, an IK solution does not direct the chain but rather aims to reach the chain’s end effector toward a global coordinate by manipulation of joints throughout the chain length.

An analytical solution makes use of the trigonometric methods to solve joint configurations. The relative simplicity of this approach makes analytical solutions extremely efficient in comparison to other methods, though limits their reasonable application to chains with relatively low degrees of freedom.

“for manipulators that are redundant or with high dof, there are hardly effective solutions to the inverse kinematics problem” (Gan et al., 2005, p. 123).

This makes an analytical implementation an ideal starting point to begin development into the locomotion of a 2D biped, as it can be used to simulate shoulder and elbow joints to correctly position the hands as well as hip and knee joints to correctly position the feet.

Calculating joint rotations 

The end effector can only be positioned at the target position by manipulation of the chain joints. To correctly rotate the chain joints the current configuration of each joint angle must be solved.

Figure 1 represents the 2 joint problem where A is the base (shoulder joint), B is the elbow joint, and C the end effector.

Figure 1: 2DOF arm arrangement (Zucconi, 2018)
As all joints used in this chain are revolute hinges, bone lengths A-B and B-C are constant.

Pythagoras’ theorem (Figure 2) can be used calculate the distance A-C.

Figure 2: Pythagorean theorem (Verth and Bishop, 2008, p. 47)
At which point the problem becomes solving the internal angles of a triangle:

Figure 3: Workspace problem (Zucconi, 2018)

Once all side lengths of triangle are known, Cosine Law can be used to identify the interior angles required: α and β.

Cosine law equations can be reduced to:


Figure 4: Cosine Law Equations (Lengyel, 2012, p. 507)

The required angle from the base joint position to the target position is then calculated using the trigonometric identity:


Ambiguity 

“analytical solvers often yield multiple solutions which is less practical” (Bergen, 2014).

In a chain with two degrees of freedom, provided that the end effector can reach the target, there will always be two configurations which position the end effector at the target position.

Figure 5: Two valid solutions to single workspace problem (Asadi-Cordshooli, Vahidi and Norouzi, 2015, p. 7)

This will be something I need to consider when making the solution, to ensure consistency and to accurately represent joint bend angles to prevent limb hyperextension.



References
Asadi-Cordshooli, G., Vahidi, A. and Norouzi, R. (2015). Solution of Inverse Kinematic Problem of a 2DOF Robot Using Decomposition Method. Journal ofNewResearches in Mathematics, [online] 1(1), pp.5-11. Available at: http://jnrm.srbiau.ac.ir/article_9579_07342454f33fa30f588df5f3659a1eba.pdf [Accessed 22 Nov. 2018].

Bergen, G. (2014). GDC Vault. Math for Game Programmers: Inverse Kinematics. [online] Available at: https://www.gdcvault.com/play/1022493/Math-for-Game-Programmers-Inverse

Gan, J., Oyama, E., Rosales, E. and Hu, H. (2005). A complete analytical solution to the inverse kinematicsof the Pioneer 2 robotic arm. Robotica (2005) volume 23, [online] pp.123 - 129. Available at: https://pdfs.semanticscholar.org/e97f/76d33025e6ff3ec4bf8647c1e5f9b03e5b8e.pdf [Accessed 23 Nov. 2018].

Kenwright, B. (2013). Game inverse kinematics. [Place of publication not identified]: CreatSpace, pp.39 - 52.

Lengyel, E. (2012). Mathematics for 3D Game Programming and Computer Graphics. 3rd ed. pp.463 - 467, 509 - 511.

Verth, J. and Bishop, L. (2008). Essential mathematics for games and interactive applications. San Francisco, Calif.: Morgan Kaufmann

Zucconi, A. (2018). Inverse Kinematics in 2D - Part 1. [online] Alan Zucconi. Available at: https://www.alanzucconi.com/2018/05/02/ik-2d-1/ [Accessed 18 Nov. 2018].