ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
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.
2 | No.2 Revision |
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.