Skip to content

Commit

Permalink
Move service files: jsk_pcl_ros/srv -> jsk_recognition_msgs/srv
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Aug 20, 2016
1 parent 52ee56c commit c5eeec6
Show file tree
Hide file tree
Showing 21 changed files with 71 additions and 16 deletions.
59 changes: 47 additions & 12 deletions jsk_pcl_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,57 @@ IF(${yaml_cpp_VERSION} VERSION_LESS "0.5.0")
add_definitions("-DUSE_OLD_YAML")
ENDIF()

add_service_files(FILES SwitchTopic.srv
UpdateOffset.srv
SnapFootstep.srv
SetDepthCalibrationParameter.srv
TransformScreenpoint.srv
macro(add_deprecated_service_files)
cmake_parse_arguments(ARG "" "UPSTREAM" "FILES" ${ARGN})
if(ARG_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "add_deprecated_service_files() called with unused arguments: ${ARG_UNPARSED_ARGUMENTS}")
endif()

if(${PROJECT_NAME}_GENERATE_MESSAGES)
message(FATAL_ERROR "generate_messages() must be called after add_deprecated_service_files()")
endif()

if(EXISTS ${${ARG_UPSTREAM}_SOURCE_PREFIX}/srv)
set(_srv_prefix ${${ARG_UPSTREAM}_SOURCE_PREFIX})
else()
set(_srv_prefix ${${ARG_UPSTREAM}_PREFIX}/share/${ARG_UPSTREAM})
endif()

set(FILES_W_PATH "")
foreach(file ${ARG_FILES})
list(APPEND FILES_W_PATH ${_srv_prefix}/srv/${file})
list(APPEND ${PROJECT_NAME}_SERVICE_FILES ${_srv_prefix}/srv/${file})
assert_file_exists(${_srv_prefix}/srv/${file} "service file not found")
endforeach()

install(FILES ${FILES_W_PATH} DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/srv)
foreach(file ${ARG_FILES})
list(APPEND ${PROJECT_NAME}_INSTALLED_SERVICE_FILES "srv/${file}")
endforeach()
endmacro()

# Service files which are moved to the upstream package 'jsk_recognition_msgs'
add_deprecated_service_files(
UPSTREAM jsk_recognition_msgs
FILES
CallPolygon.srv
CallSnapIt.srv
CheckCircle.srv
CheckCollision.srv
EnvironmentLock.srv
EuclideanSegment.srv
ICPAlign.srv
ICPAlignWithBox.srv
PolygonOnEnvironment.srv
RobotPickupReleasePoint.srv
SetDepthCalibrationParameter.srv
SnapFootstep.srv
SwitchTopic.srv
TowerPickUp.srv
EuclideanSegment.srv
TowerRobotMoveCommand.srv
CallSnapIt.srv CallPolygon.srv
EnvironmentLock.srv
PolygonOnEnvironment.srv
ICPAlignWithBox.srv
ICPAlign.srv
CheckCollision.srv)
TransformScreenpoint.srv
UpdateOffset.srv
)

# generate the dynamic_reconfigure config file
generate_dynamic_reconfigure_options(
Expand Down
1 change: 1 addition & 0 deletions jsk_pcl_ros/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<build_depend>cv_bridge</build_depend>
<build_depend>tf</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>genmsg</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>stereo_msgs</build_depend>
<build_depend>nodelet</build_depend>
Expand Down
25 changes: 21 additions & 4 deletions jsk_recognition_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.8.3)
project(jsk_recognition_msgs)
find_package(catkin REQUIRED
std_msgs sensor_msgs geometry_msgs message_generation pcl_msgs)
std_msgs sensor_msgs geometry_msgs message_generation pcl_msgs jsk_footstep_msgs)
add_message_files(
FILES
BoundingBoxArray.msg
Expand Down Expand Up @@ -60,15 +60,32 @@ add_message_files(
)

add_service_files(FILES
CallPolygon.srv
CallSnapIt.srv
CheckCircle.srv
CheckCollision.srv
EnvironmentLock.srv
EuclideanSegment.srv
ICPAlign.srv
ICPAlignWithBox.srv
PolygonOnEnvironment.srv
RobotPickupReleasePoint.srv
SetDepthCalibrationParameter.srv
SetPointCloud2.srv
)
SnapFootstep.srv
SwitchTopic.srv
TowerPickUp.srv
TowerRobotMoveCommand.srv
TransformScreenpoint.srv
UpdateOffset.srv
)

generate_messages(
DEPENDENCIES
std_msgs sensor_msgs geometry_msgs pcl_msgs
std_msgs sensor_msgs geometry_msgs pcl_msgs jsk_footstep_msgs
)
catkin_package(
CATKIN_DEPENDS std_msgs sensor_msgs geometry_msgs pcl_msgs
CATKIN_DEPENDS std_msgs sensor_msgs geometry_msgs pcl_msgs jsk_footstep_msgs
)

install(DIRECTORY scripts
Expand Down
2 changes: 2 additions & 0 deletions jsk_recognition_msgs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
<run_depend>sensor_msgs</run_depend>
<build_depend>message_generation</build_depend>
<run_depend>message_generation</run_depend>
<build_depend>jsk_footstep_msgs</build_depend>
<run_depend>jsk_footstep_msgs</run_depend>
<export>
</export>
</package>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c5eeec6

Please sign in to comment.