Ask Your Question

Revision history [back]

The recommended approach for this would be to add a camera frame to the TF tree. To do this you would use the static transform publisher to describe the position and orientation of the camera relative to the end effector of your robot. To stick to the conventions described here you should use an optical frame convention for a camera.

With that frame added to the TF tree you can use the tf2_ros::BufferInterface::transform method to convert a point (or pose) from the camera frame to the world frame (or any other for that matter) with a single call. This way the TF system does all the hard work for you.

Hope this helps.