-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
131 lines (116 loc) · 3.09 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
cmake_minimum_required(VERSION 3.10)
project(smac_planner)
find_package(catkin REQUIRED COMPONENTS
roscpp
dynamic_reconfigure
visualization_msgs
mbf_costmap_core
nav_msgs
nav_msgs
geometry_msgs
tf2_ros
costmap_2d
base_local_planner
pluginlib
angles
eigen_conversions
)
find_package(ompl REQUIRED)
generate_dynamic_reconfigure_options(
cfg/SmacPlannerHybrid.cfg
cfg/Smoother.cfg
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME} # TODO ${PROJECT_NAME}_2d ${PROJECT_NAME}_lattice
CATKIN_DEPENDS roscpp dynamic_reconfigure visualization_msgs mbf_costmap_core nav_msgs nav_msgs geometry_msgs tf2_ros costmap_2d base_local_planner pluginlib angles
)
include_directories(
include
${catkin_INCLUDE_DIRS}
${OMPL_INCLUDE_DIRS}
)
set(library_name ${PROJECT_NAME})
# Hybrid plugin
add_library(${library_name} SHARED
src/smac_planner_hybrid.cpp
src/a_star.cpp
src/collision_checker.cpp
src/smoother.cpp
src/analytic_expansion.cpp
src/node_hybrid.cpp
src/node_lattice.cpp
src/costmap_downsampler.cpp
src/node_2d.cpp
src/node_basic.cpp
)
target_link_libraries(${library_name}
${catkin_LIBRARIES}
${OMPL_LIBRARIES}
)
add_dependencies(${library_name}
${PROJECT_NAME}_gencfg
)
# TODO 2D plugin
#add_library(${library_name}_2d SHARED
# src/smac_planner_2d.cpp
# src/a_star.cpp
# src/smoother.cpp
# src/collision_checker.cpp
# src/analytic_expansion.cpp
# src/node_hybrid.cpp
# src/node_lattice.cpp
# src/costmap_downsampler.cpp
# src/node_2d.cpp
# src/node_basic.cpp
#)
#
#target_link_libraries(${library_name}_2d
# ${catkin_LIBRARIES}
# ${OMPL_LIBRARIES}
#)
#
#add_dependencies(${library_name}_2d
# ${PROJECT_NAME}_gencfg
#)
#
## TODO Lattice plugin
#add_library(${library_name}_lattice SHARED
# src/smac_planner_lattice.cpp
# src/a_star.cpp
# src/smoother.cpp
# src/collision_checker.cpp
# src/analytic_expansion.cpp
# src/node_hybrid.cpp
# src/node_lattice.cpp
# src/costmap_downsampler.cpp
# src/node_2d.cpp
# src/node_basic.cpp
#)
#
#target_link_libraries(${library_name}_lattice
# ${catkin_LIBRARIES}
# ${OMPL_LIBRARIES}
#)
#
#add_dependencies(${library_name}_lattice
# ${PROJECT_NAME}_gencfg
#)
install(TARGETS ${library_name} # ${library_name}_2d ${library_name}_lattice
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)
install(DIRECTORY include/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
install(FILES smac_plugin_hybrid.xml # smac_plugin_2d.xml smac_plugin_lattice.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
# TODO
#install(DIRECTORY lattice_primitives/sample_primitives
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
#)
# TODO
#if(CATKIN_ENABLE_TESTING)
# find_package(rostest REQUIRED)
# add_subdirectory(test)
#endif()