|
|
|
|
|
This example uses the inverse Jacobian for the offset spherical manipulator to compute the joint rates that correspond to a given Cartesian twist
.
clear all
d2 = 18; % cm
theta1 = 90; % deg theta2 = -90; % deg d3 = 50; % cm theta4 = 90; % deg theta5 = 90; % deg theta6 = -90; % deg

Twist6Rel0Res0 = [0; 0; 0; 10; 0; 0]; % [rad/s; rad/s; rad/s; cm/s; cm/s; cm/s]
U214 = -d3*sind(theta2); U224 = d3*cosd(theta2); T211 = cosd(theta1)*cosd(theta2); T213 = -cosd(theta1)*sind(theta2); T214 = d2*sind(theta1); T221 = sind(theta1)*cosd(theta2); T223 = -sind(theta1)*sind(theta2); T224 = -d2*cosd(theta1); T314 = d3*T213 + T214; T324 = d3*T223 + T224; T411 = T211*cosd(theta4) - sind(theta1)*sind(theta4); T413 = sind(theta1)*cosd(theta4) + T211*sind(theta4); T421 = cosd(theta1)*sind(theta4) + T221*cosd(theta4); T423 = T221*sind(theta4) - cosd(theta1)*cosd(theta4); T431 = sind(theta2)*cosd(theta4); T433 = sind(theta2)*sind(theta4); T511 = T213*sind(theta5) + T411*cosd(theta5); T521 = T223*sind(theta5) + T421*cosd(theta5); T531 = cosd(theta2)*sind(theta5) + T431*cosd(theta5);

J11 = [0, sind(theta1), 0;
0, -cosd(theta1), 0;
1, 0, 0];
![$[\mathbf{J}_{12}]^{-1}$](Example05_10_eq77774.png)
invJ12 = -(1/sind(theta5))*[ -T511, -T521, -T531;
-T413*sind(theta5), -T423*sind(theta5), -T433*sind(theta5);
T411, T421, T431];
![$[\mathbf{J}_{21}]^{-1}$](Example05_10_eq05728.png)
invJ21 = -(1/(d3*d3*sind(theta2)))*[ -d3*sind(theta1), d3*cosd(theta1), 0;
-T314*cosd(theta2), -T324*cosd(theta2), -U214*sind(theta2);
T314*U214, T324*U214, U214*U224];
![$[^{0}\mathbf{J}_{6}]^{-1}$](Example05_10_eq09032.png)
invJ6Res0 = [zeros(3,3), invJ21;
invJ12, -invJ12*J11*invJ21]
invJ6Res0 =
0 0 0 -0.0200 0 0
0 0 0 0 0 0.0200
0 0 0 0.3600 1.0000 0
0 1.0000 0 0 0 0
0 0 -1.0000 -0.0200 0 0
1.0000 0 0 0 0 -0.0200
in [rad/s; rad/s; cm/s; rad/s; rad/s; rad/s]ThetaDot = invJ6Res0*Twist6Rel0Res0 % [rad/s; rad/s; cm/s; rad/s; rad/s; rad/s]
ThetaDot =
-0.2000
0
3.6000
0
-0.2000
0
in [deg/s; deg/s; cm/s; deg/s; deg/s; deg/s]radToDeg = 180/pi;
ThetaDotDeg = [radToDeg*ThetaDot(1);
radToDeg*ThetaDot(2);
ThetaDot(3);
radToDeg*ThetaDot(4);
radToDeg*ThetaDot(5);
radToDeg*ThetaDot(6)] % [deg/s; deg/s; cm/s; deg/s; deg/s; deg/s]
ThetaDotDeg =
-11.4592
0
3.6000
0
-11.4592
0
This MATLAB example illustrates a computation from the textbook Fundamentals of Robot Mechanics by G. L. Long, Quintus-Hyperion Press, 2015. See http://www.RobotMechanicsControl.info for additional relevant files.