Installing Gazebo Garden and unistalling Gazebo 11

Hello,
I am trying to install Gazebo Garden on my Rosject with ROS2 Galactic/Ubuntu 20.04 using the official instructions:
sudo apt-get update

sudo apt-get install lsb-release wget gnupg

Then install Gazebo Garden:

sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null sudo apt-get update

sudo apt-get install gz-garden

The install procedes until during the uninstallation of gazebo11 it craskes with this error:

…Removing ros-noetic-gazebo-plugins (2.9.2-1focal.20220926.221410) …
Removing ros-noetic-gazebo-ros-control (2.9.2-1focal.20220926.221456) …
Removing ros-noetic-gazebo-ros (2.9.2-1focal.20220926.220721) …
dpkg: error processing package ros-noetic-gazebo-ros (–remove):
unable to securely remove ‘/opt/ros/noetic/lib/gazebo_ros/gzserver’: Device or resource busy
dpkg: too many errors, stopping
Errors were encountered while processing:
ros-noetic-gazebo-ros
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

I am trying to kill the process regarding Gazebo without success.
Please, someone has some suggestion for this problem?
thanks
Salvatore

Hi @saxosun ,

Did you install Gazebo Garden without uninstalling Gazebo Classic manually? If so, then that could be the problem.

I believe the solution should be quite simple. If you have installed Gazebo Garden on top of Gazebo Classic, then try to do the following steps:

  1. Uninstall Gazebo Garden.
  2. Re-install Gazebo Classic.
  3. Re-start your computer.
  4. Start Gazebo Classic after your computer has re-started. * Refer down for the reason to do this step.
  5. Exit / close Gazebo Classic.
  6. Uninstall Gazebo Classic.
  7. Re-start your computer (or just logout and login).
  8. Freshly install Gazebo Garden.
  9. Once installed, start Gazebo Garden.
  10. That’s all!

Reason for Step 4: To help Gazebo Classic initialize its references and dependent folders. It will also re-create any files that were removed during your previous unsuccessful removal of Gazebo Classic.

I hope this helps.

Regards,
Girish

Hi @saxosun,

some weeks ago we installed Gazebo Garden on ROS Humble for a specific teacher.

When you create a normal ROS Humble rosject, it doesn’t come with Gz Garden.

In your rosjects, you will find a rosject named ‘Humble + Garden’.

Could you test it to see if it works for what you are trying to accomplish? If it doesn’t, could you tell us why you need it to be specifically on Galactic?

Now, related to the error that you see when trying to reinstall Gazebo, the error below:

unable to securely remove ‘/opt/ros/noetic/lib/gazebo_ros/gzserver’: Device or resource busy

happens because we mount that gzserver file in a read-only state inside the Docker Container. That is why you have problems when trying to upgrade. This is a custom gzserver wrapper just to make Gazebo easier to debug when someone reports an error, for example.

Please, let us know if Humble + Garden works for you. If not, please let us know why it has to be specific for Galactic.

Hi Ralves,
I am using nvidia Xavier NX to control my robot. Unfortunately, Xavier NX is not able to upgrade to ubuntu 22.04 by official method but it is available only Jetpack5 is only on ubuntu 20.04. So I can install ROS2 galactic. Please, would be possible create a rosject Galactic + Garden?
Thanks
Best,
Salvatore

Hi @saxosun,

Thanks for letting us know why it has to be specifically for Galactic.

We stopped adding new things to Galactic because it became EOL (End of Life) on December 9th, 2022, but I’ll see what I can do in your case.

However, since I already had other issues to solve today, I’ll try to work on this tomorrow Friday, April 12, 2024, ok?

I’ll get back to you later.

Hello Ralves,
thank you a lot for your support!
Salvatore

Hi @saxosun,

Now you should be able to find a rosject named ‘Galactic + Garden’ on your rosjects list.

Could you try it to see whether it works for what you need?

Please let us know if we can be of further help.

Hello Ralves,
thanks for the job. In tried to execute gz sim empty.sdf and I get the following errors:

