From dad2fe54f758bea9a94cdac47c07c8df1c334aff Mon Sep 17 00:00:00 2001 From: Shaun Edwards Date: Sun, 5 Jan 2014 20:31:11 -0500 Subject: [PATCH 1/4] Added source install to simple message package --- simple_message/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/simple_message/CMakeLists.txt b/simple_message/CMakeLists.txt index 435e82e5..d3290d6b 100644 --- a/simple_message/CMakeLists.txt +++ b/simple_message/CMakeLists.txt @@ -134,3 +134,10 @@ install( install( DIRECTORY include/${PROJECT_NAME}/ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}) + +# The simple message library is a source library with only the most common +# libraries pre-built. For this reason, the source is installed in the shared +# directory. +install( + DIRECTORY src/ + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/src) From a13263170b6ebfc03c060280d76e95b5c9954713 Mon Sep 17 00:00:00 2001 From: Shaun Edwards Date: Sun, 5 Jan 2014 21:06:11 -0500 Subject: [PATCH 2/4] Cleaned up CMakeLists, reformated and fixed white space --- industrial_robot_client/CMakeLists.txt | 57 ++------------------ industrial_robot_simulator/CMakeLists.txt | 21 +------- industrial_trajectory_filters/CMakeLists.txt | 8 +-- industrial_utils/CMakeLists.txt | 51 +++--------------- simple_message/CMakeLists.txt | 24 ++------- 5 files changed, 16 insertions(+), 145 deletions(-) diff --git a/industrial_robot_client/CMakeLists.txt b/industrial_robot_client/CMakeLists.txt index 845421bb..d8a9613e 100644 --- a/industrial_robot_client/CMakeLists.txt +++ b/industrial_robot_client/CMakeLists.txt @@ -1,15 +1,13 @@ -# http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html cmake_minimum_required(VERSION 2.8.3) + project(industrial_robot_client) -# Load catkin and all dependencies required for this package + find_package(catkin REQUIRED COMPONENTS roscpp std_msgs sensor_msgs control_msgs trajectory_msgs simple_message actionlib_msgs actionlib urdf industrial_msgs industrial_utils) -## System dependencies are found with CMake's conventions -# find_package(Boost REQUIRED COMPONENTS system) find_package(Boost REQUIRED COMPONENTS system thread) # The definition is copied from the CMakeList for the simple_message package. -add_definitions(-DROS=1) #build using ROS libraries +add_definitions(-DROS=1) #build using ROS libraries add_definitions(-DLINUXSOCKETS=1) #build using LINUX SOCKETS libraries set(SRC_FILES src/joint_relay_handler.cpp @@ -20,57 +18,13 @@ set(SRC_FILES src/joint_relay_handler.cpp src/robot_state_interface.cpp src/utils.cpp) -####################################### -## Declare ROS messages and services ## -####################################### - -## Generate messages in the 'msg' folder -# add_message_files( -# FILES -# Message1.msg -# Message2.msg -# ) - -## Generate services in the 'srv' folder -# add_service_files( -# FILES -# Service1.srv -# Service2.srv -# ) - -## Generate added messages and services with any dependencies listed here -# generate_messages( -# DEPENDENCIES -# std_msgs -# ) - -################################### -## catkin specific configuration ## -################################### -## The catkin_package macro generates cmake config files for your package -## Declare things to be passed to dependent projects -## LIBRARIES: libraries you create in this project that dependent projects also need -## CATKIN_DEPENDS: catkin_packages dependent projects also need -## DEPENDS: system dependencies of this project that dependent projects also need - -# NOTE: The libraries generated this package are not included in the catkin_package -# macro because libraries must be explicitly linked in projects that depend on this -# package. If this is not done (and these libraries were exported), then multiple -# library definitions (normal - industrial_robot_client and byteswapped - -# industrial_robot_client_bswap) are both included (this is bad). - catkin_package( CATKIN_DEPENDS roscpp std_msgs sensor_msgs control_msgs trajectory_msgs simple_message actionlib_msgs actionlib urdf industrial_msgs industrial_utils INCLUDE_DIRS include ) -########### -## Build ## -########### -## Specify additional locations of header files -## Your package locations should be listed before other locations include_directories(include ${catkin_INCLUDE_DIRS} ) @@ -88,14 +42,12 @@ include_directories(include # or # target_link_libraries(my_node industrial_robot_client_bswap) - add_library(industrial_robot_client ${SRC_FILES}) target_link_libraries(industrial_robot_client simple_message) add_library(industrial_robot_client_bswap ${SRC_FILES}) target_link_libraries(industrial_robot_client_bswap simple_message_bswap) - # The following executables(nodes) are for applications where the robot # controller and pc have the same byte order (i.e. byte swapping NOT # required) @@ -164,9 +116,6 @@ target_link_libraries(utest_robot_client ${catkin_LIBRARIES}) -############# -## Install ## -############# install( TARGETS industrial_robot_client industrial_robot_client_bswap LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}) diff --git a/industrial_robot_simulator/CMakeLists.txt b/industrial_robot_simulator/CMakeLists.txt index 09279ae6..cee73804 100644 --- a/industrial_robot_simulator/CMakeLists.txt +++ b/industrial_robot_simulator/CMakeLists.txt @@ -1,30 +1,13 @@ -# http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html cmake_minimum_required(VERSION 2.8.3) + project(industrial_robot_simulator) -# Load catkin and all dependencies required for this package -find_package(catkin REQUIRED COMPONENTS roscpp std_msgs sensor_msgs control_msgs trajectory_msgs industrial_robot_client) -# Python setup -#catkin_python_setup() +find_package(catkin REQUIRED COMPONENTS roscpp std_msgs sensor_msgs control_msgs trajectory_msgs industrial_robot_client) -################################### -## catkin specific configuration ## -################################### -## The catkin_package macro generates cmake config files for your package -## Declare things to be passed to dependent projects -## LIBRARIES: libraries you create in this project that dependent projects also need -## CATKIN_DEPENDS: catkin_packages dependent projects also need -## DEPENDS: system dependencies of this project that dependent projects also need catkin_package( CATKIN_DEPENDS roscpp std_msgs sensor_msgs control_msgs trajectory_msgs industrial_robot_client ) -############# -## Install ## -############# - -# all install targets should use catkin DESTINATION variables -# See http://ros.org/doc/groovy/api/catkin/html/adv_user_guide/variables.html install(PROGRAMS industrial_robot_simulator DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) diff --git a/industrial_trajectory_filters/CMakeLists.txt b/industrial_trajectory_filters/CMakeLists.txt index 7911f47d..02705f4e 100644 --- a/industrial_trajectory_filters/CMakeLists.txt +++ b/industrial_trajectory_filters/CMakeLists.txt @@ -1,5 +1,5 @@ -# http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html cmake_minimum_required(VERSION 2.8.3) + project(industrial_trajectory_filters) find_package(catkin REQUIRED COMPONENTS moveit_ros_planning trajectory_msgs) @@ -14,17 +14,11 @@ include_directories(include ${catkin_INCLUDE_DIRS} ) -########### -## Build ## -########### add_library(${PROJECT_NAME} src/n_point_filter.cpp src/uniform_sample_filter.cpp) target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES}) -############# -## Install ## -############# install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}) diff --git a/industrial_utils/CMakeLists.txt b/industrial_utils/CMakeLists.txt index 6c1ea237..cac163fe 100644 --- a/industrial_utils/CMakeLists.txt +++ b/industrial_utils/CMakeLists.txt @@ -1,69 +1,30 @@ -# http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html cmake_minimum_required(VERSION 2.8.3) + project(industrial_utils) -# Load catkin and all dependencies required for this package + find_package(catkin REQUIRED COMPONENTS roscpp urdf) -## System dependencies are found with CMake's conventions -# find_package(Boost REQUIRED COMPONENTS system) find_package(Boost REQUIRED COMPONENTS system) -####################################### -## Declare ROS messages and services ## -####################################### - -## Generate messages in the 'msg' folder -# add_message_files( -# FILES -# Message1.msg -# Message2.msg -# ) - -## Generate services in the 'srv' folder -# add_service_files( -# FILES -# Service1.srv -# Service2.srv -# ) - -## Generate added messages and services with any dependencies listed here -# generate_messages( -# DEPENDENCIES -# std_msgs -# ) - -################################### -## catkin specific configuration ## -################################### -## The catkin_package macro generates cmake config files for your package -## Declare things to be passed to dependent projects -## LIBRARIES: libraries you create in this project that dependent projects also need -## CATKIN_DEPENDS: catkin_packages dependent projects also need -## DEPENDS: system dependencies of this project that dependent projects also need catkin_package( CATKIN_DEPENDS roscpp urdf INCLUDE_DIRS include LIBRARIES ${PROJECT_NAME} ) -########### -## Build ## -########### - -## Specify additional locations of header files -## Your package locations should be listed before other locations include_directories(include ${catkin_INCLUDE_DIRS}) add_library(${PROJECT_NAME} src/utils.cpp src/param_utils.cpp) target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES}) + + catkin_add_gtest(utest_inds_utils test/utest.cpp) target_link_libraries(utest_inds_utils ${PROJECT_NAME} ${catkin_LIBRARIES}) -############# -## Install ## -############# + + install( TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}) diff --git a/simple_message/CMakeLists.txt b/simple_message/CMakeLists.txt index d3290d6b..1d50957f 100644 --- a/simple_message/CMakeLists.txt +++ b/simple_message/CMakeLists.txt @@ -1,7 +1,7 @@ -# http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html cmake_minimum_required(VERSION 2.8.3) + project(simple_message) -# Load catkin and all dependencies required for this package + find_package(catkin REQUIRED COMPONENTS roscpp industrial_msgs) # Build static libs, to reduce dependency-chaining for industrial_robot_client @@ -12,7 +12,7 @@ set(ROS_BUILD_SHARED_LIBS false) # and various robot controllers. This requires conditionally compiling # certain functions and headers. The definition below enables compiling # for a ROS node. -add_definitions(-DROS=1) #build using ROS libraries +add_definitions(-DROS=1) #build using ROS libraries add_definitions(-DLINUXSOCKETS=1) #use linux sockets for communication set(SRC_FILES src/byte_array.cpp @@ -61,15 +61,6 @@ set(UTEST_SRC_FILES test/utest.cpp test/utest_message.cpp) # controllers). This library performs byte swapping at the lowest load/unload # levels. -################################### -## catkin specific configuration ## -################################### -## The catkin_package macro generates cmake config files for your package -## Declare things to be passed to dependent projects -## LIBRARIES: libraries you create in this project that dependent projects also need -## CATKIN_DEPENDS: catkin_packages dependent projects also need -## DEPENDS: system dependencies of this project that dependent projects also need - # NOTE: The libraries generated this package are not included in the catkin_package # macro because libraries must be explicitly linked in projects that depend on this # package. If this is not done (and these libraries were exported), then multiple @@ -81,12 +72,7 @@ catkin_package( INCLUDE_DIRS include ) -########### -## Build ## -########### -## Specify additional locations of header files -## Your package locations should be listed before other locations include_directories(include ${catkin_INCLUDE_DIRS} ) @@ -124,9 +110,7 @@ set_target_properties(utest_float64 PROPERTIES COMPILE_DEFINITIONS "TEST_PORT_BA target_link_libraries(utest_float64 simple_message_float64) -############# -## Install ## -############# + install( TARGETS simple_message simple_message_bswap simple_message_float64 LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}) From c02a2087bf4c79b9b801c4dd497fb0cd91624aa8 Mon Sep 17 00:00:00 2001 From: Shaun Edwards Date: Mon, 6 Jan 2014 18:30:38 -0500 Subject: [PATCH 3/4] Removed source install from simple message --- simple_message/CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/simple_message/CMakeLists.txt b/simple_message/CMakeLists.txt index 1d50957f..2efdbf5b 100644 --- a/simple_message/CMakeLists.txt +++ b/simple_message/CMakeLists.txt @@ -119,9 +119,3 @@ install( DIRECTORY include/${PROJECT_NAME}/ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}) -# The simple message library is a source library with only the most common -# libraries pre-built. For this reason, the source is installed in the shared -# directory. -install( - DIRECTORY src/ - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/src) From a3bbda4af34937b3cd3711029ac73c81440d9de6 Mon Sep 17 00:00:00 2001 From: Shaun Edwards Date: Tue, 7 Jan 2014 21:17:42 -0500 Subject: [PATCH 4/4] Purged deprecated packages --- industrial_deprecated/CMakeLists.txt | 64 +------------------ ...ronment_visualization_prerequisites.launch | 10 --- industrial_deprecated/package.xml | 12 ++-- industrial_deprecated/scripts/fake_time.py | 63 ------------------ 4 files changed, 7 insertions(+), 142 deletions(-) delete mode 100644 industrial_deprecated/launch/planning_environment_visualization_prerequisites.launch delete mode 100755 industrial_deprecated/scripts/fake_time.py diff --git a/industrial_deprecated/CMakeLists.txt b/industrial_deprecated/CMakeLists.txt index af9ff096..1804e2d6 100644 --- a/industrial_deprecated/CMakeLists.txt +++ b/industrial_deprecated/CMakeLists.txt @@ -1,68 +1,10 @@ -# http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html cmake_minimum_required(VERSION 2.8.3) -project(industrial_deprecated) -# Load catkin and all dependencies required for this package -find_package(catkin REQUIRED COMPONENTS rosgraph_msgs rospy) - -## System dependencies are found with CMake's conventions -# find_package(Boost REQUIRED COMPONENTS system) -find_package(Boost REQUIRED COMPONENTS system) - -# Python setup -#catkin_python_setup() - -#Add unit test to check roslaunch dependencies. -#rosbuild_add_roslaunch_check(launch) - - -####################################### -## Declare ROS messages and services ## -####################################### - -## Generate messages in the 'msg' folder -# add_message_files( -# FILES -# Message1.msg -# Message2.msg -# ) -## Generate services in the 'srv' folder -# add_service_files( -# FILES -# Service1.srv -# Service2.srv -# ) - -## Generate added messages and services with any dependencies listed here -# generate_messages( -# DEPENDENCIES -# std_msgs -# ) +project(industrial_deprecated) +find_package(catkin REQUIRED COMPONENTS) -################################### -## catkin specific configuration ## -################################### -## The catkin_package macro generates cmake config files for your package -## Declare things to be passed to dependent projects -## LIBRARIES: libraries you create in this project that dependent projects also need -## CATKIN_DEPENDS: catkin_packages dependent projects also need -## DEPENDS: system dependencies of this project that dependent projects also need catkin_package( - CATKIN_DEPENDS rosgraph_msgs rospy + CATKIN_DEPENDS ) -############# -## Install ## -############# - -# all install targets should use catkin DESTINATION variables -# See http://ros.org/doc/groovy/api/catkin/html/adv_user_guide/variables.html - -install(PROGRAMS scripts/fake_time.py - DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} -) - -install(DIRECTORY launch/ - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch -) diff --git a/industrial_deprecated/launch/planning_environment_visualization_prerequisites.launch b/industrial_deprecated/launch/planning_environment_visualization_prerequisites.launch deleted file mode 100644 index f3593fb2..00000000 --- a/industrial_deprecated/launch/planning_environment_visualization_prerequisites.launch +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/industrial_deprecated/package.xml b/industrial_deprecated/package.xml index 4999e911..6b32d01d 100644 --- a/industrial_deprecated/package.xml +++ b/industrial_deprecated/package.xml @@ -2,10 +2,10 @@ industrial_deprecated 1.0.0 - The Industrial deprecated package contains nodes, launch files, etc... that are slated for - deprecation. This package is the last place something will end up before being deleted. - If you are missing a package/node and find it's contents here, then you should consider - a replacement. + The Industrial deprecated package contains nodes, launch files, etc... that are slated for + deprecation. This package is the last place something will end up before being deleted. + If you are missing a package/node and find it's contents here, then you should consider + a replacement. Shaun Edwards BSD @@ -13,8 +13,4 @@ Shaun M. Edwards catkin - rosgraph_msgs - rospy - rosgraph_msgs - rospy diff --git a/industrial_deprecated/scripts/fake_time.py b/industrial_deprecated/scripts/fake_time.py deleted file mode 100755 index d52f35e0..00000000 --- a/industrial_deprecated/scripts/fake_time.py +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env python -# Software License Agreement (BSD License) -# -# Copyright (c) 2010, Willow Garage, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Willow Garage, Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -# Revision $Id: talker.py 5263 2009-07-17 23:30:38Z sfkwc $ - -""" -This publishes wall clock to the /clock topic to test simulated time routines -""" - -import roslib; - -import time -import rospy -from rosgraph_msgs.msg import Clock - -def faketime(): - rospy.set_param('/use_sim_time', True) - pub = rospy.Publisher('/clock', Clock) - rospy.init_node('fake_time') - c = Clock() - while not rospy.is_shutdown(): - float_secs = time.time() - secs = int(float_secs) - c.clock.nsecs = int((float_secs - secs) * 1000000000) - c.clock.secs = secs - pub.publish(c) - time.sleep(0.01) - -if __name__ == '__main__': - try: - faketime() - except rospy.ROSInterruptException: pass -