Closed vixtor-qm closed 3 years ago
This is a good idea. I'm not 100% certain myself of the convention used, so I'll double-check and add a comment. My intention in #47 is that the comment in the launch file could be copied into a URDF.
I managed to get it to work and this is how it looks like now: https://www.youtube.com/watch?v=ROaefDMUFb8&feature=youtu.be&ab_channel=VictorSakharchuk
I verified that the RPY values reported are written in xyz order, and are applied in the xyz order, with extrinsic rotations (the rotation occurs around the original, unrotated y and z axes). This is equivalent to zyx ordering with intrinsic rotations (apply yaw around z, then pitch around new y axis that was also yawed around the z axis, then roll around the new x axis that has been rotated by both the yaw and pitch transforms).
If you're using tf.transformations, this is the "sxyz" sequence, which is the default setting for the Euler-related functions. If R(theta, v)
generates the rotation matrix for a rotation of angle theta
around a vector v
, then rpy="r p y"
creates the matrix
R(y, unitZ) * R(p, unitY) * R(r, unitX)
I'm going to add a short comment to the launch file output. (Shorter than this.)
Just adding another helpful reference for the RPY/Euler convention: http://web.mit.edu/2.05/www/Handout/HO2.PDF
Fixed by #47
I have spent quite a bit of time to understand which convention for angles has been used here. ROS REP-103 defines it as "Euler angles yaw, pitch, and roll about Z, Y, X axes respectively"
Static transform publisher uses the same convention. But it seems that the code follows Eigen's one where rotation around X-axis is specified first, giving RPY as the translation around X, Y, Z axis, respectively. Which, in turn, being directly plugged into the further code, induces a mess and a feeling that the calibration is broken. https://eigen.tuxfamily.org/dox/group__Geometry__Module.html#title20
Since the authors have switched to the quaternion from Euler angles it may not sound important anymore, but, still, RPY is published as the comment in the launch file. It would be less confusing if the axis order would be specified. Thanks