user:~$ gz sim empty.sdf
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user'
[GUI] [Err] [Ogre2RenderEngine.cc:1137]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at /home/jenkins/workspace/ogre-2.3-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3434)
[GUI] [Err] [Ogre2RenderEngine.cc:1137]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at /home/jenkins/workspace/ogre-2.3-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3434)
[GUI] [Err] [Ogre2RenderEngine.cc:1137]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at /home/jenkins/workspace/ogre-2.3-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3434)
[GUI] [Err] [Ogre2RenderEngine.cc:1137]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at /home/jenkins/workspace/ogre-2.3-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3434)
[GUI] [Err] [Ogre2RenderEngine.cc:1137]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at /home/jenkins/workspace/ogre-2.3-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3434)
[GUI] [Err] [Ogre2RenderEngine.cc:1137]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at /home/jenkins/workspace/ogre-2.3-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3434)
[GUI] [Err] [Ogre2RenderEngine.cc:1137]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at /home/jenkins/workspace/ogre-2.3-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3434)
[GUI] [Err] [Ogre2RenderEngine.cc:1137]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at /home/jenkins/workspace/ogre-2.3-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3434)
[GUI] [Err] [Ogre2RenderEngine.cc:1137]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at /home/jenkins/workspace/ogre-2.3-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3434)
[GUI] [Err] [Ogre2RenderEngine.cc:1137]  Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers. in GL3PlusRenderSystem::initialiseContext at /home/jenkins/workspace/ogre-2.3-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp (line 3434)
[GUI] [Err] [Ogre2RenderEngine.cc:1145] Unable to create the rendering window after [11] attempts.
[GUI] [Err] [Ogre2RenderEngine.cc:1054] Failed to create dummy render window.
[GUI] [Err] [Ogre2RenderEngine.cc:1055] Please see the troubleshooting page for possible fixes: https://gazebosim.org/docs/fortress/troubleshooting
Stack trace (most recent call last):
#31   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7f8a192264a2, in g_main_context_iteration
#30   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7f8a192263ff, in
#29   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7f8a1922617c, in g_main_context_dispatch
#28   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f8a1b51be36, in
#27   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f8a1b4c6487, in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
#26   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f8a1b4c3809, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#25   Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f8a1ac620ef, in QApplication::notify(QObject*, QEvent*)
#24   Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f8a1ac58a65, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#23   Object "/lib/x86_64-linux-gnu/libQt5Quick.so.5", at 0x7f8a1a82fca2, in QQuickItem::event(QEvent*)
#22   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f8a1b4efc29, in QObject::event(QEvent*)
#21   Object "/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libMinimalScene.so", at 0x7f8a003bfe04, ingz::gui::plugins::RenderWindowItem::Ready()
#20   Object "/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libMinimalScene.so", at 0x7f8a003bfc70, ingz::gui::plugins::RenderThread::Initialize[abi:cxx11]()
#19   Object "/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libMinimalScene.so", at 0x7f8a003cf38b, ingz::gui::plugins::RenderThreadRhiOpenGL::Initialize[abi:cxx11]()
#18   Object "/usr/lib/x86_64-linux-gnu/gz-gui-7/plugins/libMinimalScene.so", at 0x7f8a003c25cf, ingz::gui::plugins::GzRenderer::Initialize[abi:cxx11]()
#17   Object "/lib/x86_64-linux-gnu/libgz-rendering7.so.7", at 0x7f8a002fd8e7, in gz::rendering::v7::RenderEngineManager::Engine(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
#16   Object "/lib/x86_64-linux-gnu/libgz-rendering7.so.7", at 0x7f8a002fd6de, in gz::rendering::v7::RenderEngineManagerPrivate::Engine(EngineInfo, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
#15   Object "/lib/x86_64-linux-gnu/libgz-rendering7.so.7", at 0x7f8a0030c231, in gz::rendering::v7::BaseRenderEngine::Init()
#14   Object "/usr/lib/x86_64-linux-gnu/gz-rendering-7/engine-plugins/libgz-rendering-ogre2.so", at0x7f8989647512, in gz::rendering::v7::Ogre2RenderEngine::InitImpl()
#13   Object "/usr/lib/x86_64-linux-gnu/gz-rendering-7/engine-plugins/libgz-rendering-ogre2.so", at0x7f8989644aa7, in gz::rendering::v7::Ogre2RenderEngine::InitAttempt()
#12   Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f89890b8c88, in Ogre::ResourceGroupManager::initialiseAllResourceGroups(bool)
#11   Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f89890b86f6, in Ogre::ResourceGroupManager::parseResourceGroupScripts(Ogre::ResourceGroupManager::ResourceGroup*)
#10   Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f8989101c51, in Ogre::ScriptCompilerManager::parseScript(Ogre::SharedPtr<Ogre::DataStream>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
#9    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f8989101ade, in Ogre::ScriptCompiler::compile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
#8    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f89891017f2, in Ogre::ScriptCompiler::compile(Ogre::SharedPtr<std::__cxx11::list<Ogre::SharedPtr<Ogre::ConcreteNode>,Ogre::STLAllocator<Ogre::SharedPtr<Ogre::ConcreteNode>, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
#7    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f89891113f5, in Ogre::MaterialTranslator::translate(Ogre::ScriptCompiler*, Ogre::SharedPtr<Ogre::AbstractNode> const&)
#6    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f898910c391, in Ogre::ScriptTranslator::processNode(Ogre::ScriptCompiler*, Ogre::SharedPtr<Ogre::AbstractNode> const&)
#5    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f89891176c8, in Ogre::TechniqueTranslator::translate(Ogre::ScriptCompiler*, Ogre::SharedPtr<Ogre::AbstractNode> const&)
#4    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f898910c391, in Ogre::ScriptTranslator::processNode(Ogre::ScriptCompiler*, Ogre::SharedPtr<Ogre::AbstractNode> const&)
#3    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f898912c6cc, in Ogre::PassTranslator::translate(Ogre::ScriptCompiler*, Ogre::SharedPtr<Ogre::AbstractNode> const&)
#2    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f8989197269, in Ogre::Technique::createPass()
#1    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f8989061cd4, in Ogre::Pass::Pass(Ogre::Technique*, unsigned short)
#0    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7f8988f62c1a, in Ogre::Hlms::createDatablock(Ogre::IdString, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Ogre::HlmsMacroblock const&, Ogre::HlmsBlendblock const&, std::vector<std::pair<Ogre::IdString, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, Ogre::STLAllocator<std::pair<Ogre::IdString, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > > const&, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
Segmentation fault (Address not mapped to object [0x220])
user:~$

Salvatore

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.

Hi @saxosun,

This error happens because of the Ogre version.

By default, Gazebo Garden (gz sim) uses Ogre2, as we can see when we run “gz sim --help”, which gives us the following output:


  --render-engine [arg]        Gazebo Rendering engine plugin to load for
                               both the server and the GUI. Gazebo will use
                               OGRE2 by default. (ogre2)
                               Make sure custom plugins are in
                               GZ_SIM_RENDER_ENGINE_PATH.

We can bypass this error by forcing Gazebo to run with Ogre1.

That can be achieved using the –render-engine ogre parameter. Example:

gz sim --render-engine ogre empty.sdf

Can you check if this works for you on the ‘Galactic + Garden’ rosject?

In the meantime, I’m checking how to upgrade Ogre. I’ve already tried to upgrade Ogre before but I had some problems, and that is why I’m suggesting you try Ogre1.

Hi again, @saxosun,

I was able to upgrade ROS Galactic (the specific version used by your Garden + Galactic rosject)

You should now be able to use it like you tried before (using default Ogre2):

gz sim empty.sdf

I’ve upgraded Mesa using the commands below:

sudo add-apt-repository ppa:kisak/kisak-mesa

sudo apt update
sudo apt upgrade -y

The following link was used as a reference:

Please let us know when you test it, @saxosun .