T = ctraj(T1, T2, 50); --> T = ctraj(Tz1, Tz2, 50);
q = Robot.ikine(T); --> q = Robot.ikine(T,[0, 0, 0, 90, 0, 0]); Hello,I am trying to solve inverse problem for 6DOF manipulator (I am trying to do a kinematics for human arm).I want to test the trajectory from one point to another but this problem occurs:Warning: ikine: rejected-step limit 100 exceeded (pose 1), final err0.81> In SerialLink/ikine (line 244)In test_workspace (line 35)Warning: failed to converge: try a different initial value of jointcoordinatesTo get the beginning position of end effector and the end position I performed fkine method:Tz1 = Robot.fkine([0, 0, 0, 90, 0, 0])Tz2 = Robot.fkine([0, 0, 0, 120, 0, 0])It returned me this:Tz1 =-0.4481 -0.8940 0 89.40 0 1 0-0.8940 0.4481 0 155.20 0 0 1Tz2 =0.8142 -0.5806 0 58.060 0 1 0-0.5806 -0.8142 0 281.40 0 0 1So I assumed that (x = 89, y = 0, z = 155) could be my start point and the end one could be a (x = 58, y = 0, z = 281)but it appears that something went wrong... Could someone help me with it? Thanks in advance.P (1) = Link([0 100 0 pi/2]);P (2) = Link([0 0 0 -pi/2]);P (3) = Link([0 100 0 -pi/2]);P (4) = Link([0 0 0 pi/2]);P (5) = Link([0 100 0 -pi/2]);P (6) = Link([0 0 0 0]);Robot = SerialLink(P);Tz1 = Robot.fkine([0, 0, 0, 90, 0, 0])Tz2 = Robot.fkine([0, 0, 0, 120, 0, 0])T2 = transl(89, 0, 155) % define the start pointT1 = transl(58, 0, 281) % and destinationT = ctraj(T1, T2, 50); % compute a Cartesian path% now solve the inverse kinematicsq = Robot.ikine(T);Robot.plot(q);
T = ctraj(Tz1.double, Tz2.double, 50); % compute a Cartesian path
Hello Eric!Thank you very much for your support.I changed the code according to your remarks:
P (1) = Link([0 100 0 pi/2]);P (2) = Link([0 0 0 -pi/2]);P (3) = Link([0 100 0 -pi/2]);P (4) = Link([0 0 0 pi/2]);P (5) = Link([0 100 0 -pi/2]);P (6) = Link([0 0 0 0]);Robot = SerialLink(P);Tz1 = Robot.fkine([0, 0, 0, 90, 0, 0]);
Tz2 = Robot.fkine([0, 0, 0, 120, 0, 0]);T = ctraj(Tz1, Tz2, 50); % compute a Cartesian path
% now solve the inverse kinematics
q = Robot.ikine(T,[0, 0, 0, 90, 0, 0]);
Robot.plot(q);This is matlab output:>> test_workspaceError using SE3/interp (line 437)error in trinterpError in SE3/ctraj (line 474)traj(i) = T0.interp(T1, s(i));Error in test_workspace (line 29)T = ctraj(Tz1, Tz2, 50); % compute a Cartesian path
did you mix interchange T2 and T1 on purpose?
No, it wasn't done on purpose it was just a copy paste error.Could you please help with it?Best regards,
P (1) = Link([0 100 0 pi/2]);
P (2) = Link([0 0 0 -pi/2]);
P (3) = Link([0 100 0 -pi/2]);
P (4) = Link([0 0 0 pi/2]);
P (5) = Link([0 100 0 -pi/2]);
P (6) = Link([0 0 0 0]);
Robot = SerialLink(P);
Tz1 = Robot.fkine([0, 0, 0, 90, 0, 0]);
Tz2 = Robot.fkine([0, 0, 0, 120, 0, 0]);
T = ctraj(Tz1, Tz2, 50); % compute a Cartesian path
q = Robot.ikine(T,[0, 0, 0, 90, 0, 0]);