@@ -59,10 +59,15 @@ set(CXX_DISABLE_WERROR False)
59
59
set (CUSTOM_HEADER_DIR dynamic_graph_bridge )
60
60
set (${PROJECT_NAME} _HEADERS
61
61
include /dynamic_graph_bridge/ros_init.hh
62
- include /dynamic_graph_bridge/ros_interpreter.hh
63
62
include /dynamic_graph_bridge/sot_loader.hh
64
63
include /dynamic_graph_bridge/sot_loader_basic.hh
65
64
)
65
+
66
+ IF (BUILD_PYTHON_INTERFACE )
67
+ set (${PROJECT_NAME} _HEADERS ${${PROJECT_NAME}_HEADERS}
68
+ include /dynamic_graph_bridge/ros_interpreter.hh )
69
+ ENDIF (BUILD_PYTHON_INTERFACE )
70
+
66
71
SEARCH_FOR_EIGEN ()
67
72
SEARCH_FOR_BOOST ()
68
73
@@ -130,8 +135,19 @@ macro(compile_plugin NAME)
130
135
set_target_properties (${NAME} PROPERTIES BUILD_WITH_INSTALL_RPATH True )
131
136
set_target_properties (${NAME} PROPERTIES PREFIX "" )
132
137
install (TARGETS ${NAME} DESTINATION lib/plugin )
138
+ endmacro ()
139
+
140
+ # Build Sot Entities
141
+ set (listplugins ros_publish ros_subscribe ros_queued_subscribe ros_tf_listener ros_time )
142
+
143
+ foreach (aplugin ${listplugins} )
144
+ compile_plugin (${aplugin} )
145
+ endforeach ()
146
+
147
+ target_link_libraries (ros_publish ros_bridge )
133
148
134
- IF (BUILD_PYTHON_INTERFACE )
149
+ IF (BUILD_PYTHON_INTERFACE )
150
+ foreach (NAME ${listplugins} )
135
151
dynamic_graph_python_module ("ros/${NAME} "
136
152
${NAME}
137
153
ros/${NAME}/wrap
@@ -141,25 +157,10 @@ macro(compile_plugin NAME)
141
157
PKG_CONFIG_USE_DEPENDENCY (ros/${NAME}/wrap dynamic_graph )
142
158
PKG_CONFIG_USE_DEPENDENCY (ros/${NAME}/wrap sot-core )
143
159
PKG_CONFIG_USE_DEPENDENCY (ros/${NAME}/wrap dynamic_graph_bridge_msgs )
144
- ENDIF (BUILD_PYTHON_INTERFACE )
145
- endmacro ()
146
-
147
- # Build Sot Entities
148
- compile_plugin (ros_publish )
149
- compile_plugin (ros_subscribe )
150
- compile_plugin (ros_queued_subscribe )
151
- compile_plugin (ros_tf_listener )
152
- compile_plugin (ros_time )
153
- compile_plugin (ros_joint_state )
154
- pkg_config_use_dependency (ros_joint_state pinocchio )
155
-
156
- target_link_libraries (ros_joint_state "${DYNAMIC_GRAPH_PLUGINDIR} /dp-dynamic.so" )
157
- target_link_libraries (ros_publish ros_bridge )
160
+ endforeach ()
158
161
159
- # compile_plugin(robot_model)
162
+ # ros_interperter library.
160
163
161
- # ros_interperter library.
162
- IF (BUILD_PYTHON_INTERFACE )
163
164
add_library (ros_interpreter src/ros_interpreter.cpp )
164
165
pkg_config_use_dependency (ros_interpreter dynamic-graph )
165
166
pkg_config_use_dependency (ros_interpreter sot-core )
@@ -173,16 +174,6 @@ IF(BUILD_PYTHON_INTERFACE)
173
174
message (cmakeinstalllibdir " is ${CMAKE_INSTALL_LIBDIR} " )
174
175
install (TARGETS ros_interpreter DESTINATION lib )
175
176
176
- # Stand alone remote dynamic-graph Python interpreter.
177
- add_executable (interpreter src/interpreter.cpp )
178
- add_dependencies (interpreter ros_interpreter )
179
- target_link_libraries (interpreter ros_interpreter )
180
- pkg_config_use_dependency (interpreter dynamic-graph )
181
- pkg_config_use_dependency (interpreter sot-core )
182
- pkg_config_use_dependency (interpreter sot-dynamic-pinocchio )
183
- pkg_config_use_dependency (interpreter dynamic_graph_bridge_msgs )
184
- # set_target_properties(interpreter PROPERTIES BUILD_WITH_INSTALL_RPATH True)
185
- #install(TARGETS interpreter DESTINATION bin)
186
177
ENDIF (BUILD_PYTHON_INTERFACE )
187
178
188
179
# Stand alone embedded intepreter with a robot controller.
@@ -213,23 +204,27 @@ catkin_package(CATKIN_DEPENDS message_runtime roscpp realtime_tools tf2_bullet $
213
204
214
205
# Add libraries in pc file generated by cmake submodule
215
206
PKG_CONFIG_APPEND_LIBS (ros_bridge sot_loader )
207
+
216
208
IF (BUILD_PYTHON_INTERFACE )
217
209
PKG_CONFIG_APPEND_LIBS (ros_interpreter )
210
+
211
+ #install ros executables
212
+ install (PROGRAMS
213
+ ${CMAKE_SOURCE_DIR} /scripts/robot_pose_publisher
214
+ ${CMAKE_SOURCE_DIR} /scripts/run_command
215
+ ${CMAKE_SOURCE_DIR} /scripts/tf_publisher
216
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
217
+ )
218
+
219
+ # Service file.
220
+ install (FILES ./srv/RunPythonFile.srv DESTINATION ${CMAKE_INSTALL_PREFIX} /share/${PROJECT_NAME}/srv )
221
+
218
222
ENDIF (BUILD_PYTHON_INTERFACE )
219
223
220
- #install ros executables
221
- install (PROGRAMS
222
- ${CMAKE_SOURCE_DIR} /scripts/robot_pose_publisher
223
- ${CMAKE_SOURCE_DIR} /scripts/run_command
224
- ${CMAKE_SOURCE_DIR} /scripts/tf_publisher
225
- DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
226
- )
227
224
message (cmake_install_bindir " is ${CMAKE_INSTALL_BINDIR} " )
228
225
install (TARGETS geometric_simu DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} )
229
226
install (FILES manifest.xml DESTINATION ${CMAKE_INSTALL_PREFIX} /share/${PROJECT_NAME}/ )
230
227
231
- # Service file.
232
- install (FILES ./srv/RunPythonFile.srv DESTINATION ${CMAKE_INSTALL_PREFIX} /share/${PROJECT_NAME}/srv )
233
228
234
229
SETUP_PROJECT_FINALIZE ()
235
230
0 commit comments