-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
668 changed files
with
46,421 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "Linux", | ||
"includePath": [ | ||
"${workspaceFolder}/**" | ||
], | ||
"defines": [], | ||
"compilerPath": "/usr/bin/clang", | ||
"cStandard": "c17", | ||
"cppStandard": "c++14", | ||
"intelliSenseMode": "linux-clang-x64", | ||
"configurationProvider": "ms-vscode.cmake-tools" | ||
} | ||
], | ||
"version": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
cmake_minimum_required(VERSION 2.8.3) | ||
project(fast_lio_sam) | ||
|
||
# SET(CMAKE_BUILD_TYPE "Debug") | ||
|
||
ADD_COMPILE_OPTIONS(-std=c++14 ) | ||
ADD_COMPILE_OPTIONS(-std=c++14 ) | ||
# set( CMAKE_CXX_FLAGS "-std=c++14 -O3" ) | ||
|
||
add_definitions(-DROOT_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/\") | ||
|
||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions" ) | ||
set(CMAKE_CXX_STANDARD 14) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_CXX_EXTENSIONS OFF) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -pthread -std=c++0x -std=c++14 -fexceptions") | ||
|
||
message("Current CPU archtecture: ${CMAKE_SYSTEM_PROCESSOR}") | ||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)" ) | ||
include(ProcessorCount) | ||
ProcessorCount(N) | ||
message("Processer number: ${N}") | ||
if(N GREATER 4) | ||
add_definitions(-DMP_EN) | ||
add_definitions(-DMP_PROC_NUM=3) | ||
message("core for MP: 3") | ||
elseif(N GREATER 3) | ||
add_definitions(-DMP_EN) | ||
add_definitions(-DMP_PROC_NUM=2) | ||
message("core for MP: 2") | ||
else() | ||
add_definitions(-DMP_PROC_NUM=1) | ||
endif() | ||
else() | ||
add_definitions(-DMP_PROC_NUM=1) | ||
endif() | ||
|
||
find_package(OpenMP QUIET) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") | ||
|
||
find_package(PythonLibs REQUIRED) | ||
find_path(MATPLOTLIB_CPP_INCLUDE_DIRS "matplotlibcpp.h") | ||
|
||
find_package(OpenCV REQUIRED) | ||
|
||
find_package(catkin REQUIRED COMPONENTS | ||
geometry_msgs | ||
nav_msgs | ||
sensor_msgs | ||
roscpp | ||
rospy | ||
std_msgs | ||
pcl_ros | ||
tf | ||
livox_ros_driver | ||
message_generation | ||
eigen_conversions | ||
cv_bridge | ||
image_transport | ||
darknet_ros_msgs | ||
) | ||
|
||
find_package(Eigen3 REQUIRED) | ||
find_package(PCL REQUIRED) | ||
find_package (GeographicLib REQUIRED) | ||
|
||
find_package( GTSAMCMakeTools ) | ||
find_package(GTSAM REQUIRED QUIET) | ||
|
||
message(Eigen: ${EIGEN3_INCLUDE_DIR}) | ||
|
||
include_directories( | ||
${catkin_INCLUDE_DIRS} | ||
${EIGEN3_INCLUDE_DIR} | ||
${PCL_INCLUDE_DIRS} | ||
${PYTHON_INCLUDE_DIRS} | ||
${GTSAM_INCLUDE_DIR} | ||
${GeographicLib_INCLUDE_DIRS} | ||
include) | ||
|
||
# link directories | ||
# link_directories( | ||
# ${GTSAM_LIBRARY_DIRS} | ||
# ) | ||
|
||
add_message_files( | ||
FILES | ||
Pose6D.msg | ||
) | ||
|
||
add_service_files( | ||
DIRECTORY srv | ||
FILES | ||
save_map.srv | ||
save_pose.srv | ||
) | ||
|
||
generate_messages( | ||
DEPENDENCIES | ||
geometry_msgs | ||
) | ||
|
||
catkin_package( | ||
CATKIN_DEPENDS geometry_msgs nav_msgs roscpp rospy std_msgs message_runtime | ||
DEPENDS EIGEN3 PCL GTSAM | ||
INCLUDE_DIRS | ||
) | ||
|
||
# add_executable(fastlio_sam_mapping src/laserMapping.cpp include/ikd-Tree/ikd_Tree.cpp src/preprocess.cpp) | ||
# target_link_libraries(fastlio_sam_mapping ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${PYTHON_LIBRARIES}) | ||
# target_include_directories(fastlio_sam_mapping PRIVATE ${PYTHON_INCLUDE_DIRS}) | ||
|
||
add_library(ikd_Tree include/ikd-Tree/ikd_Tree.cpp) | ||
add_library(preprocess src/preprocess.cpp) | ||
add_executable(fastlio_sam_mapping src/laserMapping.cpp) | ||
target_link_libraries(fastlio_sam_mapping ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${PYTHON_LIBRARIES} ${GeographicLib_LIBRARIES} ikd_Tree preprocess gtsam) | ||
target_include_directories(fastlio_sam_mapping PRIVATE ${PYTHON_INCLUDE_DIRS}) |
Oops, something went wrong.