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

Test Simulation Crashing #12

Closed
namanmalik-ari opened this issue Apr 4, 2023 · 5 comments
Closed

Test Simulation Crashing #12

namanmalik-ari opened this issue Apr 4, 2023 · 5 comments

Comments

@namanmalik-ari
Copy link

Hi,
So excited to see a new lidar plugin available in the Gazebo sphere. I have been meaning to try out the plugin but got a speed bump in the process.
I have installed all the dependencies as mentioned in the Readme, Downloaded all 4 shared libraries from the releases, added them in their respective gazebo paths and gave them executable permissions. But for some reason both the test simulations crashes as soon as I add RGL Visualize in the Gazebo GUI throwing this exception:

terminate called after throwing an instance of 'Ogre::RenderingAPIException'
what(): OGRE EXCEPTION(3:RenderingAPIException): Vertex Program PointCloudVS_GLSL failed to compile. See compile log >above for details. in GLSLShader::compile at /build/ogre-next-UFfg83/ogre-next->2.2.5+dfsg3/RenderSystems/GL3Plus/src/GLSL/OgreGLSLShader.cpp (line 311)
Stack trace (most recent call last) in thread 44113:
#10 Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in
#9 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7fc2adf269ff, in
#8 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7fc2ade94b42, in
#7 Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fc2a769199d, in
#6 Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fc2a768ff90, in qTerminate()
#5 Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7fc2a96ae2b6, in std::terminate()
#4 Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7fc2a96ae24b, in
#3 Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7fc2a96a2bbd, in
#2 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7fc2ade287f2, in abort
#1 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7fc2ade42475, in raise
#0 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7fc2ade96a7c, in pthread_kill
Aborted (Signal sent by tkill() 44010 1000)

Peek 2023-04-04 10-52

Am I missing some steps or dependencies that are needed to be installed or is there a bug in the libRGLVisualize.so library since I am not getting any error while launching the simulation so it should be able to find and load the libraries successfully.

@msz-rai
Copy link
Contributor

msz-rai commented Apr 4, 2023

Hi @namanmalik-ari
Thank you for the report.
I've encountered this error before. You have to configure the gazebo to render using the GPU screen. It could be accomplished by:

  • adding two environment variables before the command:
    __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia <your-command>
  • switching to NVIDIA graphics driver libraries with prime-select tool (reboot required). By default, it is set to on-demand in which the system selects libraries to render automatically (not always correctly).
    sudo prime-select nvidia

Please let me know if it works for you.

@namanmalik-ari
Copy link
Author

Thanks a lot, that worked just fine. I guess, I forgot to switch to the the nvidia-drivers.

@adamsj-ros
Copy link

Today when I ran it I got the same error again. I tried __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia ign gazebo sonoma_with_rgl.sdf and that worked.

Here are some other instructions for PopOS.

https://support.system76.com/articles/graphics-switch-pop/

It seems to use prime-select I need to install nvidia-prime but I get this error when I try that:

sudo apt-get install nvidia-prime

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 pop-desktop : PreDepends: pop-de-gnome but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

So I'll probably just use the environment options for now.

@jeychandar
Copy link

@adamsj-ros I have bashrc like this

export GAZEBO_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/ign-gazebo-6/plugins:${GAZEBO_PLUGIN_PATH}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/x86_64-linux-gnu/ign-gazebo-6/plugins
export IGN_GAZEBO_SYSTEM_PLUGIN_PATH=/home/praveen/simulatorcheck/src/RGLGazeboPlugin/install/RGLServerPlugin:$IGN_GAZEBO_SYSTEM_PLUGIN_PATH
export IGN_GUI_PLUGIN_PATH=/home/praveen/simulatorcheck/src/RGLGazeboPlugin/install/RGLVisualize:$IGN_GUI_PLUGIN_PATH
export OGRE_RESOURCE_PATH=/usr/lib/x86_64-linux-gnu/OGRE-1.9.0

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia ign gazebo sonoma_with_rgl.sdf
when i try to run this command gazebo gui is not responding without offload again there is no visualization. Could you help me out!. Thanks in advance.

image

@jeychandar
Copy link

@adamsj-ros Yesterday when I tried it worked but now it is not.
image

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

No branches or pull requests

4 participants