Coordinates transformation from opencv camera frame to AirSim NED for object localization #4187
Unanswered
marcociara379
asked this question in
Support Q&A
Replies: 2 comments
-
|
Hi @marcociara379 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @ShrutheeshIR, did you find the solution for it? I am stuck on the same problem. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I am trying to detect an Aruco marker in AirSim and localize it in NED frame after detecting it in the camera frame.
To check the correctness of my computations, I am comparing the estimated pose in quaternions with respect to the ground truth output by AirSim. Unfortunately, it seems that I have did something wrong and the two values mismatch.
Here is my procedure:
rvec,tvecrotation and translation vectors withcv2.aruco.estimatePoseSingleMarkers(corners, aruco_length, camera_K_mat, dist_coeffs). These should refer to the transformation from the Aruco frame to the OpenCV camera frame, that is the pose of the aruco marker in camera coordinates (cam frame should be x=east; y=down; z=north; aruco frame is x:east, y:north, z=out of the marker).rvecrotation vector in rotation matrix:R_aruco_cam_, _ = cv2.Rodrigues(rvec)R_aruco_cam_matrix in order to get the aruco position in NED (from camera EDN):R_aurco_ned = np.array([R_aruco_cam_[:,2], R_aruco_cam_[:,0], R_aruco_cam_[:,1]])R_aurco_nedto quaternionsThe aruco marker pose from
client.simGetObjectPose()does return a different orientation, unfortunately.The quaternion conversion should be correct.
Beta Was this translation helpful? Give feedback.
All reactions