ros-simulation/gazebo_ros_pkgs — pull request #165 by stwirth (2014-02-12 16:17:35+00:00)
Title: [gazebo_plugins] made depth camera and openni kinect plugins behave according to REP 117

[REP-117](http://www.ros.org/reps/rep-0117.html) defines how distance measurements should be represented in ROS. The depth images coming from gazebo do not follow this convention.
In the plugin, all values below a threshold parameter are set to `std::numeric_limits::quiet_NaN()`. According to the REP all "too close" measurements should return -inf instead.
Gazebo returns 0.0 as depth value for pixels that do not contain any object. Those are translated into NaNs as well but should be set to +inf instead.

This PR changes the behavior of the depth camera and the openni kinect plugin to match the REP.

What I don't like much is the check for `depth == 0.0f` to get the pixels that shoud have +inf. Gazebo itself should return +inf for pixels that have no object behind them.
Maybe the fragment shader that is used [here](https://bitbucket.org/osrf/gazebo/src/0c7d0c7b9a221aa512aaa6ec88c5e9104b62ca2e/gazebo/rendering/DepthCamera.cc?at=default#cl-95) should be adapted?

@chadrockey Could you check the REP conformity please?