1
$\begingroup$

Im using robotic toolbox to simulate my robot, but i always confused when i see the value of rpy. It always different if i compare with tr2rpy and tr2eul. What kind of rotation used in SerialLink.teach?

a = 40/1000;
b = 81/1000;
c = 130/1000;
d = 18/1000;
e = 166/1000;
f = 31/1000;
g = 95/1000;
%MDH
p = SerialLink([...
Revolute('d',b,'a',0,'alpha',0,'modified');...
Revolute('d',0,'a',a,'alpha',deg2rad(90),'offset',pi/2,'modified');...
Revolute('d',0,'a',c,'alpha',0,'modified');...
Revolute('d',e+f,'a',d,'alpha',deg2rad(90),'modified');...
Revolute('d',0,'a',0,'alpha',deg2rad(-90),'modified');...
Revolute('d',g,'a',0,'alpha',deg2rad(90),'modified');],...
'name','6 DOF')
p.teach([0 deg2rad(90) 0 deg2rad(20) deg2rad(10.8) 0]);
tr2rpy(FK,'deg')
tr2eul(FK,'deg')
  • In Simulation = -159.669 -10.142 3.733
  • tr2eul = -160 10.8 0
  • tr2rpy = 0 10.8 -160

Or what am i missed?

$\endgroup$
0
$\begingroup$

By default teach() displays orientation using XYZ order roll-pitch-yaw angles, since this is compatible with older textbooks on arm robots, eg. Paul, Spong, Siciliano. By default tr2rpy() uses ZYX order. You can pass the 'xyz' option to tr2rpy() to make the two angular representations agree.

Alternatively you can pass the option 'rpy/zyx' to teach().

It's unfortunate that the term roll-pitch-yaw angles is underspecified, many sources just use the term without giving the details. To add to the confusion, different areas of robotics seem to adopt different conventions. Check out the implementation of rpy2tr() to see the difference.

$\endgroup$
  • $\begingroup$ its the same value now.. thank you sir :) can i use the algorithm from tr2rpy for feedback on inverse jacobian from jacob0 to control the rotational velocity? $\endgroup$ – Albert H M Jun 3 at 14:37
  • $\begingroup$ This might be better as a new question $\endgroup$ – Peter Corke Jun 6 at 17:46
  • $\begingroup$ okay............ $\endgroup$ – Albert H M Jun 7 at 6:30
  • $\begingroup$ I already create new question for this, would you like to answer it... $\endgroup$ – Albert H M Jun 11 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.