代码拉取完成,页面将自动刷新
cmake_minimum_required(VERSION 2.8.3)
project(hdl_graph_slam)
# -mavx causes a lot of errors!!
add_definitions(-std=c++11 -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2)
set(CMAKE_CXX_FLAGS "-std=c++11 -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/cmake")
# pcl 1.7 causes a segfault when it is built with debug mode
set(CMAKE_BUILD_TYPE "RELEASE")
find_package(catkin REQUIRED COMPONENTS
roscpp
pcl_ros
geodesy
nmea_msgs
sensor_msgs
message_generation
interactive_markers
ndt_omp
)
find_package(PCL 1.7 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
message(STATUS "PCL_INCLUDE_DIRS:" ${PCL_INCLUDE_DIRS})
message(STATUS "PCL_LIBRARY_DIRS:" ${PCL_LIBRARY_DIRS})
message(STATUS "PCL_DEFINITIONS:" ${PCL_DEFINITIONS})
find_package(G2O REQUIRED)
include_directories(SYSTEM ${G2O_INCLUDE_DIR} ${G2O_INCLUDE_DIRS})
link_directories(${G2O_LIBRARY_DIRS})
# link_libraries(${G2O_LIBRARIES})
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
########################
## message generation ##
########################
add_message_files(FILES
FloorCoeffs.msg
)
add_service_files(FILES
SaveMap.srv
DumpGraph.srv
)
generate_messages(DEPENDENCIES std_msgs)
###################################
## catkin specific configuration ##
###################################
catkin_package(
INCLUDE_DIRS include
LIBRARIES hdl_graph_slam_nodelet
# CATKIN_DEPENDS pcl_ros roscpp sensor_msgs
# DEPENDS system_lib
)
###########
## Build ##
###########
include_directories(include)
include_directories(
${PCL_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)
# nodelets
add_library(prefiltering_nodelet apps/prefiltering_nodelet.cpp)
target_link_libraries(prefiltering_nodelet
${catkin_LIBRARIES}
${PCL_LIBRARIES}
)
add_library(floor_detection_nodelet apps/floor_detection_nodelet.cpp)
target_link_libraries(floor_detection_nodelet
${catkin_LIBRARIES}
${PCL_LIBRARIES}
)
add_dependencies(floor_detection_nodelet ${PROJECT_NAME}_gencpp)
add_library(scan_matching_odometry_nodelet
apps/scan_matching_odometry_nodelet.cpp
src/hdl_graph_slam/registrations.cpp
)
target_link_libraries(scan_matching_odometry_nodelet
${catkin_LIBRARIES}
${PCL_LIBRARIES}
)
add_library(hdl_graph_slam_nodelet
apps/hdl_graph_slam_nodelet.cpp
src/hdl_graph_slam/graph_slam.cpp
src/hdl_graph_slam/keyframe.cpp
src/hdl_graph_slam/map_cloud_generator.cpp
src/hdl_graph_slam/registrations.cpp
src/hdl_graph_slam/information_matrix_calculator.cpp
src/g2o/robust_kernel_io.cpp
)
target_link_libraries(hdl_graph_slam_nodelet
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${G2O_TYPES_DATA}
${G2O_CORE_LIBRARY}
${G2O_STUFF_LIBRARY}
${G2O_SOLVER_PCG}
${G2O_SOLVER_CSPARSE}
${G2O_SOLVER_CHOLMOD}
${G2O_TYPES_SLAM3D}
${G2O_TYPES_SLAM3D_ADDONS}
)
add_dependencies(hdl_graph_slam_nodelet ${PROJECT_NAME}_gencpp)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。