Gazebo depth sensor mirrors max range points in front of camera
I don't know how to describe this best, but rays which don't hit an obstacle are just placed in front of camera.
You see this wall at beginning of the point cloud. Those are points not hitting an obstacle I think, but don't know how to get rid of them..
my ensor config:
<joint name="${name}optical__joint" type="fixed">
<parent link="${name}_link"/>
<child link="${name}_optical_link"/>
<origin xyz="0.1 0.1 0" rpy="${PI/2} ${PI} ${PI/2}" />
</joint>
<link name="${name}_optical_link"/>
<gazebo reference="${name}_optical_link">
<sensor type="depth" name="head_${name}_cam_sensor">
<!-- Set always_on only sensor, not on plugin-->
<always_on>1</always_on>
<visualize>true</visualize>
<!-- Set update_rate only sensor, not on plugin -->
<update_rate>10</update_rate>
<camera name="camera_name">
<horizontal_fov>${70.0*PI/180.0}</horizontal_fov>
<image>
<width>320</width>
<height>240</height>
</image>
<clip>
<near>0.1</near>
<far>100</far>
</clip>
<depth_camera>
<output>depths</output>
</depth_camera>
<pose frame="${name}_optical_link">0 0 0 ${PI/2} ${3*PI/2} 0</pose>
</camera>
<plugin name="cam_plugin" filename="libgazebo_ros_camera.so">
<always_on>true</always_on>
<ros>
<argument>custom_camera/image_raw:=custom_camera/custom_image</argument>
<argument>custom_camera/image_depth:=custom_camera/custom_image_depth</argument>
<argument>custom_camera/camera_info:=custom_camera/custom_info_raw</argument>
<argument>custom_camera/camera_info_depth:=custom_camera/custom_info_depth</argument>
<argument>custom_camera/points:=custom_camera/custom_points</argument>
</ros>
<!-- Set camera name. If empty, defaults to sensor name (i.e. "sensor_name") -->
<camera_name>custom_camera</camera_name>
<!-- Set TF frame name. If empty, defaults to link name (i.e. "link_name") -->
<frame_name>${name}_optical_link</frame_name>
<hack_baseline>0.0</hack_baseline>
<!-- No need to repeat distortion parameters or to set autoDistortion -->
<min_depth>0.001</min_depth>
<max_depth>5.0</max_depth>
</plugin>
</sensor>
</gazebo>