[RTB] -- Code Generation Error

267 views
Skip to first unread message

Ahmad Gazar

unread,
Jul 18, 2016, 12:38:26 PM7/18/16
to Robotics & Machine Vision Toolboxes
Hello !
 I have a problem when I tried to do the code generator example for the 2-link. I got the following error below. I always get the same error whether in the demos or when I create my own robot object. I am using Matlab 2015Ra on Ubuntu 14.04 LTS and Robotics Toolbox for Matlab (release 9.10). I have also tried to to do the same on another 4R planar robot and I got the same error with when deriving the gravity vector. Thank you for your time.


Deriving gravitational load vectorError using subsasgn
Assignment has more non-singleton rhs dimensions than non-singleton subscripts


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

Error in sym/subsasgn (line 834)
            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 287)
            [G] = CGen.gengravload;


Error in Robotics_Project (line 3)
cg.geneverything();

Jörn Malzahn

unread,
Jul 20, 2016, 5:12:08 AM7/20/16
to robotics...@googlegroups.com
Hi,

to me this looks like there is some dimension inconsistency in the way the argument 'q' is passed through the function calls.  I'll look at it and try to fix it as soon as possible.

Jörn
--
You received this message because you are subscribed to the Google Groups "Robotics & Machine Vision Toolboxes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotics-tool-...@googlegroups.com.
To post to this group, send email to robotics...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotics-tool-box.
For more options, visit https://groups.google.com/d/optout.

mai...@gmail.com

unread,
Oct 19, 2016, 11:18:01 PM10/19/16
to Robotics & Machine Vision Toolboxes
Any Update? I`m using Matlab 2015a and RTB 9.10. I could build my symbolic robot using CodeGenerator, and I could get Forward Kinematic and Jacobian (using RobotName.genfkine() and RobotName.genjacobian()), but when I try to generate any other method, Matlab shows the same error message: 

"
Deriving robot inertia matrixError using subsasgn
Assignment has more non-singleton rhs dimensions than non-singleton subscripts

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

Error in sym/subsasgn (line 834)
            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/inertia (line 61)
m = rne(robot, ones(n,1)*Q.', zeros(n,n), eye(n), [0;0;0]);

Error in CodeGenerator/geninertia (line 58)
inertia = tmpRob.inertia(q);

Error in CodeGenerator/geninvdyn (line 67)
        CGen.geninertia;"

Alexander Frericks

unread,
Jan 4, 2017, 7:50:08 AM1/4/17
to Robotics & Machine Vision Toolboxes
Hey,

I had the same problem and I think I found the problem. See the following post for a possible solution:

https://groups.google.com/forum/#!topic/robotics-tool-box/bt12EoKiZFc

Greetings
Alex
Reply all
Reply to author
Forward
0 new messages