Gazebo | Ignition | Community
Ask Your Question
0

[solved] Jpeg file make Gazebo die

asked 2013-02-11 10:47:59 -0500

ErwanR gravatar image

updated 2013-02-12 04:22:08 -0500

Hello,

I'm currently re-using some old code developed under ROS Electric with ROS Fuerte. Especially, I'm spawning in Gazebo a customized wall+photo environment described in a urdf file. I defined my own Material, for example :

material Siri/sima-south-left
{
 technique
        {
        pass
        {
            lighting off
            ambient 1 1 1 1
            diffuse 1 1 1 1
            specular 0 0 0 0
            emissive 0 0 0

            alpha_rejection greater 128
            depth_write on

            texture_unit
            {
                texture sima-south-left.jpg
                tex_coord_set 0
                colour_op modulate
            }
        }
    }
}

Around every wall spawn correctly with the photo applied as texture. But on two photos (sima-south-left.jpg and sime-south-right.jpg), the texture isn't found and Gazebo die with error :

Warning [Visual.cc:689] Unable to get Material[Gazebo/WhiteEmissive] for Geometry[laby::Mur2::Mur2_geom_visual. Object will appear white
Warning [Visual.cc:745] Unable to set Material[laby::Mur20::Mur20_geom_visual_MATERIAL_Isir/sima-south-left] to Geometry[laby::Mur20::Mur20_geom_visual. Object will appear white.
Qt has caught an exception thrown from an event handler. Throwing exceptions from an event  handler is not supported in Qt. You must reimplement QApplication::notify() and catch all exceptions there.

terminate called after throwing an instance of 'Ogre::RenderingAPIException'
  what():  OGRE EXCEPTION(3:RenderingAPIException): Zero sized texture surface on texture sima-south-left.jpg face 0 mipmap 0. Probably, the GL driver refused to create the texture. in GLTexture::_createSurfaceList at /tmp/buildd/ros-fuerte-visualization-common-1.8.4/debian/ros-fuerte-visualization-common/opt/ros/fuerte/stacks/visualization_common/ogre/build/ogre_src_v1-7-3/RenderSystems/GL/src/OgreGLTexture.cpp (line 406)
/opt/ros/fuerte/stacks/simulator_gazebo/gazebo/scripts/gui : ligne 2 : 22405 Abandon                 (core dumped) `rospack find gazebo`/gazebo/bin/gzclient -g `rospack find gazebo`/lib/libgazebo_ros_paths_plugin.so
[gazebo_gui-2] process has died [pid 22402, exit code 134, cmd /opt/ros/fuerte/stacks/simulator_gazebo/gazebo/scripts/gui __name:=gazebo_gui __log:=/home/renaudo/.ros/log/7871d046-7465-11e2-8470-00259079bc9a/gazebo_gui-2.log].
log file: /home/renaudo/.ros/log/7871d046-7465-11e2-8470-00259079bc9a/gazebo_gui-2*.log

I don't get why two specific images are making Gazebo die. Are there max/min size on texture we can use ? All images are in jpg and located in the same folder. This code was working with Electric.

Any advice would be welcome. Thanks for reading.

EDIT : I tried with some others random pictures from internet, and I have no problem to map them on walls ... that's quite strange that two specific pictures are making gazebo crash ...

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-02-12 04:21:03 -0500

ErwanR gravatar image

Ok, got the problem and (probably) the solution. The case is quite the same as what's described in : Answers ROS Ogre Exception

The computer I'm using have only a graphic chipset and no graphic card. My hypothesis is that loading images exceed the video memory available on the chipset (images were 4000x2000px). I resized my images and I have no problem anymore.

As a conclusion : Always be careful about the usage of memory when you're using graphical elements.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-02-11 10:47:59 -0500

Seen: 1,237 times

Last updated: Feb 12 '13