Clear Filters
Clear Filters

helo, i am working on a 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:

3 views (last 30 days)
L(1) = Link([0, 0, 123, 0], 'R');
L(2) = Link([0, 0, 157, 0], 'R');
x1 = 45;
x2 = 64;
rad1 = x1 * pi/180;
rad2 = x2 * pi/180;
R = SerialLink(L, 'name', 'two link');
R.plot([rad1, rad2])
R.teach();
Td = transl([0.2, 0.3, -0.4,])
I = R.ikine(Td, [0, 0], [1, 1, 0, 0, 0, 0])

Answers (1)

Youssef Ben Dhiab
Youssef Ben Dhiab on 28 Nov 2017
Hi Za Ka, Change the last line like that : I = R.ikine(Td, 'q0', [0, 0], 'mask',[1, 1, 0, 0, 0, 0]) It should work. If it didn't you have to change the initial pose [0, 0] by some other values like [pi/2, pi] so that it can converge after less than 1000 iterations.

Tags

Community Treasure Hunt

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

Start Hunting!