Difference between revisions of "Assigning coordinate frames"

From Robotics
Jump to: navigation, search
(Position and orientation of the coordinate frames)
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Navigation|before=[[Denavit-Hartenberg Convention]]|overview=[[Denavit-Hartenberg Convention]]|next=[[Denavit-Hartenberg parameters]]}}
+
{{Navigation|before=[[Common normal]]|overview=[[Denavit-Hartenberg Convention]]|next=[[Denavit-Hartenberg parameters]]}}
 
__NOTOC__
 
__NOTOC__
To be able to determine the spatial relationship or transformation, respectively, between the links of a manipulator, local coordinate frames have to be assigned to them first. There are several rules that have to be observed when assigning coordinate frames following the Denavit-Hartenberg convention. The first rule is, that the manipulator has to be moved to its zero position. So all the joints or their joint parameters, respectively, have to be set to zero. Then the coordinate frames are assigned regarding the zero position.
+
To be able to determine the spatial relationship or transformation, respectively, between the links of a manipulator, local coordinate frames have to be assigned to them first. There are several rules that have to be observed when coordinate frames are to be assigned following the Denavit-Hartenberg convention. The first rule is, that the manipulator has to be moved to its '''zero position'''. So all the joints or their joint parameters, respectively, have to be set to zero. Then the coordinate frames are assigned regarding the zero position.
  
===Notation===
+
Following the [[Notation of links, joints and coordinate frames|notation]], a coordinate frame is attached to each end of a link at the corresponding [[Types of joints|joint]]. The orientation of the coordinate frames depends on the joint and on the prior frame. The following steps describe how the coordinate frames are determined:
  
The notation of the links and joints is shown in the figure below. A manipulator consists of <math>k</math> links that are connected with <math>k</math> joints. The links correspond to the rigid parts of an arm and the joints are the flexible connections between them. A joint is always assigned to the proximate link. So a link <math>L_n</math> is connected with its joint <math>J_n</math> to the end of link <math>L_{n-1}</math>. The proximate link <math>L_{n+1}</math> is then mounted to the end of <math>L_n</math> via its joint <math>J_{n+1}</math>. The first link <math>L_1</math> is mounted on the base via joint <math>J_1</math>. So the base is actually link <math>L_0</math> but does not directly belong to the manipulator. The end of the last link <math>L_k</math> corresponds to the end-effector.
+
;First coordinate frame <math>K_0</math>
 +
:Following the [[Notation of links, joints and coordinate frames|notation]], the first coordinate frame is always the base or reference frame <math>K_0</math>. The origin of the base is coincident with the origin of the first joint and their axes are aligned. So the joint axis of the first frame is normal to the <math>xy</math>-plane of the base or world frame, respectively. As the world frame is usually known, the orientation of <math>K_0</math> is already defined and does not have to be determined.
 +
 
 +
;Origin of the frames
 +
:According to the [[Notation of links, joints and coordinate frames|notation]], the intermediate frames <math>K_1</math> to <math>K_{k-1}</math> are attached to the distal joints. The exact origin of frame <math>K_n</math> corresponds to the intersection of the [[Common normal|common normal]] <math>\vec{\mathbf{n}}_n</math> and the [[Types of joints|main axis]] of the distal joint <math>J_{n+1}</math>. In the [[Common normal|figure about common normals]], these points are marked with red dots. If there is no unique common normal, so if the axes are parallel or collinear, the origin of the distal joint is chosen.
 +
:The last frame is always located in the center of the end-effector.
  
There are <math>k</math> coordinate frames defined for the <math>k</math> links of a manipulator plus one base or reference frame, respectively. The coordinate frames are always attached to the end of the links at the distal joints. The first coordinate frame, indexed <math>K_0</math>, is the base or reference frame and attached to the base in joint <math>J_1</math>. The next frame is <math>K_1</math> at the end of link <math>L_1</math> in joint <math>J_2</math> followed by <math>K_2</math> at the end of <math>L_2</math> and so on. The coordinate frame <math>K_k</math> of the last link is finally attached to the end of of the manipulator and so to the end-effector.
+
;z-axis
 +
