title: Getting 3D world coordinate from (x,y) pixel coordinates
body: <p>I'm absolutely new to ROS/Gazebo world; this is probably a simple question, but I cannot find a good answer.</p>
  
  <p>I have a simulated depth camera (Kinect) in a Gazebo scene. After some elaborations, I get a point of interest in the RGB image in pixel coordinates, and I want to retrieve its 3D coordinates in the world frame.
  I can't understand how to do that.</p>
  
  <p>I have tried compensating the distortions, given by the CameraInfo msg. I have tried using PointCloud with pcl library, retrieving the point as <code>cloud.at(x,y)</code>.</p>
  
  <p>In both cases, the coordinates are not correct (I have put a small sphere in the coords given out by the program, so to check if it's correct or no).</p>
  
  <p>Every help would be very appreciated. Thank you very much.</p>
  
  <p>EDIT:
  Starting from the PointCloud, I try to find the coords of the points doing something like:</p>
  
  <pre><code>point = cloud.at(xInPixel, yInPixel);
  point.x = point.x + cameraPos.x;
  point.y = point.y + cameraPos.y;
  point.z = point.z - cameraPos.z;
  </code></pre>
  
  <p>but the x,y,z coords I get as <code>point.x</code> seems not to be correct.
  The camera has a pitch angle of pi/2, so to points on the ground.
  I am clearly missing something.</p>