-
Notifications
You must be signed in to change notification settings - Fork 17
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
26 changed files
with
1,902 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,77 @@ | ||
cmake_minimum_required(VERSION 2.8.3) | ||
project(map_conversion) | ||
|
||
SET(CMAKE_BUILD_TYPE "Release") | ||
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall") | ||
add_compile_options(-std=c++11) | ||
add_definitions(-std=c++11) | ||
|
||
find_package(catkin REQUIRED COMPONENTS | ||
roscpp | ||
rospy | ||
std_msgs | ||
pcl_ros | ||
geometry_msgs | ||
tf | ||
eigen_conversions | ||
) | ||
|
||
set(ALL_TARGET_LIBRARIES "") | ||
|
||
# find_package(gflags REQUIRED) | ||
|
||
include(cmake/glog.cmake) | ||
include(cmake/PCL.cmake) | ||
include(cmake/eigen.cmake) | ||
include(cmake/yaml.cmake) | ||
|
||
include_directories( include | ||
${catkin_INCLUDE_DIRS} | ||
) | ||
|
||
include(cmake/global_defination.cmake) | ||
catkin_package() | ||
|
||
file(GLOB_RECURSE ALL_SRCS "*.cpp") | ||
file(GLOB_RECURSE NODE_SRCS "src/*_node.cpp") | ||
list(REMOVE_ITEM ALL_SRCS ${NODE_SRCS}) | ||
|
||
add_executable(local_environment_node src/app/local_environment_node.cpp ${ALL_SRCS}) | ||
add_dependencies(local_environment_node ${catkin_EXPORTED_TARGETS}) | ||
target_link_libraries(local_environment_node ${catkin_LIBRARIES} ${ALL_TARGET_LIBRARIES} gflags yaml-cpp) | ||
|
||
add_executable(global_submap_node src/app/global_submap_node.cpp ${ALL_SRCS}) | ||
add_dependencies(global_submap_node ${catkin_EXPORTED_TARGETS}) | ||
target_link_libraries(global_submap_node ${catkin_LIBRARIES} ${ALL_TARGET_LIBRARIES} gflags yaml-cpp) | ||
|
||
install(TARGETS | ||
local_environment_node | ||
global_submap_node | ||
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
) | ||
|
||
## Mark cpp header files for installation | ||
install(DIRECTORY | ||
include/ | ||
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} | ||
FILES_MATCHING PATTERN "*.h" | ||
PATTERN ".svn" EXCLUDE | ||
) | ||
|
||
## Mark other directories for installation: | ||
install(DIRECTORY | ||
launch/ | ||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch | ||
FILES_MATCHING PATTERN "*.launch" | ||
) | ||
install(DIRECTORY | ||
config/ | ||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/config | ||
FILES_MATCHING PATTERN "*.yaml" | ||
) | ||
install(DIRECTORY | ||
rviz/ | ||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/rviz | ||
FILES_MATCHING PATTERN "*.rviz" | ||
) | ||
|
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,5 @@ | ||
find_package(PCL 1.7 REQUIRED) | ||
list(REMOVE_ITEM PCL_LIBRARIES "vtkproj4") | ||
|
||
include_directories(${PCL_INCLUDE_DIRS}) | ||
list(APPEND ALL_TARGET_LIBRARIES ${PCL_LIBRARIES}) |
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,2 @@ | ||
set(Eigen3_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR}) | ||
include_directories( ${Eigen3_INCLUDE_DIRS} ) |
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,5 @@ | ||
set(WORK_SPACE_PATH ${PROJECT_SOURCE_DIR}) | ||
configure_file ( | ||
${PROJECT_SOURCE_DIR}/include/${PROJECT_NAME}/global_defination/global_defination.h.in | ||
${PROJECT_BINARY_DIR}/include/${PROJECT_NAME}/global_defination/global_defination.h) | ||
include_directories(${PROJECT_BINARY_DIR}/include) |
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,40 @@ | ||
include(FindPackageHandleStandardArgs) | ||
|
||
set(GLOG_ROOT_DIR "" CACHE PATH "Folder contains Google glog") | ||
|
||
if(WIN32) | ||
find_path(GLOG_INCLUDE_DIR glog/logging.h | ||
PATHS ${GLOG_ROOT_DIR}/src/windows) | ||
else() | ||
find_path(GLOG_INCLUDE_DIR glog/logging.h | ||
PATHS ${GLOG_ROOT_DIR}) | ||
endif() | ||
|
||
if(MSVC) | ||
find_library(GLOG_LIBRARY_RELEASE libglog_static | ||
PATHS ${GLOG_ROOT_DIR} | ||
PATH_SUFFIXES Release) | ||
|
||
find_library(GLOG_LIBRARY_DEBUG libglog_static | ||
PATHS ${GLOG_ROOT_DIR} | ||
PATH_SUFFIXES Debug) | ||
|
||
set(GLOG_LIBRARY optimized ${GLOG_LIBRARY_RELEASE} debug ${GLOG_LIBRARY_DEBUG}) | ||
else() | ||
find_library(GLOG_LIBRARY glog | ||
PATHS ${GLOG_ROOT_DIR} | ||
PATH_SUFFIXES lib lib64) | ||
endif() | ||
|
||
find_package_handle_standard_args(Glog DEFAULT_MSG GLOG_INCLUDE_DIR GLOG_LIBRARY) | ||
|
||
if(GLOG_FOUND) | ||
set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIR}) | ||
set(GLOG_LIBRARIES ${GLOG_LIBRARY}) | ||
message(STATUS "Found glog (include: ${GLOG_INCLUDE_DIR}, library: ${GLOG_LIBRARY})") | ||
mark_as_advanced(GLOG_ROOT_DIR GLOG_LIBRARY_RELEASE GLOG_LIBRARY_DEBUG | ||
GLOG_LIBRARY GLOG_INCLUDE_DIR) | ||
endif() | ||
|
||
include_directories(${GLOG_INCLUDE_DIRS}) | ||
list(APPEND ALL_TARGET_LIBRARIES ${GLOG_LIBRARIES}) |
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,2 @@ | ||
find_package(yaml-cpp REQUIRED) | ||
include_directories( ${YAML_CPP_INCLUDE_DIR}) |
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,8 @@ | ||
%YAML:1.0 | ||
|
||
Global_file_directory: "/home/qjs/cloudGlobal.pcd" #全局地图文件位置 | ||
local_cloud_frame: "/velodyne_cloud_registered" #局部雷达原始帧话题 (/laser_cloud_map) | ||
global_z: "0" #这两个参数是调整栅格地图的Z轴直通滤波的范围 | ||
local_z: "0.27" | ||
|
||
|
Oops, something went wrong.