# Converting 3d coordinates from one frame to another: Python, ROS Baxter

So basically i have an x,y,z set with respect to my camera's frame, and i want to convert that to a set of coordinates WRT the base frame. Since I'm using the baxter robot, I know the translation and quaternion of the camera relative to the base, so using tf.fromTranslationRotation(self.position,self.orientation) I can obtain the rotation-translation matrix.

So i tried testing that with an object whose set of coordinates from both frames are known. so setting v as the coordinates wrt to the camera, w wrt to the frame, I used v = [R|T]w, plugging in a known w, and then comparing the calculated v to the actual, known v, where [R|T] is the roation-translation matrix obtained from tf.fromTranslationRotation(self.position,self.orientation)

My results however, have been very inconclusive. Am I doing anything wrong here? I also tried inverting the equation, i.e w = [R|T]v, but my results still don't make sense.

edit retag close merge delete