Rviz plugin failed to load
Hello,
I am using ROS 2 Galactic and I am trying to build a ROS2 RViz plugin.
You can find my code here: https://github.com/HarunTeper/AuNa/tree/demo/src/auna_rviz_plugins
You can install the plugin using the following commands: git clone git@github.com:HarunTeper/AuNa.git cd AuNa git checkout demo colcon build --symlink-install --packages-select aunarvizplugins source install/setup.bash ros2 run rviz2 rviz2
After trying to add the aunarvizplugins/ControlPanel plugin, I get the following error:
[ERROR] [1686607478.494055489] [rviz2]: PluginlibFactory: The plugin for class 'ControlPanel' failed to load. Error: Failed to load library /home/vboxuser/AuNa/install/aunarvizplugins/lib/libaunarvizplugins.so. Make sure that you are calling the PLUGINLIBEXPORTCLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library dlopen error: /home/vboxuser/AuNa/install/aunarvizplugins/lib/libaunarvizplugins.so: undefined symbol: ZTVN17aunarvizplugins12ControlPanelE, at /tmp/binarydeb/ros-galactic-rcutils-4.0.4/src/sharedlibrary.c:99
I tried many different configurations, copying from the Nav2 rviz plugins, and even successfully implemented other plugins in different packages before in the same way. However, Rviz cannot seem to load the libraries that I defined.
What do I need to change in my package for Rviz to successfully load the plugin?
Asked by HarunTeper on 2023-06-12 17:10:26 UTC
Comments