# Camera pose to world coordinate transformation

I have managed to receive camera_pose for ORB-SLAM by following their code.

If I run

\$ echo /world /camera_pose


Translation [-0.8, 0.66, -0.04]

Rotation in Quaternion [ 0.2, -0.3, -0.2, 0.2]

in RPY radian: [0.071, -0.032, -0.34]

in RPY degree [0.4, -25.09, -3.2]


Does this mean these are the translations and rotations of the camera_pose compared to the world coordinates?

How do I retrieve the estimate of the camera_pose in global coordinates (I want x,y,z,yaw,pitch, roll)?

If you need to transform quaternion to euler angels you just need to use this equation:

def quaternion_to_euler(q):

(x, y, z, w) = (q[0], q[1], q[2], q[3])
t0 = +2.0 * (w * x + y * z)
t1 = +1.0 - 2.0 * (x * x + y * y)
roll = math.atan2(t0, t1)
t2 = +2.0 * (w * y - z * x)
t2 = +1.0 if t2 > +1.0 else t2
t2 = -1.0 if t2 < -1.0 else t2
pitch = math.asin(t2)
t3 = +2.0 * (w * z + x * y)
t4 = +1.0 - 2.0 * (y * y + z * z)
yaw = math.atan2(t3, t4)
return [yaw, pitch, roll]


I think translations are already in global coordinates.