Open fengyikawhi opened 2 years ago
Maybe you need to compile with the correct version like 2.0.0 of Ceres-solver.
Maybe you need to compile with the correct version like 2.0.0 of Ceres-solver.
I have installed Ceres2.0.0 when build cartographer, but it was in the workspace of cartographer, does it matter?
Maybe you need to compile with the correct version like 2.0.0 of Ceres-solver.
I have installed Ceres2.0.0 when build cartographer, but it was in the workspace of cartographer, does it matter?
Yes, in your case the compiler will only compile imu_utils
with ceres-solver in the default path.
There are 2 ways to solve this problem:
imu_utils
;CMakeLists.txt
(Suggested methods). You can locate CeresConfig.cmake
using command locate
:$ sudo updatedb
$ locate CeresConfig.cmake
Find the installation path for Ceres-Solver 2.0, like /home/robot/Libraries/Install/Ceres/2.0.0/lib/cmake/Ceres/CeresConfig.cmake
.
Then add following line in CMakeLists.txt:
...
find_package(OpenCV REQUIRED)
# HACK add here
# HACK begin
set(Ceres_DIR "/home/robot/Libraries/Install/Ceres/2.0.0/lib/cmake/Ceres/CeresConfig.cmake")
# HACK end
find_package(Ceres REQUIRED)
find_package(Eigen3 REQUIRED)
Be sure clean folders build
and devel
in this ROS worksapce and then re-build it by catkin_make
. In this way gcc/g++ will use you specified ceres-solver.
Hi,I meet the same problem but the error still exits after I follow your second way to solve the problem:
I install the ceres under my /opt and here is the output of my locate CeresConfig.cmake
:
and I have add set the path of ceres in the CMakeLists.txt:
so why dose it not work and is this means I have to re-compile the ceres under my ros workspace?
error: no type named ‘Parameters’ in ‘class ceres::internal::ParameterDims<false, 5>’ 315 | using Parameters = typename ParameterDims::Parameters; | ^::Apply(parameters,
| ::Apply(
|
~~~~~ /home/slam/cartographer_ws/install_isolated/include/ceres/internal/autodiff.h:348:47: error: no type named ‘Parameters’ in ‘class ceres::internal::ParameterDims<false, 5>’ 348 | Make1stOrderPerturbations~~~~~~~~~~^~~~~~ 349 | parameters_as_jets.data()); |~~~~~~ /home/slam/cartographer_ws/install_isolated/include/ceres/internal/autodiff.h:357:39: error: no type named ‘Parameters’ in ‘class ceres::internal::ParameterDims<false, 5>’ 357 | Take1stOrderParts~~~~~~~~^ 358 | num_outputs, residuals_as_jets.data(), jacobians); |~~~~~~~~~~~~~