Skip to content

Commit a87c55a

Browse files
committed
improve error message
1 parent 84e44ce commit a87c55a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

@SerialLink/ikine.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
end
162162

163163
assert(numel(opt.mask) == 6, 'RTB:ikine:badarg', 'Mask matrix should have 6 elements');
164-
assert(n >= numel(find(opt.mask)), 'RTB:ikine:badarg', 'Number of robot DOF must be >= the same number of 1s in the mask matrix');
164+
assert(n >= numel(find(opt.mask)), 'RTB:ikine:badarg', 'Number of robot DOF must be >= the number of 1s in the mask matrix');
165165
W = diag(opt.mask);
166166

167167

@@ -212,6 +212,7 @@
212212
if ~isnan(opt.transpose)
213213
% do the simple Jacobian transpose with constant gain
214214
dq = opt.transpose * J' * e;
215+
q = q + dq';
215216
else
216217
% do the damped inverse Gauss-Newton with Levenberg-Marquadt
217218
dq = inv(JtJ + (lambda + opt.lambdamin) * eye(size(JtJ)) ) * J' * W * e;

0 commit comments

Comments
 (0)