osrf / subt

This repostory contains software for the virtual track of the DARPA SubT Challenge. Within this repository you will find Gazebo simulation assets, ROS interfaces, support scripts and plugins, and documentation needed to compete in the SubT Virtual Challenge.
Other
305 stars 98 forks source link

Problem with 3D-Lidar in Headless mode in VirtualBox #302

Closed osrf-migration closed 4 years ago

osrf-migration commented 4 years ago

Original report (archived issue) by Sophisticated Engineering (Bitbucket: sopheng).


I found a way to do some tests on a Notebook without a NVIDIA- / Cuda-Graphics card by using the Headless mode in a VirtualBox virtual machine. Unfortunately not all configurations work. It seems that Configurations with 3D-Lidar are not working.
Using the configuration X2_SENSOR_CONFIG_6 with command

ign launch -v 4 urban_circuit.ign worldName:=simple_urban_01 headless:=true robotName1:=X2n1 robotConfig1:=X2_SENSOR_CONFIG_6

(using a catkin-workspace installation) results in the abort:

[Msg] Loaded level [48]
[Msg] Loaded level [49]
[Msg] Publishing laser scans on [world/simple_urban_01/model/X2n1/link/base_link/sensor/front_laser/scan]
terminate called after throwing an instance of 'Ogre::RenderingAPIException'
  what():  OGRE EXCEPTION(3:RenderingAPIException): Zero sized texture surface on texture X2n1::base_link::front_laser_samplerTex face 0 mipmap 0. The GL driver probably refused to create the texture. in GL3PlusTexture::_createSurfaceList at /var/lib/jenkins/workspace/ogre-2.1-debbuilder/repo/RenderSystems/GL3Plus/src/OgreGL3PlusTexture.cpp (line 516)
Stack trace (most recent call last) in thread 4697:
#24   Object "", at 0xffffffffffffffff, in 
#23   Source "/build/glibc-OTsEL5/glibc-2.27/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S", line 95, in  [0x7fb58ed3b88e]
#22   Source "/build/glibc-OTsEL5/glibc-2.27/nptl/pthread_create.c", line 463, in start_thread [0x7fb58ea026da]
#21   Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7fb58b2d366e, in std::error_code::default_error_condition() const
#20   Object "/usr/lib/x86_64-linux-gnu/ign-gazebo-2/plugins/libignition-gazebo-sensors-system.so", at 0x7fb55a57f46f, in ignition::gazebo::v2::systems::SensorsPrivate::RenderThread()
#19   Object "/usr/lib/x86_64-linux-gnu/ign-gazebo-2/plugins/libignition-gazebo-sensors-system.so", at 0x7fb55a57f2c4, in ignition::gazebo::v2::systems::SensorsPrivate::RunOnce()
#18   Object "/usr/lib/x86_64-linux-gnu/libignition-rendering2.so.2", at 0x7fb56b170b1b, in ignition::rendering::v2::BaseScene::PreRender()
#17   Object "/usr/lib/x86_64-linux-gnu/libignition-rendering2-ogre2.so", at 0x7fb54296cf65, in ignition::rendering::v2::BaseVisual<ignition::rendering::v2::Ogre2Node>::PreRender()
#16   Object "/usr/lib/x86_64-linux-gnu/libignition-rendering2-ogre2.so", at 0x7fb54296e931, in ignition::rendering::v2::BaseVisual<ignition::rendering::v2::Ogre2Node>::PreRenderChildren()
#15   Object "/usr/lib/x86_64-linux-gnu/libignition-rendering2-ogre2.so", at 0x7fb54296cf65, in ignition::rendering::v2::BaseVisual<ignition::rendering::v2::Ogre2Node>::PreRender()
#14   Object "/usr/lib/x86_64-linux-gnu/libignition-rendering2-ogre2.so", at 0x7fb54296e931, in ignition::rendering::v2::BaseVisual<ignition::rendering::v2::Ogre2Node>::PreRenderChildren()
#13   Object "/usr/lib/x86_64-linux-gnu/libignition-rendering2-ogre2.so", at 0x7fb54296cf65, in ignition::rendering::v2::BaseVisual<ignition::rendering::v2::Ogre2Node>::PreRender()
#12   Object "/usr/lib/x86_64-linux-gnu/libignition-rendering2-ogre2.so", at 0x7fb54296e931, in ignition::rendering::v2::BaseVisual<ignition::rendering::v2::Ogre2Node>::PreRenderChildren()
#11   Object "/usr/lib/x86_64-linux-gnu/libignition-rendering2-ogre2.so", at 0x7fb54297d560, in ignition::rendering::v2::Ogre2GpuRays::CreateGpuRaysTextures()
#10   Object "/usr/lib/x86_64-linux-gnu/libignition-rendering2-ogre2.so", at 0x7fb54297cc66, in ignition::rendering::v2::Ogre2GpuRays::CreateSampleTexture()
#9    Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.1.0", at 0x7fb54221aa64, in Ogre::TextureManager::createManual(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&, Ogre::TextureType, unsigned int, unsigned int, unsigned int, int, Ogre::PixelFormat, int, Ogre::ManualResourceLoader*, bool, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool)
#8    Object "/usr/lib/x86_64-linux-gnu/libOgreMain.so.2.1.0", at 0x7fb54221654c, in Ogre::Texture::createInternalResources()
#7    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.1/OGRE/RenderSystem_GL3Plus.so", at 0x7fb5281724b7, in Ogre::GL3PlusTexture::createInternalResourcesImpl()
#6    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.1/OGRE/RenderSystem_GL3Plus.so", at 0x7fb528171eed, in Ogre::GL3PlusTexture::_createSurfaceList()
#5    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7fb58b2a8d23, in __cxa_throw
#4    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7fb58b2a8af0, in std::terminate()
#3    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7fb58b2a8ab5, in std::rethrow_exception(std::__exception_ptr::exception_ptr)
#2    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7fb58b2a2956, in 
#1    Source "/build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c", line 79, in __GI_abort [0x7fb58ec5a800]
#0    Source "/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c", line 51, in __GI_raise [0x7fb58ec58e97]
Aborted (Signal sent by tkill() 4599 1000)
Aborted (core dumped)

