Translating Cartesian Coordinates from Hand frame to World Frame: ROS & Baxter Help

So I'm working with the baxter robot and using the ROS workspace. The baxter has a camera attached to its arm, from which I can read x,y,z coordinates of certain object, relative to the hand frame.

Once my object is detected, I need its x,y,z coordinate, but from the robot's main frame, so i need to translate from the hand to the robot frame, and given that the robot has 6 degrees of motion, I'm having a hard time figuring out how to do that. I know that I'm supposed to use DH matrices, but could someone try and explain to me how i should proceed?

tf2 is the second generation of the transform library, which lets the user keep track of multiple coordinate frames over time. tf2 maintains the relationship between coordinate frames in a tree structure buffered in time, and lets the user transform points, vectors, etc between any two coordinate frames at any desired point in time.

I think you'll be most interested in the "lets the user transform points, vectors, etc between any two coordinate frames at any desired point in time" bit.

TF can be a bit of a challenge to get to grips with, so I highly recommend you do the tutorials first (and try to understand them, not just copy/paste the examples), before you try to integrate it into your own code.

Comments

So using tf echo i was able to obtain the position and rotation coordinates of the hand of my robot. but i can't seem to figure out how, using tf, i would transform coordinates from my hand to my base perspective

Do yoiu know if there's an API for the BufferInterface for python? There this link(http://docs.ros.org/jade/api/tf2_ros/html/python/tf2_ros.html?highlight=bufferinterface) but somehow i can't access the buffer interface API

I don't know much C++, But looking at the function in the c++ api, it says that it returns the transformed output. Which is a little confusing to me, since it doesn't know the input frame, only the frame you want to transform to

ROS msgs like geometry_msgs/Pose include a header.frame_id field. That contains what you call the input frame (or at least: it should contain it). Make sure you input properly setup Poses/Points/etc, and the rest should be taken care of for you.