diff --git a/jsk_pcl_ros/CMakeLists.txt b/jsk_pcl_ros/CMakeLists.txt
index a0363b1337..f4f7ad4fdc 100644
--- a/jsk_pcl_ros/CMakeLists.txt
+++ b/jsk_pcl_ros/CMakeLists.txt
@@ -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(
diff --git a/jsk_pcl_ros/package.xml b/jsk_pcl_ros/package.xml
index 14e2d4dec6..0e003401fe 100644
--- a/jsk_pcl_ros/package.xml
+++ b/jsk_pcl_ros/package.xml
@@ -20,6 +20,7 @@
cv_bridge
tf
sensor_msgs
+ genmsg
geometry_msgs
stereo_msgs
nodelet
diff --git a/jsk_recognition_msgs/CMakeLists.txt b/jsk_recognition_msgs/CMakeLists.txt
index 74c1662709..906d864512 100644
--- a/jsk_recognition_msgs/CMakeLists.txt
+++ b/jsk_recognition_msgs/CMakeLists.txt
@@ -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
@@ -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
diff --git a/jsk_recognition_msgs/package.xml b/jsk_recognition_msgs/package.xml
index 3daded1927..cba30c1af8 100644
--- a/jsk_recognition_msgs/package.xml
+++ b/jsk_recognition_msgs/package.xml
@@ -16,6 +16,8 @@
sensor_msgs
message_generation
message_generation
+ jsk_footstep_msgs
+ jsk_footstep_msgs
diff --git a/jsk_pcl_ros/srv/CallPolygon.srv b/jsk_recognition_msgs/srv/CallPolygon.srv
similarity index 100%
rename from jsk_pcl_ros/srv/CallPolygon.srv
rename to jsk_recognition_msgs/srv/CallPolygon.srv
diff --git a/jsk_pcl_ros/srv/CallSnapIt.srv b/jsk_recognition_msgs/srv/CallSnapIt.srv
similarity index 100%
rename from jsk_pcl_ros/srv/CallSnapIt.srv
rename to jsk_recognition_msgs/srv/CallSnapIt.srv
diff --git a/jsk_pcl_ros/srv/CheckCircle.srv b/jsk_recognition_msgs/srv/CheckCircle.srv
similarity index 100%
rename from jsk_pcl_ros/srv/CheckCircle.srv
rename to jsk_recognition_msgs/srv/CheckCircle.srv
diff --git a/jsk_pcl_ros/srv/CheckCollision.srv b/jsk_recognition_msgs/srv/CheckCollision.srv
similarity index 100%
rename from jsk_pcl_ros/srv/CheckCollision.srv
rename to jsk_recognition_msgs/srv/CheckCollision.srv
diff --git a/jsk_pcl_ros/srv/EnvironmentLock.srv b/jsk_recognition_msgs/srv/EnvironmentLock.srv
similarity index 100%
rename from jsk_pcl_ros/srv/EnvironmentLock.srv
rename to jsk_recognition_msgs/srv/EnvironmentLock.srv
diff --git a/jsk_pcl_ros/srv/EuclideanSegment.srv b/jsk_recognition_msgs/srv/EuclideanSegment.srv
similarity index 100%
rename from jsk_pcl_ros/srv/EuclideanSegment.srv
rename to jsk_recognition_msgs/srv/EuclideanSegment.srv
diff --git a/jsk_pcl_ros/srv/ICPAlign.srv b/jsk_recognition_msgs/srv/ICPAlign.srv
similarity index 100%
rename from jsk_pcl_ros/srv/ICPAlign.srv
rename to jsk_recognition_msgs/srv/ICPAlign.srv
diff --git a/jsk_pcl_ros/srv/ICPAlignWithBox.srv b/jsk_recognition_msgs/srv/ICPAlignWithBox.srv
similarity index 100%
rename from jsk_pcl_ros/srv/ICPAlignWithBox.srv
rename to jsk_recognition_msgs/srv/ICPAlignWithBox.srv
diff --git a/jsk_pcl_ros/srv/PolygonOnEnvironment.srv b/jsk_recognition_msgs/srv/PolygonOnEnvironment.srv
similarity index 100%
rename from jsk_pcl_ros/srv/PolygonOnEnvironment.srv
rename to jsk_recognition_msgs/srv/PolygonOnEnvironment.srv
diff --git a/jsk_pcl_ros/srv/RobotPickupReleasePoint.srv b/jsk_recognition_msgs/srv/RobotPickupReleasePoint.srv
similarity index 100%
rename from jsk_pcl_ros/srv/RobotPickupReleasePoint.srv
rename to jsk_recognition_msgs/srv/RobotPickupReleasePoint.srv
diff --git a/jsk_pcl_ros/srv/SetDepthCalibrationParameter.srv b/jsk_recognition_msgs/srv/SetDepthCalibrationParameter.srv
similarity index 100%
rename from jsk_pcl_ros/srv/SetDepthCalibrationParameter.srv
rename to jsk_recognition_msgs/srv/SetDepthCalibrationParameter.srv
diff --git a/jsk_pcl_ros/srv/SnapFootstep.srv b/jsk_recognition_msgs/srv/SnapFootstep.srv
similarity index 100%
rename from jsk_pcl_ros/srv/SnapFootstep.srv
rename to jsk_recognition_msgs/srv/SnapFootstep.srv
diff --git a/jsk_pcl_ros/srv/SwitchTopic.srv b/jsk_recognition_msgs/srv/SwitchTopic.srv
similarity index 100%
rename from jsk_pcl_ros/srv/SwitchTopic.srv
rename to jsk_recognition_msgs/srv/SwitchTopic.srv
diff --git a/jsk_pcl_ros/srv/TowerPickUp.srv b/jsk_recognition_msgs/srv/TowerPickUp.srv
similarity index 100%
rename from jsk_pcl_ros/srv/TowerPickUp.srv
rename to jsk_recognition_msgs/srv/TowerPickUp.srv
diff --git a/jsk_pcl_ros/srv/TowerRobotMoveCommand.srv b/jsk_recognition_msgs/srv/TowerRobotMoveCommand.srv
similarity index 100%
rename from jsk_pcl_ros/srv/TowerRobotMoveCommand.srv
rename to jsk_recognition_msgs/srv/TowerRobotMoveCommand.srv
diff --git a/jsk_pcl_ros/srv/TransformScreenpoint.srv b/jsk_recognition_msgs/srv/TransformScreenpoint.srv
similarity index 100%
rename from jsk_pcl_ros/srv/TransformScreenpoint.srv
rename to jsk_recognition_msgs/srv/TransformScreenpoint.srv
diff --git a/jsk_pcl_ros/srv/UpdateOffset.srv b/jsk_recognition_msgs/srv/UpdateOffset.srv
similarity index 100%
rename from jsk_pcl_ros/srv/UpdateOffset.srv
rename to jsk_recognition_msgs/srv/UpdateOffset.srv