:The z-axis of coordinate frame <math>K_n</math> is always coincident with the [[Types of joints|main axis]] of joint <math>J_{n+1}</math>. This holds for the base frame as well as for all the intermediate frames. So the direction of the <math>z</math>-axes can easily be determined for the whole manipulator.
 +
:Corresponding to the [[Notation of links, joints and coordinate frames|notation]], there is no joint and consequently no main joint axis at the end-effector. Thus the last frame <math>K_k</math> is usually kept parallel to the previous frame <math>K_{k-1}</math> if possible.  
  
[[File:links.png|left|850px]]
+
;x-axis
<onlyinclude><div style="clear:both;"></div></onlyinclude>
+
:The x-axis of frame <math>K_n</math> is defined as collinear to the [[Common normal|common normal]] <math>\vec{\mathbf{n}}_n</math> of the link. This means that it lies on the same line, but could either have the same direction or the opposite. For simplicity, the direction of the <math>x</math>-axis should be kept as for the previous frame if possible.
 +
:As the base frame has no prior coordinate frame, there is no common normal <math>\vec{\mathbf{n}}_0</math>. Thus, if the world frame is not defined yet, the first <math>x</math>-axis is a free choice. Nevertheless it should be chosen well-considered as it is important for the determination of the [[Denavit-Hartenberg parameters]].
 +
:For [[Common normal|special case 2]] of the common normal (intersection), the length of the common normal is <math>0</math>, but its direction is distinct.
 +
:If the two joint axis are collinear ([[Common normal|special case 3]]), the direction of the common normal is not distinct. As already mentioned before, in such a case, the direction of the <math>x</math>-axis should be kept preferably like before. This simplifies the determination of the [[Denavit-Hartenberg parameters]].
 +
:Like mentioned before, the last coordinate frame <math>K_k</math> and so the <math>x_k</math>-axis is usually kept as before if possible.
  
===Main joint axes===
+
[[File:right-hand-rule.png|right|100px]]
 +
;y-axis
 +
:As the <math>x</math>- and the <math>z</math>-axis are already defined, the <math>y</math>-axis can be determined using the [[Transformations|right hand rule]] shown in the figure on the right.
  
