forked from siyuanfeng/jimmy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
139 lines (107 loc) · 3.92 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
132
133
134
135
136
137
138
139
cmake_minimum_required(VERSION 2.8.3)
project(jimmy)
find_package(orocos_kdl REQUIRED)
find_package(catkin REQUIRED COMPONENTS geometry_msgs
roscpp
rospy
roslib
tf
std_msgs
sensor_msgs
cv_bridge
image_transport
message_generation
rosserial_arduino rosserial_client
)
# Find OpenNI
find_package(PkgConfig)
pkg_check_modules(OpenNI REQUIRED libopenni)
#Find GLUT
find_package(GLUT REQUIRED)
add_message_files(
DIRECTORY
msg
FILES
jimmy_command.msg
jimmy_gesture.msg
jimmy_servo.msg
jimmy_servo_nums.msg
pointerpos.msg
)
generate_messages(
DEPENDENCIES
geometry_msgs
std_msgs
sensor_msgs
)
catkin_package(
CATKIN_DEPENDS message_runtime std_msgs sensor_msgs)
include_directories(${catkin_INCLUDEDIR}
${OpenNI_INCLUDEDIR}
${orocos_kdl_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${OpenGL_INCLUDE_DIRS}
${GLUT_LIBRARIES})
include_directories("nite/Include")
include_directories("nite/Source/XnCommon")
include_directories("${PROJECT_SOURCE_DIR}/include/jimmy")
link_directories("${PROJECT_SOURCE_DIR}/lib")
add_library(jimmylib SHARED "src/IK.cpp" "src/lipm_planner.cpp" "src/Plan.cpp" "src/SDModel_common.cpp" "src/Jimmy.cpp" "src/Logger.cpp" "src/RobotState.cpp" "src/TrajEW.cpp" "src/mrdplot.c" "src/sdlib.c" "src/ControlUtils.cpp")
set_target_properties(jimmylib PROPERTIES COMPILE_FLAGS "-O4")
link_directories(${catkin_LIBRARY_DIRS})
link_directories(${orocos_kdl_LIBRARY_DIRS}
${GLUT_LIBRARIES}
)
add_executable(test_jimmy src/JimmyWalkMain.cpp)
add_dependencies(test_jimmy geometry_msgs_gencpp ${PROJECT_NAME}_generate_messages_cpp)
target_link_libraries(test_jimmy
${catkin_LIBRARIES}
jimmylib rt dxl) #dxl
add_executable(jimmy_servos src/jimmy_servos.cpp)
add_dependencies(jimmy_servos geometry_msgs_gencpp ${PROJECT_NAME}_generate_messages_cpp)
target_link_libraries(jimmy_servos
${catkin_LIBRARIES}
jimmylib rt dxl) #dxl
add_executable(jimmy_gestures src/jimmy_gestures.cpp)
add_dependencies(jimmy_gestures geometry_msgs_gencpp ${PROJECT_NAME}_generate_messages_cpp)
target_link_libraries(jimmy_gestures
${catkin_LIBRARIES}
jimmylib rt dxl) #dxl
add_executable(test_send_gestures src/test_send_gesture_cmd.cpp)
add_dependencies(test_send_gestures geometry_msgs_gencpp ${PROJECT_NAME}_generate_messages_cpp)
target_link_libraries(test_send_gestures
${catkin_LIBRARIES}
jimmylib rt dxl) #dxl
add_executable(jimmy_wave src/SingleControl/main.cpp)
add_dependencies(jimmy_wave geometry_msgs_gencpp ${PROJECT_NAME}_generate_messages_cpp)
target_link_libraries(jimmy_wave ${catkin_LIBRARIES}
${OpenNI_LIBRARIES}
${orocos_kdl_LIBRARIES}
${OpenGL_INCLUDE_DIRS} -lXnVNite_1_5_2)
add_executable(test_send_servo_cmd src/test_send_servo_cmd.cpp)
add_dependencies(test_send_servo_cmd geometry_msgs_gencpp ${PROJECT_NAME}_generate_messages_cpp)
target_link_libraries(test_send_servo_cmd
${catkin_LIBRARIES}
jimmylib rt dxl) #dxl
#add_executable(testmsg src/SingleControl/test_msg.cpp)
#add_dependencies(testmsg geometry_msgs_gencpp ${PROJECT_NAME}_generate_messages_cpp ${PROJECT_NAME}_generate_messages_py)
#target_link_libraries(testmsg ${catkin_LIBRARIES})
#rosserial_generate_ros_lib(
# PACKAGE rosserial_arduino
#SCRIPT make_libraries.py
#)
#rosserial_configure_client(
# DIRECTORY firmware
# TOOLCHAIN_FILE ${ROSSERIAL_ARDUINO_TOOLCHAIN}
#)
#rosserial_add_client_target(firmware hello ALL)
#rosserial_add_client_target(firmware hello-upload)
install(TARGETS test_jimmy jimmy_servos test_send_gestures test_send_servo_cmd jimmy_gestures jimmy_wave
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
PATTERN ".svn" EXCLUDE)
install(FILES jimmy.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})