SteveMacenski / slam_toolbox

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

Supporting ceres-solver version 2.2 #726

Closed mark-bchoi closed 1 month ago

mark-bchoi commented 1 month ago

Feature description

As ceres-solver version was upgraded from 2.1 to 2.2, slam-toolbox have an issue for compiling.

/bchoi-build/tmp/work/armv8a-oe4t-linux/slam-toolbox/2.6.8-1/git/solvers/ceres_solver.cpp
| In file included from /home/bchoi/nvidia-yocto-bsp/bchoi-build/tmp/work/armv8a-oe4t-linux/slam-toolbox/2.6.8-1/git/solvers/ceres_solver.cpp:9:
| /home/bchoi/nvidia-yocto-bsp/bchoi-build/tmp/work/armv8a-oe4t-linux/slam-toolbox/2.6.8-1/git/solvers/ceres_solver.hpp:10:10: fatal error: ceres/local_parameterization.h: No such file or directory
|    10 | #include <ceres/local_parameterization.h>
|       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| compilation terminated.

So, I hope slam-toolbox will be upgraded to support ceres-solver version 2.2 also.

Implementation considerations

In my investigation, local_parameterization.h was removed by version 2.2 and recommend use Manifold instead of LocalParameterization.

BR, Mark

SteveMacenski commented 1 month ago

We support the Ceres version that is distributed with the operating system that aligns with REP 2000 (i.e. Ubuntu 22.04 for Humble, 24.04 for Jazzy). If you're using a non-standard configuration, we do not have explicit support for mixing and matching of arbitrary dependency versions.

If you want to add in some pre-processor macros for checking for the version of ceres for the proper API/includes, I'm happy to merge that to support 2.2 if it is the installed version.

mark-bchoi commented 1 month ago

@SteveMacenski Thanks for reply.

I downgraded ceres-solver version to 2.1.0. and have no issue now. By the way, as I know humble is LTS version would it be upgraded?

SteveMacenski commented 1 month ago

If it is not API/ABI compatible, then it would not be upgraded.

SteveMacenski commented 1 month ago

Closing as solution was found. If you need 2.2, you can open a PR to add its support with preprocessor macros to use the headers/objects for 2.2 if present - happy to review

mark-bchoi commented 1 month ago

@SteveMacenski , thanks for following up.