Professional Documents
Culture Documents
Inverse Kinematics For A Rhino Robot
Inverse Kinematics For A Rhino Robot
Z1
Y1 Z3 Z4
Z2
a2 = 50 a3 = 50
X4
Shoulder X1 Elbow X3 Wrist
X2
Y2 Y3 Y4
d5 = 5
X5
Y5
d1 = 50
Z5
Z0
Y0
Base
X0
1 0 deg 0 d1 = 50 Q1
2 -90 deg 0 0 Q2
3 0 deg a2 = 50 0 Q3
4 0 deg a3 = 50 0 Q4
5 -90 deg 0 d5 = 5 0
6
With all the axis aligned, the forward kinematics simplify somewhat. The previous Matlab routine RRR works
for a Rhino robot as well if you change the robot definition:
Forward Kinematics: Given the joint angles, the tip position is:
P 0 = T 01 T 12 T 23 T 34 T 45 P 5
where P5 is the origin of reference frame #5 (the tip). For example, at zero position (shown above), the tip
position is
x 100.0000
y 0.0000
z 45.0000
1.0000
Inverse Kinematics solves the inverse problem: given the tip position, determine the joint angles.
T 01 = R x (α 0 )D x (a 0 )R z (θ 1 )D z (d 1 )
or
cθ 1 −sθ 1 0 a0
sθ cα cθ cα −sα −sα d
T 01 = 1 0 1 0 0 0 1
sθ 1 sα 0 cθ 1 sα 0 cα 0 cα 0 d 1
0 0 0 1
cθ 1 −sθ 1 0 0
sθ 1 cθ 1 0 0
T 01 =
0 0 1 50
0 0 0 1
T 12 = R x (α 1 )D x (a 1 )R z (θ 2 )D z (d 2 )
cθ 2 −sθ 2 0 0
0 0 1 0
=
T 12
−sθ 2 −cθ 2 0 0
0 0 0 1
T 23 = R x (α 2 )D x (a 2 )R z (θ 3 )D z (d 3 )
cθ 3 −sθ 3 0 50
sθ 3 cθ 3 0 0
T 23 =
0 0 1 0
0 0 0 1
cθ 4 −sθ 4 0 50
sθ 4 cθ 4 0 0
T 34 =
0 0 1 0
0 0 0 1
0
P 4 =
0
0
1
Relative to frame zero, this is
P 0 = T 01 T 12 T 23 T 34 P 4
or
c1 −s 1 0 0 c2 −s 2 0 0 c3 −s 3 0 50 c4 −s 4 0 50 0
P 0 =
s1 c1 0 0 0 0 1 0 s3 c3 0 0 s4 c4 0 0 0
0 0 1 50 −s 2 −c 2 0 0 0 0 1 0 0 0 1 0 0
0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 1
There is some redundancy in the Rhino robot: there are four angles to define the tip position (which has three
contraints). The wrist position has only 3 degrees of freedom (angles 1 .. 3) and three contraints (x, y, z)
c1 −s 1 0 0 c2 −s 2 0 0 c3 −s 3 0 50 50
P 0 =
s1 c1 0 0 0 0 1 0 s3 c3 0 0 0
0 0 1 50 −s 2 −c 2 0 0 0 0 1 0 0
0 0 0 1 0 0 0 1 0 0 0 1 1
c1 −s 1 0 0 c2 −s 2 50c 3 + 50
0 0
50s
P 0 =
s1 c1 0 0 0 0 1 0 3
0 0 1 50 −s 2 −c 2
0 0 0
0 0 0 1 0 0
0 1 1
c1 −s 1 0 0 (50c 3 + 50)c 2 − 50s 2 s 3
P 0 =
s1 c1 0 0 0
0 0 1 50 −(50c 3 + 50)s 2 − 50c 2 s 3
0 0 0 1 1
((50c 3 + 50)c 2 − 50s 2 s 3 )c 1
P 0 =
((50c 3 + 50)c 2 − 50s 2 s 3 )s 1
−(50c 3 + 50)s 2 − 50c 2 s 3 + 50
1
or, to solve for the three angles, simply solve the following three equations for three unknowns:
Z0 Y0
Tip
Q1
X0
θ 1 = arctan y tip
x tip
To find the angles 2 and 3, take a cross section along the plane of the robot (or assume it is at 0 degrees). The
side view of a Rhino Robot is
Z3 Q3
50
Wrist
50 h
d/2
d z-50
Z1 -Q2 d/2
Z2
r
50
Z0
r = x 2tip + y 2tip
d = r 2 + 50 2
2
h = 50 − d2
2
θ a = arctan z−50
r
θ b = arctan d/2
h
θ2 = θa + θb
θ 1 = arctan 500 = 0 0
r = 50
d = 70.71
h = 35.3553
θ a = arctan −50
50
= −45 0
θ2 = θa + θb = 00
>> Q1 = 90*pi/180;
>> Q2 = -50*pi/180;
>> Q3 = 60*pi/180;
>> Q4 = -(Q2+Q3);
>> Tip = Rhino([Q1, Q2, Q3, -(Q2+Q3), 0], [0;0;0;1])
0.0000
81.3798
74.6198
1.0000
81.3798
>> z = Tip(3) + 5
79.6198
86.6025
25.0000
20
30.0000
-50.0000
>> q3 = pi - 2*atan2(d/2, h)
1.0472
>> q3*180/pi
60.0000
>>