1
$\begingroup$

I am trying to visualize a point cloud of the lidar so I used the file in the Gazebo Garden tutorials (link: https://gazebosim.org/docs/garden/sen...) and I added these two lines for the Vsiualize Lidar plugin

<plugin filename="gui/libVisualizeLidar.so" 
     name="gz::sim::v7::VisualizeLidar">
</plugin>

but when I run the simulation, I get a segmentation fault that looks like this:

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on 
Wayland anyway.
Stack trace (most recent call last):
#31   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7fa3b9eea327, in 
#30   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7fa3ba07f31c, in rb_vm_exec
#29   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7fa3ba079ca6, in 
#28   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7fa3ba076fd5, in 
#27   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7fa3ba074c44, in 
#26   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7fa3b9fc0a2e, in 
#25   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7fa3b9eeb9bc, in rb_protect
#24   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7fa3ba083c71, in rb_yield
#23   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7fa3ba07f31c, in rb_vm_exec
#22   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7fa3ba079ca6, in 
#21   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7fa3ba076fd5, in 
#20   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7fa3ba074c44, in 
#19   Object "/usr/lib/x86_64-linux-gnu/ruby/3.0.0/fiddle.so", at 0x7fa3b566444b, in 
#18   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7fa3ba042098, in rb_nogvl
#17   Object "/usr/lib/x86_64-linux-gnu/ruby/3.0.0/fiddle.so", at 0x7fa3b5663d6b, in 
#16   Object "/lib/x86_64-linux-gnu/libffi.so.8", at 0x7fa3b5603492, in 
#15   Object "/lib/x86_64-linux-gnu/libffi.so.8", at 0x7fa3b5606e2d, in 
#14   Object "/home/mariam/workspace/install/lib/libgz-sim7-gz.so.7.1.0", at 0x7fa3b4b56957, 
in runServer
#13   Object "/home/mariam/workspace/install/lib/libgz-sim7.so.7", at 0x7fa3b47a2b59, in 
gz::sim::v7::Server::Server(gz::sim::v7::ServerConfig const&)
#12   Object "/home/mariam/workspace/install/lib/libgz-sim7.so.7", at 0x7fa3b47b00ba, in 
#11   Object "/home/mariam/workspace/install/lib/libgz-sim7.so.7", at 0x7fa3b47c11a7, in 
gz::sim::v7::SimulationRunner::SimulationRunner(sdf::v13::World const*, 
std::shared_ptr<gz::sim::v7::SystemLoader> 
const&, gz::sim::v7::ServerConfig const&)
#10   Object "/home/mariam/workspace/install/lib/libgz-sim7.so.7", at 0x7fa3b473dded, in 
gz::sim::v7::LevelManager::LevelManager(gz::sim::v7::SimulationRunner*, bool)
#9    Object "/home/mariam/workspace/install/lib/libgz-sim7.so.7", at 0x7fa3b473c8a1, in 
gz::sim::v7::LevelManager::ReadLevelPerformerInfo()
#8    Object "/home/mariam/workspace/install/lib/libgz-sim7.so.7", at 0x7fa3b4747c16, in void 
gz::common::EventT<void (unsigned long, std::vector<sdf::v13::Plugin, 
std::allocator<sdf::v13::Plugin> >), 
gz::sim::v7::events::LoadPluginsTag>::Signal<unsigned long&, std::vector<sdf::v13::Plugin, 
std::allocator<sdf::v13::Plugin> > const&>(unsigned long&, std::vector<sdf::v13::Plugin, 
std::allocator<sdf::v13::Plugin> > const&)
#7    Object "/home/mariam/workspace/install/lib/libgz-sim7.so.7", at 0x7fa3b47ba618, in 
gz::sim::v7::SimulationRunner::LoadPlugins(unsigned long, std::vector<sdf::v13::Plugin, 
std::allocator<sdf::v13::Plugin> > const&)
#6    Object "/home/mariam/workspace/install/lib/libgz-sim7.so.7", at 0x7fa3b47d64d4, in 
gz::sim::v7::SystemManager::LoadPlugin(unsigned long, sdf::v13::Plugin const&)
#5    Object "/home/mariam/workspace/install/lib/libgz-sim7.so.7", at 0x7fa3b47ce7cf, in 
gz::sim::v7::SystemLoader::LoadPlugin(sdf::v13::Plugin const&)
#4    Object "/home/mariam/workspace/install/lib/libgz-plugin2.so.2", at 0x7fa3b1ba9e5c, in 
gz::plugin::Plugin::~Plugin()
#3    Object "/home/mariam/workspace/install/lib/libgz-plugin2.so.2", at 0x7fa3b1ba9d61, in 
gz::plugin::Plugin::~Plugin()
#2    Object "/home/mariam/workspace/install/lib/libgz-plugin2.so.2", at 0x7fa3b1bab013, in 
gz::plugin::PluginWithDlHandle::~PluginWithDlHandle()
#1    Object "/home/mariam/workspace/install/lib/gz-sim-7/plugins/gui/libVisualizeLidar.so", 
at 0x7fa38f0feb98, in 
std::_Function_handler<void (void*), gz::plugin::detail::MakeInfo<gz::sim::v7::VisualizeLidar, 
gz::gui::Plugin>():: 
{lambda(void*)#2}>::_M_invoke(std::_Any_data const&, void*&&)
#0    Object "/home/mariam/workspace/install/lib/gz-sim-7/plugins/gui/libVisualizeLidar.so", 
at 0x7fa38f0ef3f0, in 
gz::sim::v7::VisualizeLidar::~VisualizeLidar()
Segmentation fault (Address not mapped to object [(nil)])

I am using Gazebo garden (installed from source by following this tutorial https://gazebosim.org/docs/garden/install_ubuntu_src) and I'm running it on ubuntu 22.04 on VMware

Any idea what's the problem ?

Thanks!

$\endgroup$
2
  • $\begingroup$ Seg faults are often in a binary and compatibility issue. Please edit your question to provide information about how you set up your workspace to make sure that all your binaries are up to date and synchronized. It would be best for helping you to provide full information how to reproduce your environment with the error. $\endgroup$
    – Tully
    Nov 30, 2022 at 18:43
  • $\begingroup$ edited the question. Thank you $\endgroup$
    – mh1309
    Dec 1, 2022 at 16:03

1 Answer 1

2
$\begingroup$

you should include these lines inside the <gui> tag

            <plugin filename="VisualizeLidar" name="Visualize Lidar">
            </plugin>

You can also load the plugin using the right top browser menu:

enter image description here

$\endgroup$
1
  • $\begingroup$ It worked. Thank you! $\endgroup$
    – mh1309
    Dec 5, 2022 at 10:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.