MIT-SPARK / Kimera-VIO-ROS

ROS wrapper for Kimera-VIO
BSD 2-Clause "Simplified" License
362 stars 150 forks source link

Compilation error Kimera_RPGO #185

Open jlunsan opened 1 year ago

jlunsan commented 1 year ago

Description:

I am trying to build in Ubuntu 18 and I obtain the following error in Kimera_RPGO:

Command:

catkin build

Console output:


/usr/include/boost/smart_ptr/shared_ptr.hpp:898:42: note: template argument deduction/substitution failed:
In file included from /home/javier/kimera_ws/src/Kimera-RPGO/src/RobustSolver.cpp:22:0:
/home/javier/kimera_ws/src/Kimera-RPGO/include/KimeraRPGO/outlier/Pcm.h:394:68: note: ‘std::shared_ptrgtsam::NonlinearFactor’ is not derived from ‘const boost::shared_ptr’
*boost::dynamic_pointer_cast<gtsam::PriorFactor>(factor);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
In file included from /usr/include/boost/shared_ptr.hpp:17:0,
from /usr/include/boost/date_time/gregorian/greg_month.hpp:14,
from /usr/include/boost/date_time/gregorian/greg_ymd.hpp:16,
from /usr/include/boost/date_time/gregorian/greg_calendar.hpp:17,
from /usr/include/boost/date_time/gregorian/gregorian_types.hpp:19,
from /usr/include/boost/date_time/posix_time/posix_time_config.hpp:18,
from /usr/include/boost/date_time/posix_time/posix_time_system.hpp:13,
from /usr/include/boost/date_time/posix_time/ptime.hpp:12,
from /usr/include/boost/date_time/posix_time/posix_time.hpp:15,
from /home/javier/kimera_ws/devel/include/gtsam/nonlinear/LevenbergMarquardtOptimizer.h:26,
from /home/javier/kimera_ws/devel/include/gtsam/nonlinear/GncParams.h:29,
from /home/javier/kimera_ws/devel/include/gtsam/nonlinear/GncOptimizer.h:29,
from /home/javier/kimera_ws/src/Kimera-RPGO/include/KimeraRPGO/RobustSolver.h:17,
from /home/javier/kimera_ws/src/Kimera-RPGO/src/RobustSolver.cpp:6:
/usr/include/boost/smart_ptr/shared_ptr.hpp:940:42: note: candidate: template<class T, class U> boost::shared_ptr boost::dynamic_pointer_cast(boost::shared_ptr&&)
template<class T, class U> shared_ptr dynamic_pointer_cast( shared_ptr && r ) BOOST_SP_NOEXCEPT
^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/smart_ptr/shared_ptr.hpp:940:42: note: template argument deduction/substitution failed:
In file included from /home/javier/kimera_ws/src/Kimera-RPGO/src/RobustSolver.cpp:22:0:
/home/javier/kimera_ws/src/Kimera-RPGO/include/KimeraRPGO/outlier/Pcm.h:394:68: note: ‘std::shared_ptrgtsam::NonlinearFactor’ is not derived from ‘boost::shared_ptr’
*boost::dynamic_pointer_cast<gtsam::PriorFactor>(factor);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
make[2]: *** [CMakeFiles/KimeraRPGO.dir/src/RobustSolver.cpp.o] Error 1
make[1]: *** [CMakeFiles/KimeraRPGO.dir/all] Error 2

Additional files: Please attach all the files needed to reproduce the error.

Please give also the following information: