petercorke / robotics-toolbox-matlab

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

SerialLink/gravjac error #91

Open spencer-backus opened 4 years ago

spencer-backus commented 4 years ago

I receive the following error when calling the gravjac function in matlab 2019b and version 10.4 of the robotics toolkit

gravjac(robot, qz) Index in position 1 exceeds array bounds (must not exceed 1). Error in SerialLink/gravjac (line 55) baseAxis = robot.base(1:3,3);

I believe that this is because the output of robot.base is a SE3 object but that gravjac expects it to be a matrix. This data type mismatch also appears to crop up at other points in this function including line 79 - 81 where the output of robot.fkine is also as SE3 object that is then indexed as a matrix

petercorke commented 4 years ago

converting to the SE3 class has missed some cases, this is user contrib code which I haven't updated. It's in the queue