gz-sensors
gz-sensors copied to clipboard
GPU laser crashes with more than 16k samples
Original report (archived issue) by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).
Prerequisites
- [X] Put an X between the brackets on this line if you have done all of the following:
- Checked the Q&A board for common solutions: http://answers.gazebosim.org
- Checked that your issue isn't already filed.
- Checked that there is not already an Ignition package that provides the described functionality: https://ignitionrobotics.org/libs
Description
GPU laser crashes with more than 16k horizontal samples.
Steps to Reproduce
Try this SDF:
<sensor name='front_laser' type='gpu_ray'>
<pose>0.08 0 0.3 0 0 0</pose>
<update_rate>15</update_rate>
<topic>/x1/points</topic>
<lidar>
<scan>
<horizontal>
<samples>18000</samples>
<resolution>0.1</resolution>
<min_angle>-3.1459</min_angle>
<max_angle>3.1459</max_angle>
</horizontal>
<vertical>
<samples>16</samples>
<resolution>1</resolution>
<min_angle>-0.261799</min_angle>
<max_angle>0.261799</max_angle>
</vertical>
</scan>
<range>
<min>0.05</min>
<max>75</max>
<resolution>0.01</resolution>
</range>
<noise>
<type>gaussian</type>
<mean>0</mean>
<stddev>0.01</stddev>
</noise>
</lidar>
</sensor>
Expected behavior:
Sensor is properly created with no crash. If you change the 18000
above to 16000
there's no crash.
Actual behavior:
Crash with:
terminate called after throwing an instance of 'Ogre::RenderingAPIException'
what(): OGRE EXCEPTION(3:RenderingAPIException): Zero sized texture surface on texture x1::base::front_laser_samplerTex face 0 mipmap 0. The GL driver probably refused to create the texture. in GL3PlusTexture::_createSurfaceList at /var/lib/jenkins/workspace/ogre-2.1-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusTexture.cpp (line 516)
Reproduces how often:
100%
Versions
ign-sensors2
Additional Information
I talked to @iche033 and apparently large sample counts are redundant anyway, since the underlying computations use a cube with 1024x1024 sized walls.
We should at least prevent the crash, but a better solution may involve interpolating the samples.