SCARA kinematics – example M-file and whiteboard snapshot

%
% SCARA inverse kinematics calculation
% Written by Ted Burke - 15-11-2018
%

% Dimensions of manipulator's rigid segments
L1 = 0.4
L2 = 0.3

% Target position for end effector
x = 0.2
y = 0.5

% Calculate distance of end effector from origin
L3 = sqrt(x^2 + y^2);

% Calculate elbow angle
E = acos((L3^2 - L1^2 - L2^2)/(2*L1*L2));

% Calculate shoulder angle
R = atan2(y,x);
Q = acos((L1^2 + L3^2 - L2^2)/(2*L1*L3));
S = R - Q;

% Convert from radians to degrees
Edeg = 180.0 * E / pi
Sdeg = 180.0 * S / pi

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s