'Subscriber' object has no attribute 'K': Image_geometry python & ROS [closed]

asked 2016-06-20 10:56:35 -0500

laurent gravatar image

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)
edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by laurent
close date 2016-06-20 12:25:31.412819

Comments

jarvisschultz gravatar image jarvisschultz  ( 2016-06-20 13:12:46 -0500 )edit