Robotics StackExchange | Archived questions

Why rotation is not match between aruco tag and tf?

I am using Aruco tag detection to detect aruco tags with the library in OpenCV then broadcast it to tf in ROS Noetic.

However, I found out that there is a problem:

When the tag is placed up right to the camera, the axis of tf is matched with the aruco detection like this image description * Axis in camera is tf, axis in image is drawn with aruco library in OpenCV

However, when the tag is rotated, then the axis of tf is NOT matched with the aruco detection: image description * Axis in camera is tf, axis in image is drawn with aruco library in OpenCV

Why this happen? I just convert the eular angles to quaternion with rtf = tf.transformations.quaternionfromeuler(raruco[0], raruco[1], raruco[2])

Asked by KrizChong on 2023-05-30 22:03:25 UTC

Comments

Answers

Hi!

Could you please provide us with some numbers? In the example you got the pictures from, which are the Euler angles returned by OpenCV? In which reference frame (RF)? I think that the problem could be related to having the rotation expressed in a RF that is different from the one you expect.

As an additional comment (and alternative solution), why don't you use aruco_ros instead of developing your own detection node?

Asked by bluegiraffe-sc on 2023-06-05 08:53:57 UTC

Comments