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);




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

Can anyone please help and explain why is it happening?


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.

  • $\begingroup$ 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 ? $\endgroup$ – Jasmeet Singh Jun 22 '17 at 1:02
  • $\begingroup$ @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. $\endgroup$ – Chuck Jun 22 '17 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.