Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression in Gazebo 11.10 on Windows #112

Closed
1 task done
traversaro opened this issue Jan 28, 2022 · 3 comments · Fixed by #113
Closed
1 task done

Regression in Gazebo 11.10 on Windows #112

traversaro opened this issue Jan 28, 2022 · 3 comments · Fixed by #113

Comments

@traversaro
Copy link
Contributor

traversaro commented Jan 28, 2022

Issue:

On Windows Gazebo/gzserver does not start correctly with error:

EXCEPTION: unable to find OpenGL rendering system

Complete out:

(gazebo11100) C:\Users\STraversaro>gzserver --verbose
Gazebo multi-robot simulator, version 11.10.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 172.17.192.1
[Err] [..\gazebo\rendering\RenderEngine.cc:687] EXCEPTION: unable to find OpenGL rendering system. OGRE is probably installed incorrectly. Double check the OGRE cmake output, and make sure OpenGL is enabled.

[Err] [..\gazebo\rendering\RenderingIface.cc:41] Failed to load the Rendering engine subsystem
unable to find OpenGL rendering system. OGRE is probably installed incorrectly. Double check the OGRE cmake output, and make sure OpenGL is enabled.
[Err] [..\gazebo\gazebo.cc:80] Unable to load sensors
[Err] [..\gazebo\Server.cc:328] Unable to load gazebo

Both 11.10.1 and 11.10.0 have the problem, while 11.9.1 is working fine.


Environment (conda list):
$ conda list


Details about conda and system ( conda info ):
$ conda info

c:\src\isaac-wp1>conda info

     active environment : None
            shell level : 0
       user config file : C:\Users\STraversaro\.condarc
 populated config files : C:\Users\STraversaro\AppData\Local\mambaforge\.condarc
                          C:\Users\STraversaro\.condarc
          conda version : 4.10.3
    conda-build version : not installed
         python version : 3.9.7.final.0
       virtual packages : __cuda=11.6=0
                          __win=0=0
                          __archspec=1=x86_64
       base environment : C:\Users\STraversaro\AppData\Local\mambaforge  (writable)
      conda av data dir : C:\Users\STraversaro\AppData\Local\mambaforge\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : C:\Users\STraversaro\AppData\Local\mambaforge\pkgs
                          C:\Users\STraversaro\.conda\pkgs
                          C:\Users\STraversaro\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\STraversaro\AppData\Local\mambaforge\envs
                          C:\Users\STraversaro\.conda\envs
                          C:\Users\STraversaro\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.10.3 requests/2.26.0 CPython/3.9.7 Windows/10 Windows/10.0.22000
          administrator : False
             netrc file : None
           offline mode : False
@traversaro traversaro changed the title Regression in Gazebo 11.10 Regression in Gazebo 11.10 on Windows Jan 28, 2022
@traversaro
Copy link
Contributor Author

traversaro commented Jan 28, 2022

With a quick diff between the env variables set by gazebo 11.9.1 and 11.10., I saw that the issue is that for Gazebo 11.10 the OGRE_RESOURCE_PATH env variable is not properly set.

A workaround is to set set OGRE_RESOURCE_PATH=%CONDA_PREFIX%\Library\bin. After this 11.10.1 works fine, while 11.10.0 fails with:

[Msg] Publicized address: 172.17.192.1
[Err] [..\gazebo\server_main.cc:57] Ogre Error:ItemIdentityException: Resource with the name shadow_caster_vp_glsl already exists. in ResourceManager::add at ..\OgreMain\src\OgreResourceManager.cpp (line 158)
[Err] [..\gazebo\transport\Connection.cc:273] The I/O operation has been aborted because of either a thread exit or an application requestValue[995]

However, this problem should be fixed by gazebosim/gazebo-classic#3161, so we can just focalize in getting 11.10.1 to work.

@traversaro
Copy link
Contributor Author

Working setup.bat:

@echo off
set HOME=%HOMEDRIVE%%HOMEPATH%
set GAZEBO_MASTER_URI=http://localhost:11345
set GAZEBO_MODEL_DATABASE_URI=http://models.gazebosim.org
set GAZEBO_RESOURCE_PATH=C:/Users/STraversaro/AppData/Local/mambaforge/envs/gazebo11091\Library\share\gazebo-11;%GAZEBO_RESOURCE_PATH%
set GAZEBO_PLUGIN_PATH=C:/Users/STraversaro/AppData/Local/mambaforge/envs/gazebo11091\Library\bin\gazebo-11\plugins;%GAZEBO_PLUGIN_PATH%
set GAZEBO_MODEL_PATH=C:/Users/STraversaro/AppData/Local/mambaforge/envs/gazebo11091\Library\share\gazebo-11\models;%GAZEBO_MODEL_PATH%
set LD_LIBRARY_PATH=%LD_LIBRARY_PATH%;C:/Users/STraversaro/AppData/Local/mambaforge/envs/gazebo11091\Library\bin\gazebo-11\plugins
set OGRE_RESOURCE_PATH=C:/Users/STraversaro/AppData/Local/mambaforge/envs/gazebo11091\Library\bin
set PATH=%LD_LIBRARY_PATH%;%PATH%

