Inverse Kinimatics Closed form solution using solve()

5 views (last 30 days)
I have a 3 joint robot that works on a plane. The three joints (a, b, and c: starting from the base) are capable of moving within their limits ([-101° 101°­],[-92° 101°],and[-130° 107°], respectively) . The task of inverse kinematics is to find the value of each joint in order to achieve some pose. For me, this pose involves X, Y, and Pitch. This sets up a system of three equations and three unknowns, in which case there might be a closed form solution. My three equations are:
Where x is horizontal distance in mm, y is vertical distance in mm, z is elevation angle (pitch).
I am trying to find angles a, b, and c in terms of x, y, and z,
in order to do so I used the solve function. The answers I get are not in terms of x, y, and z.
syms a b c x y z
assume(a>-101 & a<101);
assume(b>-92 & b<101);
assume(c>-130 & c<107);
eqns = [x == 300*sind(a) + 60*cosd(a) + 300*cosd(b-a) + 170*cosd(y),...
y == 300*cosd(a) - 60*sind(a) + 300*sind(b-a) + 170*sind(y),...
z == c+b-a];
S = solve(eqns, [a b c], 'ReturnConditions' , true);
S is a structure containing fields: a, b, c, parameters, and conditions.
S.a results in ans = v, where I was hoping for a in terms of x, y, and z. The same goes for b and c.
S.parameters returns [u, v, w]
S.conditions is interesting, it returns:
w < v + y + 130 & v + y < w + 107 & ...
z + 850*cos((pi*y)/180) + 1560*sin((pi*v)/180) + 1500*cos((pi*(v - w))/180) + 300*sin((pi*(v - w))/180) == 5*x + 170*sin((pi*y)/180) & ...
z + 60*sin((pi*v)/180) + 300*sin((pi*(v - w))/180) == 300*cos((pi*v)/180) + 170*sin((pi*y)/180) & ...
-101 < v & v < 101 & -92 < w & w < 101 & u + w == v + y
Maybe the solution is in there somewhere, or maybe I'm going about this the wrong way. In the end I want to be able to plug in an x, y, and z and get out a, b, and c. If there is no solution for the given x, y, z then it can just return nothing (although ultimately it would be nice to return the angle values for closest, changing x and y, answer).

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!