'Subscriber' object has no attribute 'K': Image_geometry python & ROS
So I'm trying to use image_geometry to convert pixel to 3d coordinates using projectPixelTo3dRay from image_geometry Before using that function, i had to set the parameters as such
cam_info = self.image_sub
img_proc = PinholeCameraModel()
img_proc.fromCameraInfo(cam_info)
n = img_proc.projectPixelTo3dRay((557,655))
print(n)
But i get that error when trying to run the code. Can anyone help me out, this is really important
The error also has this bit,which is what K is. You can also read it from the source code
line 42, in fromCameraInfo
self.K = mkmat(3, 3, msg.K)
Asked by laurent on 2016-06-20 10:56:35 UTC
Comments
Duplicate conversation: http://answers.ros.org/question/237391/converting-pixel-coordinates-to-spatial-coordinates-python-ros/
Asked by jarvisschultz on 2016-06-20 13:12:46 UTC