Using the config X2_SENSOR_CONFIG_4 or X2_SENSOR_CONFIG_5 is running. And one can also see movement in rviz.

Does anybody has an idea how the problem with X2_SENSOR_CONFIG_6 can be fixed?

osrf-migration commented 4 years ago

Original comment by Alfredo Bencomo (Bitbucket: bencomo).


osrf-migration commented 4 years ago

Original comment by Martin Dlouhy (Bitbucket: robotikacz).


I do not know anything about this configuration but I would guess that it is the “GPU ray” we had to modify a year ago when running on non-GPU machine. Yes, and it may be no longer supported.

osrf-migration commented 4 years ago

Original comment by Alfredo Bencomo (Bitbucket: bencomo).


osrf-migration commented 4 years ago

Original comment by Sophisticated Engineering (Bitbucket: sopheng).


@Martin, that Sounds reasonable.

If the 3D-Lidar needs a GPU, it will be a problem to run it in VitrualBox.

osrf-migration commented 4 years ago

Original comment by Arthur Schang (Bitbucket: Arthur Schang).


You would need to replace all instances of gpu_ray with cpu_ray to run without a discrete GPU although I'm not sure cpu_ray generation is supported anymore.

The recommended setup (https://osrf-migration.github.io/subt-gh-pages/#!/osrf/subt/wiki/system_requirements) includes a discrete GPU.

osrf-migration commented 4 years ago

Original comment by Sophisticated Engineering (Bitbucket: sopheng).


Thank you very mych for the hint. I will give it a try.

osrf-migration commented 4 years ago

Original comment by Sophisticated Engineering (Bitbucket: sopheng).


Using ray instead of gpu_ray (not cpu_ray) avoided the error. So -> closed

Unfortunately the 3DLidar data were not diplayed (published). But that is another problem.

osrf-migration commented 4 years ago

Original comment by Zbyněk Winkler (Bitbucket: Zbyněk Winkler (robotika)).


A year ago we tried cpu_ray out of necessity but the results were significantly different from gpu_ray. After that experience we just got computers with nvidia gpus in order to have one less thing to worry about (since there are enough others to deal with).

osrf-migration commented 4 years ago

Original comment by Steven Gray (Bitbucket: stgray).


GPU ray returns hits on the visual model, while cpu ray uses the collision geometry. http://answers.gazebosim.org/question/19529/what-is-the-different-between-sdfs-gpu_ray-sensor-and-ray-sensor/

osrf-migration commented 4 years ago

Original comment by Ian Chen (Bitbucket: Ian Chen).


I remember seeing errors complaining that the gl texture format used by gpu ray sensor is not supported when testing on a machine that did not have a discrete gpu card.

The fix is likely to involve breaking changes in ign-rendering and ign-sensors so it may not make it into urban circuit. cc Alfredo Bencomo (bencomo)