[[File:privres-zaxes.png|left|150px]]
+
For further illustration, watch the video in the next article about the [[Denavit-Hartenberg parameters]]. There the whole process including the assignment the coordinate frames and the determination of the parameters is explained very well.
[[File:right-hand-rotation.png|right|100px]]
 
  
Following the above notation, a coordinate frame is attached to each end of a link at the corresponding joint. The orientation of the coordinate frames depends on the joint and on the prior frame. There is one rule, that is always valid. This is, that the <math>z</math>-axis of a coordinate frame is always pointing in the direction of the main axis of the related joint. Like can be seen in the figure on the left, the main axis of a prismatic joint is the axis along which the displacement in positive direction is applied. For a revolute joint, the main axis is the rotation axis. The direction of the rotation axis and so of the main axis is depending on the positive rotation direction. When you hold your right hand like shown on the right and point your thumb in the direction of the rotation axis, the four other fingers indicate the rotation direction for positive angles. So the right hand can be used to determine the direction of the main axis. In the figure on the left, the thumb of the right hand has to point upwards, so that the four fingers correspond to the direction of the arrow indicating the positive rotation direction. Thus the main axis is directed upwards as well.
+
{{Example
 +
|Title=Assigning coordinate frames
 +
|Contents=
  
===Common normal===
+
The left side of the figure below shows a 5-link manipulator in its zero position and the corresponding [[Types of joints|main joint axes]] and [[Common normal|common normals]].
  
[[File:common-normal.png|right|600px]]
+
;<math>K_0</math>
The common normal is the shortest line perpendicular to the joint axes of two consecutive joints. So it corresponds to the distance of two lines through the joints with the joint axes as direction vectors. This is illustrated on the left side of the figure on the right. The direction of the common normal can be computed using the [[Cross product|cross product]] of the two [[Assigning coordinate frames#Main joint axes|main joint axes]], so of the two <math>z</math>-axes:
+
:The base coordinate frame <math>K_0</math> is already given located in the origin of joint <math>J_1</math>.  
:<math>
 
\vec{\mathbf{n}}_n=\vec{\mathbf{z}}_{n-1}\times \vec{\mathbf{z}}_n
 
</math>
 
Its length depends on the spatial relation of the joint axes. There are some special cases, shown on the right side of the figure, that have to be considered when [[Assigning coordinate frames#Assigning the coordinate frames|assigning the coordinate frames]]:
 
# When the two joint axes are ''parallel'' or ''antiparallel'', the length of the common normal is distinct and larger than zero. But the position along the two axes is not distinct as two parallel lines have the same distance all over.
 
# When the lines through the two joint axes ''intersect'', their distance and so the length of the common normal is <math>0</math>. But the imaginary direction that the common normal would have is distinct and it would start (and end as it has length <math>0</math>) in the intersection point.
 
# When the joint axes are ''collinear'', their distance or the length of the common normal, respectively, is <math>0</math>. The imaginary direction of the common is orthogonal to the joint axes. But as both lines are collinear it could be rotated by any angle about the line. Additionally its position along the line is not distinct.
 
  
===Position and orientation of the coordinate frames===
+
;<math>K_1</math>
 +
:The red dot in <math>J_1</math> indicates the intersection of the [[Common normal|common normal]] with the [[Types of joints|main joint axis]]. So this is the origin of <math>K_1</math>. The <math>z_1</math>-axis is already determined by the [[Types of joints|main joint axis]] shown in blue. The <math>x_1</math>-axis is defined as collinear to the [[Common normal|common normal]]. So it could either point into the figure or out of it. Like in other situations, the <math>x</math>-axis should always be kept as before if possible. So the <math>x_1</math>-axis is chosen pointing out of the figure parallel to <math>x_0</math>. Then following the right-hand-rule, the <math>y_1</math>-axis is directed downwards.
  
;First coordinate frame <math>K_0</math>
+
;<math>K_2</math>
:Following the [[Assigning coordinate frames#Notation|notation]] presented above, the first coordinate frame is always the base or reference frame <math>K_0</math>. The origin of the base is coincident with the origin of the first joint and their axes are aligned. So the joint axis of the first frame is normal to the <math>xy</math>-plane of the base or world frame, respectively. As the world frame is usually known, the orientation of <math>K_0</math> is already defined and does not have to be determined.  
+
:For <math>J_2</math> and <math>J_3</math> we have the [[Common normal|''parallel'' case]] of the common normal. So the location of the common normal is not unique. Thus the origin of coordinate frame <math>K_2</math> is set to the origin of joint <math>J_3</math>, which is marked with a red dot. The <math>z_2</math>-axis is again already defined. But as the direction of the common normal is not unique, the <math>x_2</math>-axis is kept as before. So the <math>y_2</math> stays as well as before.  
  
;Origin of the frames
+
;<math>K_3</math>
:As already explained, the intermediate frames <math>K_1</math> to <math>K_{k-1}</math> are attached to the distal joints. The exact origin of frame <math>K_n</math> corresponds to the intersection of the [[Assigning coordinate frames#Common normal|common normal]] <math>\vec{\mathbf{n}}_n</math> and the [[Assigning coordinate frames#Main joint axis|main axis]] of the distal joint <math>J_{n+1}</math>. In the above figure (showing the common normal), these points are marked with red dots. If there is no unique common normal, so if the axes are parallel or collinear, the origin of the distal joint is chosen.
+
:The [[Common normal|common normal]] of <math>J_3</math> and <math>J_4</math> is located in the intersection of the two joint axes (see red dot). So this is the origin of coordinate frame <math>K_3</math>. As you can see, the coordinate frames are not always located in the physical origins of the joints. The <math>z_3</math>-axis is defined by the [[Types of joints|main joint axis]] and the <math>x_3</math>-axis is defined as collinear to the common normal, so it can be kept as before. The <math>y_2</math>-axis is then pointing to the left.
  
;z-axis
+
;<math>K_4</math>
:Like described above, the z-axis of coordinate frame <math>K_n</math> is coincident with the [[Assigning coordinate frames#Main joint axis|main axis]] of joint <math>J_{n+1}</math>. This holds for the base frame as well as for all the intermediate frames. So the direction of the z-axes can easily be determined for the whole manipulator.
+
:The position of the common normal is actually not unique along the two axes (see [[Common normal|example]] for the common normal). But in such cases the common normal is set such that it ends in the origin of the distal joint. So coordinate frame <math>K_4</math> is located in the origin of <math>J_5</math>. The <math>z</math>-axis is already defined. As the [[Common normal|common normal]] is now directed horizontally from the left to right, the <math>x_4</math>-axis has to be changed accordingly. It is to chosen to point to the right, although the opposite direction would also be correct. So the <math>y_4</math>-axis is directed into the figure.
  
;x-axis
+
;<math>K_5</math>
:The x-axis of frame <math>K_n</math> is defined as collinear to the common normal <math>\vec{\mathbf{n}}_n</math> of the link. This means that it lies on the same line, but could either have the same direction or the opposite. For simplicity, the direction of the <math>x</math>-axis should be kept as for the previous frame if possible.
+
:The last coordinate frame is attached to the end-effector. As there are no restrictions to its orientation for this manipulator, the axes are kept parallel to the axes of <math>K_4</math> to simplify the determination of the [[Denavit-Hartenberg parameters]].
:As the base frame has no prior coordinate frame, there is no common normal <math>\vec{\mathbf{n}}_0</math>. Thus, if the world frame is not defined yet, the first <math>x</math>-axis is a free choice. Nevertheless it should be chosen well-considered as it is important for the determination of the [[Denavit-Hartenberg parameters]].
 
  
;
+
[[File:dh-ex-frames.png|center|950px]]
{{Hint|
+
}}
Content=
 
Here a text will be presented}}
 
  
 
[[Category:Article]]
 
[[Category:Article]]
 
[[Category:Denavit-Hartenberg]]
 
[[Category:Denavit-Hartenberg]]

Latest revision as of 18:19, 13 November 2015

← Back: Common normal Overview: Denavit-Hartenberg Convention Next: Denavit-Hartenberg parameters

To be able to determine the spatial relationship or transformation, respectively, between the links of a manipulator, local coordinate frames have to be assigned to them first. There are several rules that have to be observed when coordinate frames are to be assigned following the Denavit-Hartenberg convention. The first rule is, that the manipulator has to be moved to its zero position. So all the joints or their joint parameters, respectively, have to be set to zero. Then the coordinate frames are assigned regarding the zero position.

Following the notation, a coordinate frame is attached to each end of a link at the corresponding joint. The orientation of the coordinate frames depends on the joint and on the prior frame. The following steps describe how the coordinate frames are determined:

First coordinate frame K_0
Following the notation, the first coordinate frame is always the base or reference frame K_0. The origin of the base is coincident with the origin of the first joint and their axes are aligned. So the joint axis of the first frame is normal to the xy-plane of the base or world frame, respectively. As the world frame is usually known, the orientation of K_0 is already defined and does not have to be determined.
Origin of the frames
According to the notation, the intermediate frames K_1 to K_{k-1} are attached to the distal joints. The exact origin of frame K_n corresponds to the intersection of the common normal \vec{\mathbf{n}}_n and the main axis of the distal joint J_{n+1}. In the figure about common normals, these points are marked with red dots. If there is no unique common normal, so if the axes are parallel or collinear, the origin of the distal joint is chosen.
The last frame is always located in the center of the end-effector.
z-axis
The z-axis of coordinate frame K_n is always coincident with the main axis of joint J_{n+1}. This holds for the base frame as well as for all the intermediate frames. So the direction of the z-axes can easily be determined for the whole manipulator.
Corresponding to the notation, there is no joint and consequently no main joint axis at the end-effector. Thus the last frame K_k is usually kept parallel to the previous frame K_{k-1} if possible.
x-axis
The x-axis of frame K_n is defined as collinear to the common normal \vec{\mathbf{n}}_n of the link. This means that it lies on the same line, but could either have the same direction or the opposite. For simplicity, the direction of the x-axis should be kept as for the previous frame if possible.
As the base frame has no prior coordinate frame, there is no common normal \vec{\mathbf{n}}_0. Thus, if the world frame is not defined yet, the first x-axis is a free choice. Nevertheless it should be chosen well-considered as it is important for the determination of the Denavit-Hartenberg parameters.
For special case 2 of the common normal (intersection), the length of the common normal is 0, but its direction is distinct.
If the two joint axis are collinear (special case 3), the direction of the common normal is not distinct. As already mentioned before, in such a case, the direction of the x-axis should be kept preferably like before. This simplifies the determination of the Denavit-Hartenberg parameters.
Like mentioned before, the last coordinate frame K_k and so the x_k-axis is usually kept as before if possible.
Right-hand-rule.png
y-axis
As the x- and the z-axis are already defined, the y-axis can be determined using the right hand rule shown in the figure on the right.

For further illustration, watch the video in the next article about the Denavit-Hartenberg parameters. There the whole process including the assignment the coordinate frames and the determination of the parameters is explained very well.

Example: Assigning coordinate frames

The left side of the figure below shows a 5-link manipulator in its zero position and the corresponding main joint axes and common normals.

K_0
The base coordinate frame K_0 is already given located in the origin of joint J_1.
K_1
The red dot in J_1 indicates the intersection of the common normal with the main joint axis. So this is the origin of K_1. The z_1-axis is already determined by the main joint axis shown in blue. The x_1-axis is defined as collinear to the common normal. So it could either point into the figure or out of it. Like in other situations, the x-axis should always be kept as before if possible. So the x_1-axis is chosen pointing out of the figure parallel to x_0. Then following the right-hand-rule, the y_1-axis is directed downwards.
K_2
For J_2 and J_3 we have the parallel case of the common normal. So the location of the common normal is not unique. Thus the origin of coordinate frame K_2 is set to the origin of joint J_3, which is marked with a red dot. The z_2-axis is again already defined. But as the direction of the common normal is not unique, the x_2-axis is kept as before. So the y_2 stays as well as before.
K_3
The common normal of J_3 and J_4 is located in the intersection of the two joint axes (see red dot). So this is the origin of coordinate frame K_3. As you can see, the coordinate frames are not always located in the physical origins of the joints. The z_3-axis is defined by the main joint axis and the x_3-axis is defined as collinear to the common normal, so it can be kept as before. The y_2-axis is then pointing to the left.
K_4
The position of the common normal is actually not unique along the two axes (see example for the common normal). But in such cases the common normal is set such that it ends in the origin of the distal joint. So coordinate frame K_4 is located in the origin of J_5. The z-axis is already defined. As the common normal is now directed horizontally from the left to right, the x_4-axis has to be changed accordingly. It is to chosen to point to the right, although the opposite direction would also be correct. So the y_4-axis is directed into the figure.
K_5
The last coordinate frame is attached to the end-effector. As there are no restrictions to its orientation for this manipulator, the axes are kept parallel to the axes of K_4 to simplify the determination of the Denavit-Hartenberg parameters.
Dh-ex-frames.png