Skip to content

Commit 499274c

Browse files
Merge branch 'origin/devel'
2 parents 2e35976 + e0bdf59 commit 499274c

File tree

5 files changed

+34
-273
lines changed

5 files changed

+34
-273
lines changed

CMakeLists.txt

Lines changed: 33 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,15 @@ set(CXX_DISABLE_WERROR False)
5959
set(CUSTOM_HEADER_DIR dynamic_graph_bridge)
6060
set(${PROJECT_NAME}_HEADERS
6161
include/dynamic_graph_bridge/ros_init.hh
62-
include/dynamic_graph_bridge/ros_interpreter.hh
6362
include/dynamic_graph_bridge/sot_loader.hh
6463
include/dynamic_graph_bridge/sot_loader_basic.hh
6564
)
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+
6671
SEARCH_FOR_EIGEN()
6772
SEARCH_FOR_BOOST()
6873

@@ -130,8 +135,19 @@ macro(compile_plugin NAME)
130135
set_target_properties(${NAME} PROPERTIES BUILD_WITH_INSTALL_RPATH True)
131136
set_target_properties(${NAME} PROPERTIES PREFIX "")
132137
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)
133148

134-
IF(BUILD_PYTHON_INTERFACE)
149+
IF(BUILD_PYTHON_INTERFACE)
150+
foreach(NAME ${listplugins})
135151
dynamic_graph_python_module("ros/${NAME}"
136152
${NAME}
137153
ros/${NAME}/wrap
@@ -141,25 +157,10 @@ macro(compile_plugin NAME)
141157
PKG_CONFIG_USE_DEPENDENCY(ros/${NAME}/wrap dynamic_graph)
142158
PKG_CONFIG_USE_DEPENDENCY(ros/${NAME}/wrap sot-core)
143159
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()
158161

159-
#compile_plugin(robot_model)
162+
# ros_interperter library.
160163

161-
# ros_interperter library.
162-
IF(BUILD_PYTHON_INTERFACE)
163164
add_library(ros_interpreter src/ros_interpreter.cpp)
164165
pkg_config_use_dependency(ros_interpreter dynamic-graph)
165166
pkg_config_use_dependency(ros_interpreter sot-core)
@@ -173,16 +174,6 @@ IF(BUILD_PYTHON_INTERFACE)
173174
message(cmakeinstalllibdir " is ${CMAKE_INSTALL_LIBDIR} ")
174175
install(TARGETS ros_interpreter DESTINATION lib)
175176

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)
186177
ENDIF(BUILD_PYTHON_INTERFACE)
187178

188179
# Stand alone embedded intepreter with a robot controller.
@@ -213,23 +204,27 @@ catkin_package(CATKIN_DEPENDS message_runtime roscpp realtime_tools tf2_bullet $
213204

214205
# Add libraries in pc file generated by cmake submodule
215206
PKG_CONFIG_APPEND_LIBS(ros_bridge sot_loader)
207+
216208
IF(BUILD_PYTHON_INTERFACE)
217209
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+
218222
ENDIF(BUILD_PYTHON_INTERFACE)
219223

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-
)
227224
message(cmake_install_bindir " is ${CMAKE_INSTALL_BINDIR} ")
228225
install(TARGETS geometric_simu DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
229226
install(FILES manifest.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/)
230227

231-
# Service file.
232-
install(FILES ./srv/RunPythonFile.srv DESTINATION ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/srv)
233228

234229
SETUP_PROJECT_FINALIZE()
235230

cmake

src/interpreter.cpp

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/ros_joint_state.cpp

Lines changed: 0 additions & 178 deletions
This file was deleted.

src/ros_joint_state.hh

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)