-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
80 lines (62 loc) · 2.03 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
cmake_minimum_required(VERSION 2.8.3)
project(fdcc)
find_package(Boost REQUIRED
system
filesystem
date_time
thread)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
roslib
cmake_modules
geometry_msgs
sensor_msgs
std_msgs
message_generation
tf
)
add_message_files(
FILES
fdcc_state.msg
fdcc_forces.msg
FDCCForceCommandMsg.msg
)
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
std_msgs
##actionlib_msgs
#geometry_msgs
#std_msgs
)
# We need to add the project source path to the CMake module path so that
# the FindRBDL.cmake script can be found.
LIST( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR} )
# RBDL
FIND_PACKAGE (RBDL COMPONENTS URDFReader REQUIRED)
catkin_package(
INCLUDE_DIRS src include
LIBRARIES ${Boost_LIBRARIES} ${RBDL_LIBRARY} yaml-cpp
CATKIN_DEPENDS message_runtime geometry_msgs roscpp rospy std_msgs
DEPENDS system_lib boost Eigen RBDL
)
# Eigen
find_package(Eigen REQUIRED)
include_directories(SYSTEM ${Boost_INCLUDE_DIR} ${EIGEN_INCLUDE_DIRS} ${RBDL_INCLUDE_DIRS})
include_directories(include ${catkin_INCLUDE_DIRS})
link_directories(${catkin_LIBRARY_DIRS})
install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY config DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
# Add library
add_library(FDCC src/fdcc.cpp)
target_link_libraries(FDCC ${catkin_LIBRARIES} ${RBDL_LIBRARY} ${RBDL_URDFReader_LIBRARY})
# Add library
add_library(PID src/pid_controller.cpp)
target_link_libraries(PID ${catkin_LIBRARIES})
# Add executable
add_executable(FDCC_node src/main.cpp)
target_link_libraries(FDCC_node FDCC PID ${catkin_LIBRARIES} ${RBDL_LIBRARY} ${RBDL_URDFReader_LIBRARY} yaml-cpp)
add_dependencies(FDCC_node FDCC PID ${catkin_EXPORTED_TARGETS})
add_executable(RBDL_example src/example.cpp)
target_link_libraries(RBDL_example ${catkin_LIBRARIES} ${RBDL_LIBRARY})