ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If you have the depth image already... why don't you just use that, and then calculate the X and Y coordinates yourself from the camera parameters.

X = (columns from center) * depth / focal_length Y = (rows from center) * depth / focal_length

You can either store the camera focal length in your program, or retrieve it from the /camera_info topic.

If you have the depth image already... why don't you just use that, and then calculate the X and Y coordinates yourself from the camera parameters.

X = (columns from center) * depth / focal_length focal_length

Y = (rows from center) * depth / focal_length

You can either store the camera focal length in your program, or retrieve it from the /camera_info topic.