cartographer icon indicating copy to clipboard operation
cartographer copied to clipboard

error when install cartographer on ubuntu 20.04 and Ros noetic absl::make_unique<ceres::AutoDiffLocalParameterization<

Open Hanifwj opened this issue 2 years ago • 4 comments

root@ubuntu:/home/gaosm/Downloads/cartographer/cartographer/build# ninja [10/385] cd /home/gaosm/Downloads/cartographer/cartographer/build &...ome/gaosm/Downloads/cartographer/cartographer/build/AllFiles.cmake" Files /home/gaosm/Downloads/cartographer/cartographer/build/AllFiles.cmake and - differ [111/385] Building CXX object CMakeFiles/cartographer.dir/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.cc.o FAILED: CMakeFiles/cartographer.dir/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.cc.o /usr/bin/c++ -DGFLAGS_IS_A_DLL=0 -I/home/gaosm/Downloads/cartographer/cartographer/build -isystem /usr/local/include/eigen3 -isystem /home/gaosm/Downloads/cartographer/cartographer -isystem /usr/include/lua5.2 -O3 -DNDEBUG -pthread -fPIC -Wall -Wpedantic -Werror=format-security -Werror=missing-braces -Werror=reorder -Werror=return-type -Werror=switch -Werror=uninitialized -O3 -DNDEBUG -std=gnu++1z -MD -MT CMakeFiles/cartographer.dir/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.cc.o -MF CMakeFiles/cartographer.dir/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.cc.o.d -o CMakeFiles/cartographer.dir/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.cc.o -c /home/gaosm/Downloads/cartographer/cartographer/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.cc /home/gaosm/Downloads/cartographer/cartographer/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.cc: In member function ‘void cartographer::mapping::scan_matching::CeresScanMatcher3D::Match(const Vector3d&, const Rigid3d&, const std::vectorcartographer::mapping::scan_matching::PointCloudAndHybridGridsPointers&, cartographer::transform::Rigid3d*, ceres::Solver::Summary*) const’: /home/gaosm/Downloads/cartographer/cartographer/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.cc:102:42: error: ‘AutoDiffLocalParameterization’ is not a member of ‘ceres’ absl::make_unique<ceres::AutoDiffLocalParameterization< ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/gaosm/Downloads/cartographer/cartographer/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.cc:102:42: note: suggested alternative: ‘LocalParameterization’ absl::make_unique<ceres::AutoDiffLocalParameterization< ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LocalParameterization /home/gaosm/Downloads/cartographer/cartographer/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.cc:102:23: error: parse error in template argument list absl::make_unique<ceres::AutoDiffLocalParameterization< ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ YawOnlyQuaternionPlus, 4, 1>>()) ~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/gaosm/Downloads/cartographer/cartographer/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.cc:101:58: error: expected primary-expression before ‘(’ token ? std::unique_ptrceres::LocalParameterization( ^ /home/gaosm/Downloads/cartographer/cartographer/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.cc:103:51: error: expected primary-expression before ‘)’ token YawOnlyQuaternionPlus, 4, 1>>()) ^ /home/gaosm/Downloads/cartographer/cartographer/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.cc:105:42: error: ‘QuaternionParameterization’ is not a member of ‘ceres’ absl::make_uniqueceres::QuaternionParameterization()), ^~~~~~~~~~~~~~~~~~~~~~~~~~ /home/gaosm/Downloads/cartographer/cartographer/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.cc:105:42: note: suggested alternative: ‘QuaternionToRotation’ absl::make_uniqueceres::QuaternionParameterization()), ^~~~~~~~~~~~~~~~~~~~~~~~~~ QuaternionToRotation /home/gaosm/Downloads/cartographer/cartographer/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.cc:105:70: error: no matching function for call to ‘make_unique< >()’ absl::make_uniqueceres::QuaternionParameterization()), ^ In file included from /usr/include/c++/7/memory:80:0, from /home/gaosm/Downloads/cartographer/cartographer/cartographer/common/lua_parameter_dictionary.h:21, from /home/gaosm/Downloads/cartographer/cartographer/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.h:24, from /home/gaosm/Downloads/cartographer/cartographer/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.cc:17: /usr/include/c++/7/bits/unique_ptr.h:832:5: note: candidate: template<class _Tp, class ... _Args> typename std::_MakeUniq<_Tp>::__invalid_type std::make_unique(_Args&& ...) make_unique(_Args&&...) = delete; ^~~~~~~~~~~ /usr/include/c++/7/bits/unique_ptr.h:832:5: note: template argument deduction/substitution failed: /home/gaosm/Downloads/cartographer/cartographer/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.cc:105:70: error: template argument 1 is invalid absl::make_uniqueceres::QuaternionParameterization()), ^ In file included from /usr/include/c++/7/memory:80:0, from /home/gaosm/Downloads/cartographer/cartographer/cartographer/common/lua_parameter_dictionary.h:21, from /home/gaosm/Downloads/cartographer/cartographer/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.h:24, from /home/gaosm/Downloads/cartographer/cartographer/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.cc:17: /usr/include/c++/7/bits/unique_ptr.h:826:5: note: candidate: template<class _Tp> typename std::_MakeUniq<_Tp>::__array std::make_unique(std::size_t) make_unique(size_t __num) ^~~~~~~~~~~ /usr/include/c++/7/bits/unique_ptr.h:826:5: note: template argument deduction/substitution failed: /home/gaosm/Downloads/cartographer/cartographer/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.cc:105:70: error: template argument 1 is invalid absl::make_uniqueceres::QuaternionParameterization()), ^ In file included from /usr/include/c++/7/memory:80:0, from /home/gaosm/Downloads/cartographer/cartographer/cartographer/common/lua_parameter_dictionary.h:21, from /home/gaosm/Downloads/cartographer/cartographer/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.h:24, from /home/gaosm/Downloads/cartographer/cartographer/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.cc:17: /usr/include/c++/7/bits/unique_ptr.h:820:5: note: candidate: template<class _Tp, class ... _Args> typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) make_unique(_Args&&... __args) ^~~~~~~~~~~ /usr/include/c++/7/bits/unique_ptr.h:820:5: note: template argument deduction/substitution failed: /home/gaosm/Downloads/cartographer/cartographer/cartographer/mapping/internal/3d/scan_matching/ceres_scan_matcher_3d.cc:105:70: error: template argument 1 is invalid absl::make_uniqueceres::QuaternionParameterization()),

Hanifwj avatar Sep 22 '22 01:09 Hanifwj

I'm having the same problem as you, I'm using Ubuntu 20.04 and ros noetic. Is there any solution for this problem ?

Hanifwj avatar Sep 22 '22 01:09 Hanifwj

solution is just not Install ceres-solver lastest because have same bug, I can solve problem using ceres-solver version 1.14

Weje26 avatar Sep 28 '22 16:09 Weje26

I have same issue ...

ingjae avatar Jan 04 '23 11:01 ingjae

I solve this problem

I had this problem because I build and make install ceres-solver manually just

cd {ceres-solver-build} 
sudo make uninstall 

and I reinstall dependancy

rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y

if you have error like below

ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies: cartographer: [libabsl-dev] defined as "not available" for OS version [focal] 

follow https://github.com/cartographer-project/cartographer_ros/issues/1726

ingjae avatar Jan 04 '23 11:01 ingjae