|
| 1 | +# Troubleshooting |
| 2 | + |
| 3 | +## Ignition libraries are not found |
| 4 | +If you see this error message: |
| 5 | + |
| 6 | +```bash |
| 7 | +I cannot find any available 'ign' command: |
| 8 | + * Did you install any ignition library? |
| 9 | + * Did you set the IGN_CONFIG_PATH environment variable? |
| 10 | + E.g.: export IGN_CONFIG_PATH=$HOME/local/share/ignition |
| 11 | +``` |
| 12 | + |
| 13 | +You should set up the environment variable `IGN_CONFIG_PATH=/usr/local/share/ignition/` |
| 14 | + |
| 15 | + |
| 16 | +## macOS |
| 17 | + |
| 18 | +### Unable to find `urdf_model.h` error |
| 19 | +After installing all the dependencies and starting the build process, you may encounter an error that looks like this: |
| 20 | + |
| 21 | +```bash |
| 22 | +/Users/user/fortress_ws/src/sdformat/src/parser_urdf.cc:30:10: fatal error: 'urdf_model/model.h' file not found |
| 23 | +#include <urdf_model/model.h> |
| 24 | + ^~~~~~~~~~~~~~~~~~~~ |
| 25 | +1 error generated. |
| 26 | +make[2]: *** [src/CMakeFiles/sdformat9.dir/parser_urdf.cc.o] Error 1 |
| 27 | +make[1]: *** [src/CMakeFiles/sdformat9.dir/all] Error 2 |
| 28 | +make: *** [all] Error 2 |
| 29 | +Failed <<< sdformat9 [ Exited with code 2 ] |
| 30 | +``` |
| 31 | + |
| 32 | +First check if `urdfdom` and `urdfdom_headers` are installed by running: |
| 33 | + |
| 34 | +```bash |
| 35 | +brew install urdfdom urdfdom_headers |
| 36 | +``` |
| 37 | + |
| 38 | +Then if the error persists, compile with the internal version of `urdfdom` by running: |
| 39 | + |
| 40 | +```bash |
| 41 | +colcon build --cmake-args -DUSE_INTERNAL_URDF=ON --merge-install |
| 42 | +``` |
| 43 | + |
| 44 | +This command will ignore the system installation of `urdfdom` and use the internal version instead. |
| 45 | + |
| 46 | +### Unable to load .dylib file |
| 47 | +When running the `ign gazebo -s` command, an error like the one below may show up: |
| 48 | + |
| 49 | +```bash |
| 50 | +Error while loading the library [/Users/fortress/fortress_ws/install/lib//libignition-physics2-dartsim-plugin.2.dylib]: dlopen(/Users/fortress/fortress_ws/install/lib//libignition-physics2-dartsim-plugin.2.dylib, 5): Library not loaded: @rpath/libIrrXML.dylib |
| 51 | + Referenced from: /usr/local/opt/assimp/lib/libassimp.5.dylib |
| 52 | + Reason: image not found |
| 53 | +[Err] [Physics.cc:275] Unable to load the /Users/fortress/fortress_ws/install/lib//libignition-physics2-dartsim-plugin.2.dylib library. |
| 54 | +Escalating to SIGKILL on [Ignition Gazebo Server] |
| 55 | +``` |
| 56 | +
|
| 57 | +The issue is related to OSX System Integrity Protection (SIP). The workaround is to run `ign` with a different ruby then make sure that ruby is loaded. |
| 58 | +
|
| 59 | +```bash |
| 60 | +brew install ruby |
| 61 | + |
| 62 | +# Add the following to ~/.bashrc |
| 63 | +export PATH=/usr/local/Cellar/ruby/2.6.5/bin:$PATH |
| 64 | + |
| 65 | +# Source ~/.bashrc in terminal |
| 66 | +. ~/.bashrc |
| 67 | +``` |
| 68 | +
|
| 69 | +### No rule to make target `'/usr/lib/libm.dylib', needed by 'lib/libignition-physics3-dartsim-plugin.3.1.0.dylib'. Stop.` |
| 70 | +Try to run `brew outdated` followed by a `brew upgrade` may fix some of it. |
| 71 | +
|
| 72 | +
|
| 73 | +## Ubuntu |
| 74 | +
|
| 75 | +### Out of memory issues |
| 76 | +
|
| 77 | +There can be out of memory issue during the compilation of Gazebo, especially during |
| 78 | +compilation of gz-physics. To prevent out of memory issues you can restrict the number of jobs: |
| 79 | +
|
| 80 | +```bash |
| 81 | +MAKEFLAGS="-j<Number of jobs> " colcon build --executor sequential |
| 82 | +``` |
| 83 | +
|
| 84 | +### Problems with dual Intel and Nvidia GPU systems |
| 85 | +
|
| 86 | +If you are using a dual Intel/Nvidia system it could be the case that the |
| 87 | +simulator is being run under Intel instead of using the Nvidia GPU. Bugs can |
| 88 | +vary but there could problems with shadows, incorrect laser scans or other |
| 89 | +rendering related issues. |
| 90 | +
|
| 91 | +#### prime-select command line tool |
| 92 | +
|
| 93 | +Hybrid Intel/Nvidia systems can be configured using the command line tool prime-select. |
| 94 | +One option is to use always Nvidia: |
| 95 | +
|
| 96 | + sudo prime-select nvidia |
| 97 | + # logout user session and login again |
| 98 | +
|
| 99 | +Other option is to configure the render offload for OpenGL applications to use |
| 100 | +Nvidia. This means that your X screen and all normal applications are handled |
| 101 | +by the Intel GPU, but all OpenGL applications that you start from the terminal |
| 102 | +(including Gazebo) are rendered on the Nvidia GPU. |
| 103 | +
|
| 104 | + # place the lines in your .bashrc if you want the change to be permanent |
| 105 | + export __NV_PRIME_RENDER_OFFLOAD=1 |
| 106 | + export __GLX_VENDOR_LIBRARY_NAME=nvidia |
| 107 | + # logout user session and login again |
| 108 | +
|
| 109 | +#### nvidia-settings GUI tool |
| 110 | +
|
| 111 | +nvidia-settings is a GUI program that helps to configure the options for the Nvidia |
| 112 | +graphic cards and includes some controls for hybrid Intel/Nvidia: |
| 113 | +
|
| 114 | +The section "PRIME Profiles" can be used to select that the Nvidia card controls |
| 115 | +all the GUI applications by selecting "NVIDIA (Performance Mode)". |
| 116 | +
|
| 117 | +The "Application Profiles" can control the use of the Nvidia GPU per application. |
| 118 | +
|
| 119 | +### Unable to create the rendering window |
| 120 | +If you're getting errors like "Unable to create the rendering window", it could |
| 121 | +mean you're using an old OpenGL version. Ignition Gazebo uses the Ogre 2 |
| 122 | +rendering engine by default, which requires an OpenGL version higher than 3.3. |
| 123 | +
|
| 124 | +This can be confirmed by checking the Ogre 2 logs at `~/.ignition/rendering/ogre2.log`, |
| 125 | +which should have an error like: |
| 126 | +
|
| 127 | + "OGRE EXCEPTION(3:RenderingAPIException): OpenGL 3.3 is not supported. Please update your graphics card drivers." |
| 128 | +
|
| 129 | +You can also check your OpenGL version running: |
| 130 | +
|
| 131 | + glxinfo | grep "OpenGL version" |
| 132 | +
|
| 133 | +You should be able to use Ogre 1 without any issues however. You can check if |
| 134 | +that's working by running a world which uses Ogre 1 instead of Ogre 2, such as: |
| 135 | +
|
| 136 | + ign gazebo -v 3 lights.sdf |
| 137 | +
|
| 138 | +If that loads, you can continue to use Ignition with Ogre 1, just use the |
| 139 | +`--render-engine ogre` option. |
| 140 | +
|
| 141 | +To enable Ogre 2 support, you'll need to update your computer's OpenGL version. |
| 142 | +As suggested on the Ogre logs, this may require updating your graphics card |
| 143 | +drivers. |
| 144 | +
|
| 145 | +The Ogre 2 debs from the osrfoundation repository are built from a fork of |
| 146 | +Ogre's `v2-1` branch with changes needed for deb packaging and allowing it to |
| 147 | +be co-installable with Ogre 1.x. The code can be found here: |
| 148 | +
|
| 149 | +https://github.com/osrf/ogre-2.1-release |
| 150 | +
|
| 151 | +
|
| 152 | +## Windows |
| 153 | +
|
| 154 | +### VisualStudioVersion is not set, please run within a Visual Studio Command Prompt. |
| 155 | +When you try to compile Ignition you might see an error in your prompt like: |
| 156 | +
|
| 157 | + VisualStudioVersion is not set, please run within a Visual Studio Command Prompt. |
| 158 | +
|
| 159 | +In this case execute one of the following commands: |
| 160 | + - CMD |
| 161 | +```bash |
| 162 | + "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 |
| 163 | +``` |
| 164 | +
|
| 165 | + - PowerShell: |
| 166 | +```bash |
| 167 | +pushd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools" |
| 168 | +cmd /c "VsDevCmd.bat&set" | |
| 169 | +foreach { |
| 170 | + if ($_ -match "=") { |
| 171 | + $v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])" |
| 172 | + } |
| 173 | +} |
| 174 | +popd |
| 175 | +``` |
0 commit comments