-
Notifications
You must be signed in to change notification settings - Fork 7
/
CMakeLists.txt
118 lines (96 loc) · 4.29 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
cmake_minimum_required(VERSION 2.8.3)
project(generic_control_toolbox)
find_package(
catkin REQUIRED COMPONENTS
rosbag
roscpp
rospy
actionlib
geometry_msgs
visualization_msgs
cmake_modules
eigen_conversions
kdl_parser
sensor_msgs
tf_conversions
realtime_tools
hardware_interface
controller_interface
tf
)
catkin_python_setup()
add_definitions(-std=c++11)
link_directories(${catkin_LIBRARY_DIRS})
add_message_files(
FILES
ArmInfo.msg
)
# add_action_files(
# DIRECTORY action
# FILES
# )
generate_messages(
DEPENDENCIES
actionlib_msgs
geometry_msgs
)
catkin_package(
CATKIN_DEPENDS rosbag roscpp rospy actionlib geometry_msgs visualization_msgs
cmake_modules eigen_conversions kdl_parser sensor_msgs
tf_conversions realtime_tools hardware_interface
controller_interface tf
INCLUDE_DIRS include
LIBRARIES matrix_parser kdl_manager wrench_manager controller_template
marker_manager controller_action_node ros_control_interface
bag_manager tf_manager joint_position_integrator
)
include_directories(
include
${catkin_INCLUDE_DIRS}
)
add_library(bag_manager src/bag_manager.cpp)
target_link_libraries(bag_manager ${catkin_LIBRARIES})
add_dependencies(bag_manager ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
add_library(matrix_parser src/matrix_parser.cpp)
target_link_libraries(matrix_parser ${catkin_LIBRARIES})
add_dependencies(matrix_parser ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
add_library(kdl_manager src/kdl_manager.cpp src/manager_base.cpp src/matrix_parser.cpp)
target_link_libraries(kdl_manager ${catkin_LIBRARIES})
add_dependencies(kdl_manager ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
add_library(wrench_manager src/wrench_manager.cpp src/manager_base.cpp)
target_link_libraries(wrench_manager ${catkin_LIBRARIES})
add_dependencies(wrench_manager ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
add_library(marker_manager src/marker_manager.cpp)
target_link_libraries(marker_manager ${catkin_LIBRARIES})
add_dependencies(marker_manager ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
add_library(controller_template src/controller_template.cpp src/bag_manager.cpp)
target_link_libraries(controller_template ${catkin_LIBRARIES})
add_dependencies(controller_template ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
add_library(controller_action_node src/controller_action_node.cpp)
target_link_libraries(controller_action_node ${catkin_LIBRARIES})
add_dependencies(controller_action_node ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
add_library(ros_control_interface src/ros_control_interface.cpp)
target_link_libraries(ros_control_interface ${catkin_LIBRARIES})
add_dependencies(ros_control_interface ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
add_library(tf_manager src/tf_manager.cpp)
target_link_libraries(tf_manager ${catkin_LIBRARIES})
add_dependencies(tf_manager ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
add_library(joint_position_integrator src/joint_position_integrator.cpp)
target_link_libraries(joint_position_integrator ${catkin_LIBRARIES})
add_dependencies(joint_position_integrator ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
install(PROGRAMS src/generic_control_toolbox/manage_actionlib.py DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
if (CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)
add_rostest_gtest(test_joint_position_integrator
test/ros_tests/joint_position_integrator.test
test/ros_tests/test_joint_position_integrator.cpp
src/joint_position_integrator.cpp)
target_link_libraries(test_joint_position_integrator ${catkin_LIBRARIES})
add_dependencies(test_joint_position_integrator ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
add_rostest_gtest(test_matrix_parser
test/ros_tests/matrix_parser.test
test/ros_tests/test_matrix_parser.cpp
src/joint_position_integrator.cpp)
target_link_libraries(test_matrix_parser matrix_parser ${catkin_LIBRARIES})
add_dependencies(test_matrix_parser ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
endif()