RobotecAI / RGLGazeboPlugin

Other
61 stars 11 forks source link

Test Simulation Crashing #12

Closed namanmalik-ari closed 1 year ago

namanmalik-ari commented 1 year ago

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 commented 1 year ago

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:

Please let me know if it works for you.

namanmalik-ari commented 1 year ago

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

adamsj-ros commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

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