RVC3-MATLAB icon indicating copy to clipboard operation
RVC3-MATLAB copied to clipboard

ETS3/teach has an error when the robot has a prismatic joint

Open amiao1017 opened this issue 2 years ago • 1 comments

Describe the bug ETS3/teach has an error when the robot has a prismatic joint

To Reproduce

W1 = 0.109; W2 = 0.082; L1 = 0.425; L2 = 0.392; H1 = 0.089; H2 = 0.095;

e = ETS3.Rz("q1")*ETS3.Tz(H1)*ETS3.Ty(W1)*ETS3.Ry("q2")ETS3.Tx(L1)... ETS3.Ry("q3")*ETS3.Tx(L2)*ETS3.Ry("q4")*ETS3.Ry(pi)*ETS3.Tz("q5")*ETS3.Ty(W2)*ETS3.Tz(H2)*ETS3.Rx(-pi/2)

e.fkine([0 -pi/2 0 0 pi/2]) e.teach

Screenshots image

when you use ETS3.Rz("q5") instead of ETS3.Tz("q5"), everything is ok.

amiao1017 avatar Sep 21 '23 14:09 amiao1017

The first-order cause is that we have to specify the range of the joint variable for a prismatic joint. For a revolute the default is -pi to pi, but for a prismatic joint there is no obvious default value. Specify ETS3.Tz("q5", qlim=[0,1]) or whatever the working range is. However, after that, there are further bugs which I'll need a bit of time to get my head back into this code.

petercorke avatar Oct 09 '23 23:10 petercorke