SteveMacenski / slam_toolbox

Slam Toolbox for lifelong mapping and localization in potentially massive maps with ROS
GNU Lesser General Public License v2.1
1.68k stars 525 forks source link

Loading SPA-Optimizer fails #489

Closed SvenKnabe closed 2 years ago

SvenKnabe commented 2 years ago

Steps to reproduce issue

Change solver_plugin to solver_plugins::SpaSolver Changes in CMakelist.txt

Actual behavior

[ INFO] [1649860256.319436981]: Node using stack size 2000000000 [DEBUG] [1649860256.364771685]: Attempting to create managed instance for class solver_plugins::SpaSolver. [DEBUG] [1649860256.364803569]: Class solver_plugins::SpaSolver maps to library libspa_solver_plugin in classesavailable. [DEBUG] [1649860256.364902417]: Iterating through all possible paths where libspa_solver_plugin could be located... [DEBUG] [1649860256.364920844]: Checking path /home/user/ros/catkin_ws/devel/lib/libspa_solver_plugin.so [DEBUG] [1649860256.364945330]: Library libspa_solver_plugin found at explicit path /home/user/ros/catkin_ws/devel/lib/libspa_solver_plugin.so. [FATAL] [1649860256.369000536]: Failed to create solver_plugins::SpaSolver, is it registered and built? Exception: Failed to load library /home/user/ros/catkin_ws/devel/lib/libspa_solver_plugin.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /home/robolab/ros/catkin_ws/devel/lib/libspa_solver_plugin.so: undefined symbol: _ZN14solver_plugins9SpaSolver10ModifyNodeERKiRKN5Eigen6MatrixIdLi3ELi1ELi0ELi3ELi1EEE). [slam_toolbox-8] process has died [pid 343246, exit code 1, cmd /home/user/ros/catkin_ws/devel/lib/slam_toolbox/async_slam_toolbox_node __name:=slam_toolbox __log:=/home/user/.ros/log/2d57ba7e-ad0b-11ec-8055-ebb828e855a2/slam_toolbox-8.log]. log file: /home/user/.ros/log/2d57ba7e-ad0b-11ec-8055-ebb828e855a2/slam_toolbox-8*.log

Additional information

With ceres Solver all works fine with my setup.

SteveMacenski commented 2 years ago

https://github.com/SteveMacenski/slam_toolbox/tree/noetic-devel/slam_toolbox/solvers/deprecated

Its in a directory labeled deprecated, it is deprecated and not supported / used anymore. It has not been updated in some time in changes of API and features to support graph removals and updates.