Support for MRPT 1.9.9 (new includes after MRPT lib refactoring)

This commit is contained in:
jgmonroy
2018-01-16 14:30:46 +01:00
parent 7d91aed999
commit 485a6deed2
2 changed files with 17 additions and 4 deletions

View File

@@ -18,7 +18,18 @@ find_package(catkin REQUIRED COMPONENTS
find_package(Boost REQUIRED COMPONENTS system)
find_package(cmake_modules REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(MRPT REQUIRED base obs maps slam)
find_package(MRPT REQUIRED)
MESSAGE(STATUS "Found MRPT: " ${MRPT_VERSION})
IF(MRPT_VERSION VERSION_LESS 1.9.9)
# MRPT<2.0
find_package(MRPT REQUIRED base obs maps slam)
ELSE()
# MRPT>=2.0
find_package(MRPT REQUIRED obs maps slam poses core)
ENDIF()
#include_directories(${MRPT_INCLUDE_DIRS})
#MESSAGE( STATUS "MRPT_INCLUDE_DIRS: " ${MRPT_INCLUDE_DIRS})
#link_directories(${MRPT_LIBRARY_DIRS})
@@ -50,6 +61,7 @@ include_directories(
${catkin_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${EIGEN_INCLUDE_DIRS}
${MRPT_INCLUDE_DIRS}
)
## Declare a cpp executable

View File

@@ -26,13 +26,15 @@
// MRPT related headers
#include <mrpt/version.h>
#if MRPT_VERSION>=0x130
# include <mrpt/obs/CObservation2DRangeScan.h>
# include <mrpt/obs/CObservationOdometry.h>
#include <mrpt/obs/CObservation2DRangeScan.h>
#include <mrpt/obs/CObservationOdometry.h>
#include <mrpt/utils/CTicTac.h>
using namespace mrpt::obs;
#else
# include <mrpt/slam/CObservation2DRangeScan.h>
# include <mrpt/slam/CObservationOdometry.h>
using namespace mrpt::slam;
#include <mrpt/utils.h>
#endif
#if MRPT_VERSION<0x150
@@ -41,7 +43,6 @@
#include <mrpt/system/os.h>
#include <mrpt/poses/CPose3D.h>
#include <mrpt/utils.h>
#include <mrpt/opengl.h>
#include <mrpt/math/CHistogram.h>