So I'm trying to compute some homogeneous transformation matrices using Peter Corke's Robotics toolbox, however when I try to use the "trchain" command:
syms a1 q1 q2
trchain('Rz(q1)Tz(a1)Ry(q2)',[q1 q2])
I get the following output:
Error using rotz
Expected GAMMA to be one of these types:
double
Instead its type was sym.
Error in sigdatatypes.validateAngle (line 22)
validateattributes(x,{'double'},{'finite','nonnan','nonempty','real'},...
Error in rotz (line 30)
sigdatatypes.validateAngle(gamma,'rotz','GAMMA',{'scalar'});
Error in trotz (line 36)
T = [rotz(t, varargin{:}) [0 0 0]'; 0 0 0 1];
Error in trchain (line 93)
T = T * trotz(arg);
I looked online and came across a few things (E.g. ensuring that Phase Array Toolbox is installed) but nothing is working.
The same problem appears if I try using "rotz" by itself and not within the "trchain" command. Also, the "rotz" function works perfectly fine for numeric arguments.
Any help would be very welcome - thank you!
EDIT -- A new error!
Upon trying the code again, (even though it worked fine the other day), I am now getting another message:
Error using ROUNDN
Expected X to be one of these types:
single, double
Instead its type was sym.
Error in roundn (line 31)
validateattributes(x, {'single', 'double'}, {}, 'ROUNDN', 'X')
Error in rotz (line 18)
R = roundn(R, -15);
Error in trotz (line 36)
T = [rotz(t, varargin{:}) [0 0 0]'; 0 0 0 1];
Error in trchain (line 93)
T = T * trotz(arg);
Error in kinematics1 (line 3)
trchain('Rz(q1)Tz(a1)Ry(q2)',[q1 q2])
The code is exactly the same as above. The version of Matlab I am using is R2018a and the version of Robotics Toolbox is 10.3. Also, Phased Array Toolbox is not installed.
Hope you can help again...thank you