petercorke/toolbox-common-matlab

For symbolic robots, the Coulomb friction torque becomes a two element vector

joernmalzahn opened this issue · 1 comments

The issue can be reproduced with these three lines of code:

mdl_twolink
cg = CodeGenerator(twolink);
cg.gengravload

It produces the error:

 Assignment has more non-singleton rhs dimensions than non-singleton subscripts

Error in sym/privsubsasgn (line 1040)
                L_tilde2 = builtin('subsasgn',L_tilde,struct('type','()','subs',{varargin}),R_tilde);

Error in sym/subsasgn (line 877)
            C = privsubsasgn(L,R,inds{:});

Error in SerialLink/rne_dh (line 219)
                tau(p,j) = t;

Error in SerialLink/rne (line 85)
            [varargout{1:nargout}] = rne_dh(robot, varargin{:});

Error in SerialLink/gravload (line 43)
		tg = rne(robot, q, zeros(size(q)), zeros(size(q)));

Error in CodeGenerator/gengravload (line 56)
G = tmpRob.gravload(q);

Error in CodeGenerator/geneverything (line 290)
            [G] = CGen.gengravload;

The source seems to be that in rne_dh.m l. 219 the variable t is a 1x2 vector. A solution is suspected in Link.m l. 516 to 531.

oops, wrong repo