|
This example computes the inverse kinematics for the offset articulate regional structure via a geometric solution.
clear all
a2 = 43; % cm d3 = 18; % cm d4 = 43; % cm
px = 18; % cm py = 43; % cm pz = 43; % cm
r2 = sqrt(px*px + py*py + pz*pz - d3*d3); % cm cos_phi2 = (a2*a2 + r2*r2 - d4*d4)/(2*a2*r2); cos_phi3 = (a2*a2 + d4*d4 - r2*r2)/(2*a2*d4); sin_phi2 = sqrt(1 - cos_phi2*cos_phi2); sin_phi3 = sqrt(1 - cos_phi3*cos_phi3); phi2 = atan2d(sin_phi2, cos_phi2); % deg phi3 = atan2d(sin_phi3, cos_phi3); % deg
theta1R = atan2d(py, px) + atan2d(d3, sqrt(px*px + py*py - d3*d3)) % deg
theta1R = 90
theta2D = atan2d(pz, sqrt(px*px + py*py - d3*d3)) - phi2 % deg theta3D = 90 - phi3 % deg
theta2D = 0 theta3D = 0
theta2U = atan2d(pz, sqrt(px*px + py*py - d3*d3)) + phi2 % deg theta3U = phi3 - 270 % deg
theta2U = 90 theta3U = -180
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.