Non-working one:

@echo off
set HOME=%HOMEDRIVE%%HOMEPATH%
set GAZEBO_MASTER_URI=http://localhost:11345
set GAZEBO_MODEL_DATABASE_URI=http://models.gazebosim.org
set GAZEBO_RESOURCE_PATH=C:/Users/STraversaro/AppData/Local/mambaforge/envs/gazebo11101/Library/share/gazebo-11;%GAZEBO_RESOURCE_PATH%
set GAZEBO_PLUGIN_PATH=C:/Users/STraversaro/AppData/Local/mambaforge/envs/gazebo11101/Library/bin/gazebo-11/plugins;%GAZEBO_PLUGIN_PATH%
set GAZEBO_MODEL_PATH=C:/Users/STraversaro/AppData/Local/mambaforge/envs/gazebo11101/Library/share/gazebo-11/models;%GAZEBO_MODEL_PATH%
set LD_LIBRARY_PATH=%LD_LIBRARY_PATH%;C:/Users/STraversaro/AppData/Local/mambaforge/envs/gazebo11101/Library/bin/gazebo-11/plugins
set OGRE_RESOURCE_PATH=D:\bld\gazebo_1642729896000\_h_env\Library\bin
set PATH=%LD_LIBRARY_PATH%;%PATH%

In the latter case, the initial part of OGRE_RESOURCE_PATH is not correctly relocated.

@traversaro
Copy link
Contributor Author

I opened the setup.bat in the package before being installed.

Working:

@echo off
set HOME=%HOMEDRIVE%%HOMEPATH%
set GAZEBO_MASTER_URI=http://localhost:11345
set GAZEBO_MODEL_DATABASE_URI=http://models.gazebosim.org
set GAZEBO_RESOURCE_PATH=D:\bld\gazebo_1639424301851\_h_env\Library\share\gazebo-11;%GAZEBO_RESOURCE_PATH%
set GAZEBO_PLUGIN_PATH=D:\bld\gazebo_1639424301851\_h_env\Library\bin\gazebo-11\plugins;%GAZEBO_PLUGIN_PATH%
set GAZEBO_MODEL_PATH=D:\bld\gazebo_1639424301851\_h_env\Library\share\gazebo-11\models;%GAZEBO_MODEL_PATH%
set LD_LIBRARY_PATH=%LD_LIBRARY_PATH%;D:\bld\gazebo_1639424301851\_h_env\Library\bin\gazebo-11\plugins
set OGRE_RESOURCE_PATH=D:\bld\gazebo_1639424301851\_h_env\Library\bin
set PATH=%LD_LIBRARY_PATH%;%PATH%

Not Working:

@echo off
set HOME=%HOMEDRIVE%%HOMEPATH%
set GAZEBO_MASTER_URI=http://localhost:11345
set GAZEBO_MODEL_DATABASE_URI=http://models.gazebosim.org
set GAZEBO_RESOURCE_PATH=D:/bld/gazebo_1642729896000/_h_env/Library/share/gazebo-11;%GAZEBO_RESOURCE_PATH%
set GAZEBO_PLUGIN_PATH=D:/bld/gazebo_1642729896000/_h_env/Library/bin/gazebo-11/plugins;%GAZEBO_PLUGIN_PATH%
set GAZEBO_MODEL_PATH=D:/bld/gazebo_1642729896000/_h_env/Library/share/gazebo-11/models;%GAZEBO_MODEL_PATH%
set LD_LIBRARY_PATH=%LD_LIBRARY_PATH%;D:/bld/gazebo_1642729896000/_h_env/Library/bin/gazebo-11/plugins
set OGRE_RESOURCE_PATH=D:\bld\gazebo_1642729896000\_h_env\Library\bin
set PATH=%LD_LIBRARY_PATH%;%PATH%

The problem in the non-working one seems to be that now the initial path between the different variables is different, I guess this is confusing the relocation logic, regardless of wheter it make more sense to use \ or / in the setup.bat script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant