petercorke / robotics-toolbox-matlab

Robotics Toolbox for MATLAB
GNU Lesser General Public License v2.1
1.29k stars 444 forks source link

jacob_dot gives dimension error #18

Closed nkashiri closed 7 years ago

nkashiri commented 7 years ago

Execution of " jacob_dot(Arms(1),q,qd) " leads to Error using * Inner matrix dimensions must agree.

Error in SerialLink/jacob_dot (line 82) rd{i} = cross(w{i}, a{i}) + Q{i}*rd{i+1};

To address the problem, I believe the following lines should be corrected as follows (some transposes are missing) rd{n} = cross( w{n}, a{n})'; rd{i} = (cross(w{i}, a{i}))' + Q{i}rd{i+1}; r{n} = a{n}'; r{i} = a{i}' + Q{i}r{i+1};