From 50eca6608a995827532c9c8968e7c88112e084c0 Mon Sep 17 00:00:00 2001 From: Christina Gomez Date: Thu, 13 Jun 2013 10:44:02 -0500 Subject: [PATCH 1/6] Changed "add_dependencies" on three lines. Groovy distribution of genmsg is 0.4.17 and this leads to catkin_make errors when using {$PROJECT_NAME_EXPORTED_TARGETS}. Groovy branch of industrial_core will then have PROJECT_NAME_gencpp. --- simple_message/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/simple_message/CMakeLists.txt b/simple_message/CMakeLists.txt index 5b8af5b3..e5caf267 100644 --- a/simple_message/CMakeLists.txt +++ b/simple_message/CMakeLists.txt @@ -85,7 +85,7 @@ include_directories(include # DEFAULT LIBRARY (SAME ENDIAN) add_library(simple_message ${SRC_FILES}) target_link_libraries(simple_message ${catkin_LIBRARIES}) -add_dependencies(simple_message ${industrial_msgs_EXPORTED_TARGETS}) +add_dependencies(simple_message simple_message_gencpp) catkin_add_gtest(utest ${UTEST_SRC_FILES}) target_link_libraries(utest simple_message) @@ -94,7 +94,7 @@ target_link_libraries(utest simple_message) add_library(simple_message_bswap ${SRC_FILES}) set_target_properties(simple_message_bswap PROPERTIES COMPILE_DEFINITIONS "BYTE_SWAPPING") target_link_libraries(simple_message_bswap ${catkin_LIBRARIES}) -add_dependencies(simple_message_bswap ${industrial_msgs_EXPORTED_TARGETS}) +add_dependencies(simple_message_bswap simple_message_gencpp) catkin_add_gtest(utest_byte_swapping ${UTEST_SRC_FILES}) target_link_libraries(utest_byte_swapping simple_message_bswap) @@ -103,7 +103,7 @@ target_link_libraries(utest_byte_swapping simple_message_bswap) add_library(simple_message_float64 ${SRC_FILES}) set_target_properties(simple_message_float64 PROPERTIES COMPILE_DEFINITIONS "FLOAT64") target_link_libraries(simple_message_float64 ${catkin_LIBRARIES}) -add_dependencies(simple_message_float64 ${industrial_msgs_EXPORTED_TARGETS}) +add_dependencies(simple_message_float64 simple_message_gencpp) catkin_add_gtest(utest_float64 ${UTEST_SRC_FILES}) set_target_properties(utest_float64 PROPERTIES COMPILE_DEFINITIONS "FLOAT64") From ebaa6e616e0bcd81f312986b0a2630f7f9aed20e Mon Sep 17 00:00:00 2001 From: jrgnicho Date: Mon, 17 Jun 2013 10:49:29 -0500 Subject: [PATCH 2/6] added source files needed for supporting the motoman fs100 robot controller --- simple_message/CMakeLists.txt | 56 +++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/simple_message/CMakeLists.txt b/simple_message/CMakeLists.txt index e5caf267..30a39f93 100644 --- a/simple_message/CMakeLists.txt +++ b/simple_message/CMakeLists.txt @@ -15,32 +15,36 @@ set(ROS_BUILD_SHARED_LIBS false) add_definitions(-DROS=1) #build using ROS libraries add_definitions(-DLINUXSOCKETS=1) #use linux sockets for communication -set(SRC_FILES src/byte_array.cpp - src/simple_message.cpp - src/smpl_msg_connection.cpp - - src/socket/simple_socket.cpp - src/socket/udp_socket.cpp - src/socket/udp_client.cpp - src/socket/udp_server.cpp - src/socket/tcp_socket.cpp - src/socket/tcp_client.cpp - src/socket/tcp_server.cpp - - src/message_handler.cpp - src/message_manager.cpp - src/ping_handler.cpp - src/ping_message.cpp - src/joint_data.cpp - src/joint_traj_pt.cpp - src/joint_traj.cpp - src/robot_status.cpp - - src/messages/joint_message.cpp - src/messages/joint_traj_pt_message.cpp - src/messages/robot_status_message.cpp - - src/simple_comms_fault_handler.cpp) +set(SRC_FILES src/byte_array.cpp + src/simple_message.cpp + src/smpl_msg_connection.cpp + + src/socket/simple_socket.cpp + src/socket/udp_socket.cpp + src/socket/udp_client.cpp + src/socket/udp_server.cpp + src/socket/tcp_socket.cpp + src/socket/tcp_client.cpp + src/socket/tcp_server.cpp + + src/message_handler.cpp + src/message_manager.cpp + src/ping_handler.cpp + src/ping_message.cpp + src/joint_data.cpp + src/joint_feedback.cpp + src/joint_traj_pt.cpp + src/joint_traj_pt_full.cpp + src/joint_traj.cpp + src/robot_status.cpp + + src/messages/joint_message.cpp + src/messages/joint_feedback_message.cpp + src/messages/joint_traj_pt_message.cpp + src/messages/joint_traj_pt_full_message.cpp + src/messages/robot_status_message.cpp + + src/simple_comms_fault_handler.cpp) set(UTEST_SRC_FILES test/utest.cpp test/utest_message.cpp) From dbb919d029770797ac2cba4e59d5530f3341ead5 Mon Sep 17 00:00:00 2001 From: gavanderhoorn Date: Wed, 24 Jul 2013 16:43:55 +0200 Subject: [PATCH 3/6] Fix simple_message msg dependencies. Identical to issue #4, but for Groovy. --- simple_message/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/simple_message/CMakeLists.txt b/simple_message/CMakeLists.txt index 30a39f93..34e00831 100644 --- a/simple_message/CMakeLists.txt +++ b/simple_message/CMakeLists.txt @@ -89,7 +89,7 @@ include_directories(include # DEFAULT LIBRARY (SAME ENDIAN) add_library(simple_message ${SRC_FILES}) target_link_libraries(simple_message ${catkin_LIBRARIES}) -add_dependencies(simple_message simple_message_gencpp) +add_dependencies(simple_message ${industrial_msgs_EXPORTED_TARGETS}) catkin_add_gtest(utest ${UTEST_SRC_FILES}) target_link_libraries(utest simple_message) @@ -98,7 +98,7 @@ target_link_libraries(utest simple_message) add_library(simple_message_bswap ${SRC_FILES}) set_target_properties(simple_message_bswap PROPERTIES COMPILE_DEFINITIONS "BYTE_SWAPPING") target_link_libraries(simple_message_bswap ${catkin_LIBRARIES}) -add_dependencies(simple_message_bswap simple_message_gencpp) +add_dependencies(simple_message_bswap ${industrial_msgs_EXPORTED_TARGETS}) catkin_add_gtest(utest_byte_swapping ${UTEST_SRC_FILES}) target_link_libraries(utest_byte_swapping simple_message_bswap) @@ -107,7 +107,7 @@ target_link_libraries(utest_byte_swapping simple_message_bswap) add_library(simple_message_float64 ${SRC_FILES}) set_target_properties(simple_message_float64 PROPERTIES COMPILE_DEFINITIONS "FLOAT64") target_link_libraries(simple_message_float64 ${catkin_LIBRARIES}) -add_dependencies(simple_message_float64 simple_message_gencpp) +add_dependencies(simple_message_float64 ${industrial_msgs_EXPORTED_TARGETS}) catkin_add_gtest(utest_float64 ${UTEST_SRC_FILES}) set_target_properties(utest_float64 PROPERTIES COMPILE_DEFINITIONS "FLOAT64") From 7396f5524fc20e804918cca01613e897c77aa989 Mon Sep 17 00:00:00 2001 From: jrgnicho Date: Wed, 24 Jul 2013 14:15:59 -0500 Subject: [PATCH 4/6] Fix issue #5 (Install target fails for industrial_deprecated): setup.py file not required for python executables, see http://ros.org/wiki/catkin/migrating_from_rosbuild --- industrial_deprecated/CMakeLists.txt | 2 +- industrial_deprecated/setup.py | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 industrial_deprecated/setup.py diff --git a/industrial_deprecated/CMakeLists.txt b/industrial_deprecated/CMakeLists.txt index 4dcfa0e6..e8212606 100644 --- a/industrial_deprecated/CMakeLists.txt +++ b/industrial_deprecated/CMakeLists.txt @@ -9,7 +9,7 @@ find_package(catkin REQUIRED COMPONENTS rosgraph_msgs rospy) find_package(Boost REQUIRED COMPONENTS system) # Python setup -catkin_python_setup() +#catkin_python_setup() #Add unit test to check roslaunch dependencies. #rosbuild_add_roslaunch_check(launch) diff --git a/industrial_deprecated/setup.py b/industrial_deprecated/setup.py deleted file mode 100644 index 6ccc30a3..00000000 --- a/industrial_deprecated/setup.py +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env python - -from distutils.core import setup -from catkin_pkg.python_setup import generate_distutils_setup - -d = generate_distutils_setup( - ## don't do this unless you want a globally visible script - scripts=['scripts/fake_time.py'], - packages=['industrial_deprecated'], - package_dir={'': 'src'} -) - -setup(**d) From 696f48594d9ad18a446e8b68036006deab1b7672 Mon Sep 17 00:00:00 2001 From: jrgnicho Date: Wed, 24 Jul 2013 14:19:03 -0500 Subject: [PATCH 5/6] Fix issue #6 (Install target fails for industrial_robot_simulator): setup.py file not required for python executables, see http://ros.org/wiki/catkin/migrating_from_rosbuild --- industrial_robot_simulator/CMakeLists.txt | 2 +- industrial_robot_simulator/setup.py | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 industrial_robot_simulator/setup.py diff --git a/industrial_robot_simulator/CMakeLists.txt b/industrial_robot_simulator/CMakeLists.txt index faec58fe..e285f4e6 100644 --- a/industrial_robot_simulator/CMakeLists.txt +++ b/industrial_robot_simulator/CMakeLists.txt @@ -5,7 +5,7 @@ project(industrial_robot_simulator) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs sensor_msgs control_msgs trajectory_msgs industrial_robot_client) # Python setup -catkin_python_setup() +#catkin_python_setup() ################################### ## catkin specific configuration ## diff --git a/industrial_robot_simulator/setup.py b/industrial_robot_simulator/setup.py deleted file mode 100644 index bfb26364..00000000 --- a/industrial_robot_simulator/setup.py +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env python - -from distutils.core import setup -from catkin_pkg.python_setup import generate_distutils_setup - -d = generate_distutils_setup( - ## don't do this unless you want a globally visible script - scripts=['industrial_robot_simulator'], - packages=['industrial_robot_simulator'], - package_dir={'': ''} -) - -setup(**d) From bd525cb6b40249c6e036f107add173d922b75301 Mon Sep 17 00:00:00 2001 From: gavanderhoorn Date: Sun, 7 Jul 2013 16:54:15 +0200 Subject: [PATCH 6/6] Correct missing const modifier on msg param (fix #15). --- simple_message/include/simple_message/socket/simple_socket.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simple_message/include/simple_message/socket/simple_socket.h b/simple_message/include/simple_message/socket/simple_socket.h index fee81112..61df3f59 100644 --- a/simple_message/include/simple_message/socket/simple_socket.h +++ b/simple_message/include/simple_message/socket/simple_socket.h @@ -201,7 +201,7 @@ class SimpleSocket : public industrial::smpl_msg_connection::SmplMsgConnection this->connected_ = connected; } - void logSocketError(char* msg, int rc) + void logSocketError(const char* msg, int rc) { LOG_ERROR("%s, rc: %d, errno: %d", msg, rc, errno); }