# Facing problems in Mask vector in Robotics toolbox

I am working on a 7 DOF serial manipulator and was trying to use ikine to get the joint coordinates for simple 2 DOF robot.

Even though I am using the masking vector as [ 1 1 0 0 0 0 ], I am getting error stating:

Number of robot DOF must be >= the same number of 1s in the mask matrix

This is my 2 DOF robot

L1 = Link('d', 0, 'a', 1, 'alpha', 0);
L1.m=50;
L1.r=[0.5,0,0];
L1.I=[0,0,0;0,0,0;0,0,10];
L1.G=1;
L1.Jm=0;

r2.name='POLIrobot';
r2.gravity=[0;9.81;0];

q0=r2.ikine([eye(3),[0.2;0;0];[0,0,0,1]],[0,0],[1 1 0 0 0 0]);


What are the options you're passing to the r2.ikine function? I believe that, at a minimum, you need to identify them. Try something like the following:

q0 = r2.ikine([eye(3),[0.2;0;0];[0,0,0,1]],'mask',[1 1 0 0 0 0]);

I can't tell what your [0,0] is (and neither can the function!), so I don't know what to suggest for that.

• Thank you !! I just started learning this toolbox , Can you please explain why you haven't estimated any initial estimate for joint coordinate ?? i think by default its 0,0 ? – Jasmeet Singh Jun 22 '17 at 1:02
• @JasmeetSingh - I don't know anything about your robot or the Robotics Toolbox. The Robotics Toolbox is an out of date (last updated 2015) third party toolbox. The official toolbox is the Robotics Systems Toolbox. I can't comment as to whether or not you need an initial estimate, I was just pointing out that, when you use multiple input-value arguments, you need to state what the input is. – Chuck Jun 22 '17 at 12:58