conda-forge / libignition-gazebo-feedstock

A conda-smithy repository for libignition-gazebo.
BSD 3-Clause "New" or "Revised" License
4 stars 4 forks source link

ign-gazebo defaults to ogre2 rendering engine, that is not available #27

Closed traversaro closed 2 years ago

traversaro commented 2 years ago

Launching ign gazebo on a platform where this is supported (as 6.0.0_h18f0bbf_1 only Linux) results in:

[GUI] [Err] [RenderEngineManager.cc:461] Failed to load plugin [ogre2] : couldn't find shared library.
[GUI] [Err] [MinimalScene.cc:514] Engine [ogre2] is not supported
[GUI] [Err] [MinimalScene.cc:653] Unable to initialize renderer
[GUI] [Err] [RenderEngineManager.cc:461] Failed to load plugin [ogre2] : couldn't find shared library.
[GUI] [Err] [MinimalScene.cc:514] Engine [ogre2] is not supported
[GUI] [Err] [MinimalScene.cc:653] Unable to initialize renderer

This is because ign gazebo defaults to ogre2, that is not packaged at the moment in conda-forge . To launch it, it is necessary to explicitly launch it with render engine ogre, via the --render-engine ogre option:

ign gazebo --render-engine ogre

It would be great to either package ogre2, or to patch ignition gazebo to use ogre as default render engine if ogre2 is not available.

diegoferigo commented 2 years ago

Another option, especially for those that are not using the command line to start Ignition Gazebo, is editing ~/.ignition/gazebo/6/gui.config and change //plugin[@filename=MinimalScene]/engine from ogre2 to ogre. Probably finding and patching this file could fix at least the new installations, since this file is copied into the user's home the first time Gazebo is launched.

traversaro commented 2 years ago

Even with https://github.com/conda-forge/libignition-gazebo-feedstock/pull/28, ign gazebo shapes.sdf fails because ogre2 is not found. Probably we would need to change ogre2 to ogre in all the examples sdf files.

diegoferigo commented 2 years ago

Even with #28, ign gazebo shapes.sdf fails because ogre2 is not found. Probably we would need to change ogre2 to ogre in all the examples sdf files.

I fear this could not be a permanent workaround, since after https://github.com/ignitionrobotics/ign-gazebo/pull/278, most of the world files do not hardcode ogre2 but read the configuration file stored in the user's home. Something else worth noting is that in fortress, the configuration directory has changed https://github.com/ignitionrobotics/ign-gazebo/pull/1050.

traversaro commented 2 years ago

Even with #28, ign gazebo shapes.sdf fails because ogre2 is not found. Probably we would need to change ogre2 to ogre in all the examples sdf files.

I fear this could not be a permanent workaround, since after ignitionrobotics/ign-gazebo#278, most of the world files do not hardcode ogre2 but read the configuration file stored in the user's home. Something else worth noting is that in fortress, the configuration directory has changed ignitionrobotics/ign-gazebo#1050.

I think that is problematic on many levels, so I opened a separate issue for that: https://github.com/conda-forge/libignition-gazebo-feedstock/issues/31 .

traversaro commented 2 years ago

As it is clear from https://github.com/RoboStack/ros-galactic/issues/104, it is not possible to install ogre 1.10 with ROS2, while we have problems with ogre 1.12 tracked in https://github.com/conda-forge/libignition-gazebo-feedstock/issues/6 . At this point, I think the only proper solution is to package ogre-next (what used to be called ogre2 and is still called ogre2 in Gazebo [that used to be called Ignition]). I was kind of waiting for https://github.com/OGRECave/ogre-next/issues/259 to be fixed before so that we could install in the same environment ogre and ogre-next (otherwise we can't have Ignition Gazebo and RViz), but I guess there is no expected release date for that. Probably we could just package the latest ogre-next with a custom patch to fix https://github.com/OGRECave/ogre-next/issues/259, that in the end is what OSRF is doing in their deb packages.

traversaro commented 2 years ago

I tried to package ogre-next, but I got stuck as described in https://github.com/conda-forge/staged-recipes/pull/19384#issuecomment-1165733475 .

traversaro commented 2 years ago

I tried to package ogre-next, but I got stuck as described in conda-forge/staged-recipes#19384 (comment) .

I then got unstack as described in later comments.

traversaro commented 2 years ago

After:

This problem is solved, at least for Ignition Gazebo 6 on Linux :

rosignhumble

On WSLg this does not work, but for reason indipendent from the conda packaging that also affect apt packages (llvmpipe has a antialiasing problem, see gazebosim/gz-sim#1116, while d3d12 does not support the required GL_ARB_copy_image opengl extension).