The points on a point cloud represent a kind of surface, so there shouldn't be any points on free space. How to stop Kinect to detect points on far clipping plane? Please note that my goal is to generate a similar point cloud which we can get from the real Kinect sensor.
you are free to modify that behaviour. In the current code, the points that do not detect anything are clipped to a maximum distance from the sensor. You could modify the code to following: