Skip to content

Commit f4367e9

Browse files
committed
Do a deep copy so as not to mess with the passed in robot object
1 parent fb08987 commit f4367e9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

@SerialLink/ikine_sym.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
%
6767
% http://www.petercorke.com
6868

69-
function out = ikine_sym(srobot, N, varargin)
69+
function out = ikine_sym(robot, N, varargin)
7070

7171
%
7272
% Given a robot model the following steps are performed:
@@ -85,7 +85,8 @@
8585
opt = tb_optparse(opt, varargin);
8686

8787
% make a symbolic representation of the passed robot
88-
srobot = sym(srobot);
88+
srobot = SerialLink(robot); % make a deep copy
89+
srobot = sym(srobot); % convert to symbolic
8990
q = srobot.gencoords();
9091

9192
% test N DOF has an allowable value

0 commit comments

Comments
 (0)