CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES

Similar documents
EEE 187: Robotics Summary 2

Vector Algebra Transformations. Lecture 4

METR 4202: Advanced Control & Robotics

MTRX4700 Experimental Robotics

Robotics kinematics and Dynamics

CS612 - Algorithms in Bioinformatics

Inverse Kinematics of 6 DOF Serial Manipulator. Robotics. Inverse Kinematics of 6 DOF Serial Manipulator

MCE/EEC 647/747: Robot Dynamics and Control. Lecture 3: Forward and Inverse Kinematics

Forward kinematics and Denavit Hartenburg convention

Geometric Transformations

Visual Recognition: Image Formation

ECE569 Fall 2015 Solution to Problem Set 2

Solution of inverse kinematic problem for serial robot using dual quaterninons and plucker coordinates

Industrial Robots : Manipulators, Kinematics, Dynamics

Graphics and Interaction Transformation geometry and homogeneous coordinates

Linear algebra deals with matrixes: two-dimensional arrays of values. Here s a matrix: [ x + 5y + 7z 9x + 3y + 11z

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

Math background. 2D Geometric Transformations. Implicit representations. Explicit representations. Read: CS 4620 Lecture 6

θ x Week Date Lecture (M: 2:05p-3:50, 50-N202) 1 23-Jul Introduction + Representing Position & Orientation & State 2 30-Jul

AH Matrices.notebook November 28, 2016

+ i a y )( cosφ + isinφ) ( ) + i( a x. cosφ a y. = a x

Jacobian: Velocities and Static Forces 1/4

This week. CENG 732 Computer Animation. Warping an Object. Warping an Object. 2D Grid Deformation. Warping an Object.

Transformation. Jane Li Assistant Professor Mechanical Engineering & Robotics Engineering

Today. Today. Introduction. Matrices. Matrices. Computergrafik. Transformations & matrices Introduction Matrices

GEOMETRIC TRANSFORMATIONS AND VIEWING

CT5510: Computer Graphics. Transformation BOCHANG MOON

Robot Inverse Kinematics Asanga Ratnaweera Department of Mechanical Engieering

Jacobian: Velocities and Static Forces 1/4

Kinematic Synthesis. October 6, 2015 Mark Plecnik

MEM380 Applied Autonomous Robots Winter Robot Kinematics

2D/3D Geometric Transformations and Scene Graphs

Inverse Kinematics Analysis for Manipulator Robot With Wrist Offset Based On the Closed-Form Algorithm

UNIVERSITY OF OSLO. Faculty of Mathematics and Natural Sciences

Using Algebraic Geometry to Study the Motions of a Robotic Arm

Transforms. COMP 575/770 Spring 2013

Transformations. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Matlab Simulator of a 6 DOF Stanford Manipulator and its Validation Using Analytical Method and Roboanalyzer

Inverse Kinematics. Given a desired position (p) & orientation (R) of the end-effector

Coordinate Frames and Transforms

Kinematics, Kinematics Chains CS 685

3. Manipulator Kinematics. Division of Electronic Engineering Prof. Jaebyung Park

Robot mechanics and kinematics

CMSC 425: Lecture 6 Affine Transformations and Rotations

EE Kinematics & Inverse Kinematics

ME5286 Robotics Spring 2014 Quiz 1 Solution. Total Points: 30

Analysis of Euler Angles in a Simple Two-Axis Gimbals Set

Motion Control (wheeled robots)

Lecture 2: Kinematics of medical robotics

Jane Li. Assistant Professor Mechanical Engineering Department, Robotic Engineering Program Worcester Polytechnic Institute

ME/CS 133(a): Final Exam (Fall Quarter 2017/2018)

Jacobians. 6.1 Linearized Kinematics. Y: = k2( e6)

Kinematics. Kinematics analyzes the geometry of a manipulator, robot or machine motion. The essential concept is a position.

PPGEE Robot Dynamics I

KINEMATIC ANALYSIS OF 3 D.O.F OF SERIAL ROBOT FOR INDUSTRIAL APPLICATIONS

Robotics I. March 27, 2018

Orientation & Quaternions

CS354 Computer Graphics Rotations and Quaternions

Kinematic Model of Robot Manipulators

Robotics (Kinematics) Winter 1393 Bonab University

x = 12 x = 12 1x = 16

UNIT 2 2D TRANSFORMATIONS

Robot mechanics and kinematics

ROBOTICS 01PEEQW. Basilio Bona DAUIN Politecnico di Torino

CMPUT 412 Motion Control Wheeled robots. Csaba Szepesvári University of Alberta

Robotics. SAAST Robotics Robot Arms

Basilio Bona ROBOTICA 03CFIOR 1

Planar Robot Kinematics

Prof. Mark Yim University of Pennsylvania

,- Dirk Edward VanTilburg

Computer Graphics with OpenGL ES (J. Han) Chapter IV Spaces and Transforms

Affine Transformation. Edith Law & Mike Terry

Visualizing Quaternions

Monday, 12 November 12. Matrices

Chapter 2 Kinematics of Mechanisms

The University of Missouri - Columbia Electrical & Computer Engineering Department EE4330 Robotic Control and Intelligence

ECE569 Fall 2015 Partial Solution to Problem Set 3

3D Transformations. CS 4620 Lecture 10. Cornell CS4620 Fall 2014 Lecture Steve Marschner (with previous instructors James/Bala)

Centre for Autonomous Systems

Computer Graphics. Chapter 5 Geometric Transformations. Somsak Walairacht, Computer Engineering, KMITL

Object Representation Affine Transforms. Polygonal Representation. Polygonal Representation. Polygonal Representation of Objects

CS184: Using Quaternions to Represent Rotation

IntroductionToRobotics-Lecture02

NMT EE 589 & UNM ME 482/582 ROBOT ENGINEERING. Dr. Stephen Bruder NMT EE 589 & UNM ME 482/582

Matrices. Chapter Matrix A Mathematical Definition Matrix Dimensions and Notation

ME 115(a): Final Exam (Winter Quarter 2009/2010)

Articulated Characters

2D Object Definition (1/3)

10/11/07 1. Motion Control (wheeled robots) Representing Robot Position ( ) ( ) [ ] T

Geometry of linear operators. Orthogonal opertors

Quaternion Rotations AUI Course Denbigh Starkey

Robot Geometry and Kinematics

Structure Based Classification and Kinematic Analysis of Six-Joint Industrial Robotic Manipulators

Lecture 18 Kinematic Chains

Rigging / Skinning. based on Taku Komura, Jehee Lee and Charles B.Own's slides

Introduction to Robotics

Hello, welcome to the video lecture series on Digital Image Processing. So in today's lecture

Finite Math - J-term Homework. Section Inverse of a Square Matrix

Analytical and Applied Kinematics

2D and 3D Transformations AUI Course Denbigh Starkey

Transcription:

CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES YINGYING REN Abstract. In this paper, the applications of homogeneous coordinates are discussed to obtain an efficient model for calculating the transformations of kinematics chains. Contents 1. Introduction 1 2. Special properties of rigid rotation matrices 2 2.1. Rotation and orthogonal matrices 2 2.2. Some implementations of 3D rotation matrices 2 3. The importance of the order of translation and rotation 4 3.1. Translations are always commutative 4 3.2. 3D rotations are typically not commutative 4 3.3. Transformations including both rotations and translations are typically not commutative 5 4. Use homogeneous coordinates to combine translation and rotation matrices 6 5. Introduction to the model of kinematic chains 8 5.1. What is a kinematic chain? 8 5.2. How to set up coordinate system for kinematic chains and calculate the transformation of the end effector in forward kinematic analysis 9 6. Summary and future topics 10 References 11 1. Introduction The simulations of robots mechanisms are very crucial in many areas. In particularly, I am interested in its applications in researches about virtual reality. The analysis for users interactions with the virtual world is very similar to that for robots to interact with the real world. This paper will discuss some basic concepts and calculations for the transformations of a popular model for robot simulations the kinematic chains. Date: April 18 2016. 1

2 YINGYING REN 2. Special properties of rigid rotation matrices 2.1. Rotation and orthogonal matrices. In general, a rigid rotation should satisfy three constraints: (1) The conservation of the length of edges. (2) The conservation of angles. (3) The conservation of orientation, i.e., no mirror images. Without loss of generality, we restrict the discussion to the rotation of the coordinate frames. The corresponding constraints will become (1) The magnitudes of bases should remains 1. (2) Every two bases should remain orthogonal to each other. (3) The orientation of bases should remains the same. The rotations matrices should not change the dimensions, so they must be square matrices. Suppose A M n n [R], denote the column of A as A 1, A 2,...A n. A (1) A 1 A 2... A n In order to satisfy the three constraints listed above, we have (2) (3) (4) A i 1 A i A j 0 det A 1 In particularly, equation 2.(3) uses the fact that two vectors are orthogonal to each other if and only if their dot product is zero; equation 2.(4) uses the fact that det(a) tells how L A : R n R n changes n dimensional volume of objects, and positive determinants preserve the original orientation while the negative determinants change the orientation. So we require the determinant to be 1. By the definition of matrix multiplications, the ij entry of A T A equals to the dot product of the A i and A j, i.e., { (A T A i A i, if i j, (5) A) ij A i A j, otherwise. { 1, if i j, by equation 2.(2), (6) 0, if i j, by equation 2.(3). So A T A I n, i.e., A an orthogonal matrix. In particular, the inverse of A equals to the transpose of A, i.e., A A T A T A I n, which makes some related calculations much easier. 2.2. Some implementations of 3D rotation matrices. We can first observe that the composition of a sequence of rotation matrices results in another rotation matrix. Without loss of generality, we only need to prove that the composition of any two rotation matrices is also a rotation matrix. Suppose we have rotation matrices A M n n, B M n n, then (AB)(AB) T (AB)(B T A T ) A(B B T )A T AI n A T AA T I n. Similarly, (AB) t (AB) (B T A T )(AB) B T (A T A)B B T I n B B T B I n. Also, det(ab) det(a)det(b) 1 1 1. So AB is also an n n orthogonal matrix, i.e., a rotation matrix. The more general statement is the famous Euler s rotation theorem, which states that in three-dimensional space,

HOMOGENEOUS COORDINATES IN RIGID BODY TRANSFORMATIONS 3 any displacement of a rigid body such that a point on the rigid body remains fixed, is equivalent to a single rotation about some axis that runs through the fixed point. It also means that the composition of two rotations is also a rotation. [4] In our case, the rigid body is the whole R 3, and the fixed point is the origin. By the constrains mentioned in 2.1, we can find the matrices for 3D rotations around the axes as: (1) Counterclockwise rotation around x-axis: 1 0 0 (7) 0 cosθ sinθ 0 sinθ cosθ (2) Counterclockwise rotation around y-axis cosθ 0 sinθ (8) 0 sinθ 0 cosθ (3) Counterclockwise rotation around z-axis cosθ sinθ 0 (9) sinθ cosθ 0 0 These matrices are derived from the fact that a 2D rotation matrix has the form of cosθ sinθ (10) sinθ cosθ Proof. Suppose (11) x1 x A 2 y 1 y 2 (12) (13) (14) (15) x 2 1 + y1 2 1, by equation 2.(2) x 1 x 2 + y 1 y 2 0, by equation 2.(3) Let x 1 cosθ, y 1 sinθ, then x 2 cos(θ ± π 2 ) sinθ, (16) y 2 sin(θ ± π 2 ) ±cosθ. (17) So x1 y2 x2 y1 ± cos 2 θ ± sin 2 θ ±1. (18) (19) But equation 2.(3) requires det(a) x 1 y 2 x 2 y 1 1, so x 2 sinθ, y 2 cosθ. The 2D part of rotation around y-axis has a slightly different form from the other two (it has the transpose form of a usual 2D rotation matrix), and it is caused by that a counterclockwise rotation around y-axis will go from positive z-axis to positive x-axis. Rotations around other axes passing the origin can be achieved by applying change of coordinates. Specifically, for a rotation in 3D around a normal vector v,

4 YINGYING REN suppose A is the matrix for rotation around x-axis stated above, β is the standard basis for R 3, and β is an orthonormal basis for R 3 that includes v. Properly choosing the other two vectors m, n in the basis can result in a matrix Q 1 [I 3 ] β β [m, n, v], and Q 1. Notice that Q is an orthogonal matrix, so [I 3 ] β β Q 1 Q T. Rotating θ around v then can be represented by the matrix cosθ sinθ 0 (20) M [I 3 ] β β sinθ cosθ 0 [I 3 ] β β 0 cosθ sinθ 0 m T (21) m n v sinθ cosθ 0 n T 0 v T Rotations around axes that do not pass the origin can be achieved by applying a translation matrix conjugately. Specifically, suppose v is some point on the preferred rotation axis, A is the aimed rotation matrix, w is the vector we want to rotate, then A(w v) + v (later we will see this can be achieved by multiplication of a single matrix using homogeneous coordinates 2 ) will give the result. 3. The importance of the order of translation and rotation 3.1. Translations are always commutative. This is a direct result of the rules of vector addition and subtraction. 3.2. 3D rotations are typically not commutative. Figure 1 shows an example of 3D rotations are not commutative. To show this example algebraically, suppose A 1 0 0 0 0 1, B 0 1 0 (22) 1 0 0 0 0 then AB 0 1 0 0 0 1, BA 0 (23) 1 0 0 1 0 0 0 So the two rotations in this example are non-commutative. 1 I3 denotes the identity matrix in R 3, and [I 3 ] β β [[I 3 ] β β ] 1. 2 Section 4

HOMOGENEOUS COORDINATES IN RIGID BODY TRANSFORMATIONS 5 However, rotations performed by matrix multiplications 3 in a single 3D plane, i.e., reducing to 2D rotations, are always commutative, because from 3D to 2D, the possible axes of rotations reduce from 3 to 1, i.e., the degree of freedom 4 reduces from 3 to 1. Figure 1. 3D rotations are not commutative 3.3. Transformations including both rotations and translations are typically not commutative. Suppose we have a vector v R n, a translation vector t R n, and a rotation matrix R M n n [R]. If we apply rotation first, translation second, we will get the result (Rv + t), while if we apply translation first, rotation second, we will get the result (R(v + t)) (Rv + Rt). ( t R n )((Rv + t) (Rv + Rt) t Rt R I n ), i.e., unless R is the identity matrix, the results will be different. Figure 2 shows an example of transformations are not commutative. Figure 2. Combinations of translations and rotations are not commutative 3 This will perserve origin under the transformation. Otherwise, if we consider rotations around different axes, even rotations in 2D plane are non-commutative. 4 In physics, the degree of freedom (DOF) of a mechanical system is the number of independent parameters that define its configuration.

6 YINGYING REN 4. Use homogeneous coordinates to combine translation and rotation matrices When we use linear transformation formed by left-multiplications of matrices, the origin is always preserved, i.e., A M n n, L A 0 0. Since no point will be preserved under an non-identity translation, it is impossible to use the linear transformation to move objects. Most translations will require the addition of separate translation vectors, which usually makes the composition of two transformations complicated. The solution for this problem is to add a dimension to the existing transformation matrices. Specifically, in R 3, we use vector x P y (24) z 1 to represent the vector (25) x p y z in Cartesian coordinates system. Suppose we want to rotate v by rotation matrix R and then translate the result by translation vector t. Denote the entries in R as R ij, i, j {1, 2, 3, 4}, the entries in t as t i, i {1, 2, 3}. Using the method introduce in the previous section, the result should be Rv + t. If we construct matrix A M 4 4 [R] in the following way: R 11 R 12 R 13 t 1 R 21 R 22 R 23 t 2 (26) R 31 R 32 R 33 t 3 0 0 then (27) (28) (29) (30) R t Av v R 11 R 12 R 13 t 1 x R 21 R 22 R 23 t 2 y R 31 R 32 R 33 t 3 z 0 0 1 R 11 x + R 12 y + R 13 z + t 1 R 21 x + R 22 y + R 23 z + t 2 R 31 x + R 32 y + R 33 z + t 3 1 Rv + t 1 The vector P is known as[ the homogeneous ] representations of the vector p and the R v matrix A in the form of, where 0 denotes the (0, 0, 0) vector, is known as homogeneous transformation. Note that transformation given by matrix A is automatically first rotation and then translation. When we want to inverse the

HOMOGENEOUS COORDINATES IN RIGID BODY TRANSFORMATIONS 7 transformation, we need to first invert the translation, then invert the rotation, The fact that the inverse of a rotation matrix is just the transpose of it makes the process a lot of easier 5 : A 1 R T 0 I3 t (31) R T R T t (32) For the operation of rotation around an axis that doesn t pass the origin mentioned at the end of section 2, using the same notation, we can represent it as A v I3 v w (33) 1 A v w v (34) 1 A[w v] + v (35) 1 If we want to use homogeneous coordinates to transform a direction, instead of a position, which only change under rotations but not translations, we can change the [1]third coordinates to 0: [ I3 v w (36), 0] (37) [ w ] 0 A 0 w 0 [ Aw 0 In summary, the extra coordinate simplify the compositions of transformations and has values 0 and 1, which encodes direction vectors and position vectors, respectively. ] 5 Check the result: A A 1 R t [ R T R T ] t [ R R T R R T ] t + t I

8 YINGYING REN 5. Introduction to the model of kinematic chains 5.1. What is a kinematic chain? The kinematic chain is a popular mathematical model that roboticists use to represent the geometric aspect of robot manipulations. Kinematic chain is typically composed of links connected by joints. In this paper, it is assumed that all joints only have one degree of freedom 6 since joints with higher degrees of freedom can be always achieved by compositions of a sequence of joints with one degree of freedom. The problems concerning kinematic motions Figure 3. 3D joints with different degrees of freedom 7 generally fall into two categories: the forward kinematics and inverse kinematics. According to the book by Spong. et al.[2, p. 66], the problem of forward kinematics is to determine the cumulative effect of the entire set of joint variables, that is, to determine the position and orientation of the end effector given the values of these joint variables, while the objective of inverse kinematic analysis is, in contrast, to determine the values for these joint variables given the position and orientation of the end effector frame. The following section will introduce how to use the transformation matrices to model forward and inverse kinematic problems. Most of the mathematics symbols use the same conventions stated in Spong.et al[2, Chapter 3]. 6 For a revolute joint that only allows rotation about a single axis, the joint only has one degree of freedom. But for spherical joint that contains a ball and socket joint, it has three degrees of freedom. See Fig. 3 for details 7 Picture reference: http://planning.cs.uiuc.edu/node109.html

HOMOGENEOUS COORDINATES IN RIGID BODY TRANSFORMATIONS 9 5.2. How to set up coordinate system for kinematic chains and calculate the transformation of the end effector in forward kinematic analysis. Suppose a kinematic chain has n joints (each joint is either a revolute joint or a prismatic joint with one degree of freedom, and assume there is a fixed joint on the top of the first link) and n + 1 links, by conventions, we use A i, i 1, 2,..., n, to represent the i th link, q j, j 1, 2,..., n, to represent the displacement of the joint connecting A i 1 and A i (q 0 denotes the fix joint on the first link), a i, i 0, 1,..., n, to represent the length of A i, and T j i to represent the transformation from link i to link j (T i denotes the transformation from link i to link i + 1). Assign a coordinate frame, β i, to q i with x i, y i, z i denote the standard basis of β i, such that the origin of that coordinate frame is the position of the i th joint, x i aligns with A i, and the positive direction is from q i to q i+1, z i aligns with the revolute axis of the joint, and y i has the same direction of z x (The cross product of z and x). For a revolute joint, q i equals to some angle θ i around z i, and for a prismatic joint, q i equals to some offset d i along x i 1. Suppose we have link A i+1, and let v be the Figure 4. A kinematic chain containing revolute joints and prismatic joints with their corresponding coordinate frames normal vector with the same direction as z i+1, m be the normal vector with the same direction as x i+1, and n be the normal vector with the same direction as y i+1. Let Q [I 3 ] βi β i+1 (m, n, v) 8. If q i+1 equals to θ i+1, i.e., link A i+1 rotates θ i+1 8 See section2.2, page 2

10 YINGYING REN around z i+1, (38) (39) (40) (41) ] [T i+1 R a [I3 a i ] βi R Ra + a, where R Q 1 cosθ i+1 sinθ i+1 0 sinθ i+1 cosθ i+1 0 Q, 0 a i a 0. 0 If q i+1 equals to d i+1, i.e., link A i+1 translates d i along x i, [T i+1 Q d (42) i ] βi, (43) d i where d 0. 0 Notice that Q is an orthogonal matrix 9, by the conclusion we have before 10, R is also an orthogonal matrix. So Ti+1 i i+1, the inverse of Ti, would be easily obtained by the formular in Section 4, page 7: If q i+1 is a revolute variable, Ti+1 i R T R T ( Ra + a) (44), If q i+1 is a prismatic variable, Ti+1 i Q T Q T d (45). Generally, (46) T i T i+1...t j 1, if i < j, T j i I, if i j, (Tj i) 1, if i > j Particularly, T0 n is the desired transformation for the end effector in forward kinematics analysis. 6. Summary and future topics This paper provides basic mathematical techniques for forward kinematic analysis. Both homogeneous coordinates and kinematic chains have many applications in areas such as computer graphics and robotics. In the future, I may explore the applications of homogeneous coordinates in inverse kinematic analysis and dynamic motions analysis. 9 m, n, v are normal vectors and orthogonal to each other 10 See section 2.2 page 2: Composition of orthogonal matrices is still an orthogonal matrix

HOMOGENEOUS COORDINATES IN RIGID BODY TRANSFORMATIONS 11 References [1] Shirley, P., Marschner, Stephen Robert,Ashikhmin, Michael. (2009) Fundamentals of Computer Graphics, Mass. A K Peters. http://proquest.safaribooksonline.com/ book/illustration-and-graphics/9781439865521 [2] Spong, Mark W., Hutchinson, Seth.Vidyasagar, M. (2006) Robot Modeling and Control Hoboken, NJ : John Wiley Sons. [3] LaValle, Steven Michael. (2006) Planning Algorithms, Cambridge University Press. [4] Euler s rotation theorem. Retrieved from https://en.wikipedia.org/wiki/euler s rotation theorem