From 326716a32b352b145c835b3d38a2b03d9f3c2e5d Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Sat, 21 Dec 2019 00:28:54 -0500 Subject: [PATCH 01/19] Apply consistent style to package.xml files --- combined_robot_hw/package.xml | 3 ++- combined_robot_hw_tests/package.xml | 3 ++- controller_interface/package.xml | 1 + controller_manager/package.xml | 2 ++ controller_manager_msgs/package.xml | 3 +++ controller_manager_tests/package.xml | 14 +++++++------- hardware_interface/package.xml | 3 +++ joint_limits_interface/package.xml | 8 ++++++-- ros_control/package.xml | 16 ++++++++-------- rqt_controller_manager/package.xml | 3 +-- transmission_interface/package.xml | 11 ++++++----- 11 files changed, 41 insertions(+), 26 deletions(-) diff --git a/combined_robot_hw/package.xml b/combined_robot_hw/package.xml index 3bea4d1b8..77ceac014 100644 --- a/combined_robot_hw/package.xml +++ b/combined_robot_hw/package.xml @@ -1,8 +1,8 @@ - combined_robot_hw 0.15.1 Combined Robot HW class. + Bence Magyar Toni Oliver Enrique Fernandez @@ -17,6 +17,7 @@ Toni Oliver catkin + hardware_interface pluginlib roscpp diff --git a/combined_robot_hw_tests/package.xml b/combined_robot_hw_tests/package.xml index a4a98f4b1..0b4592d64 100644 --- a/combined_robot_hw_tests/package.xml +++ b/combined_robot_hw_tests/package.xml @@ -1,8 +1,8 @@ - combined_robot_hw_tests 0.15.1 The combined_robot_hw_tests package + Bence Magyar Toni Oliver Enrique Fernandez @@ -17,6 +17,7 @@ Toni Oliver catkin + combined_robot_hw controller_manager controller_manager_tests diff --git a/controller_interface/package.xml b/controller_interface/package.xml index 1cb21bbf3..ef6dcfde4 100644 --- a/controller_interface/package.xml +++ b/controller_interface/package.xml @@ -2,6 +2,7 @@ controller_interface 0.15.1 Interface base class for controllers + Bence Magyar Enrique Fernandez Mathias Lüdtke diff --git a/controller_manager/package.xml b/controller_manager/package.xml index 02b75e4b3..e25e77533 100644 --- a/controller_manager/package.xml +++ b/controller_manager/package.xml @@ -2,6 +2,7 @@ controller_manager 0.15.1 The controller manager. + Bence Magyar Enrique Fernandez Mathias Lüdtke @@ -21,5 +22,6 @@ controller_manager_msgs hardware_interface pluginlib + rostest diff --git a/controller_manager_msgs/package.xml b/controller_manager_msgs/package.xml index 1f97ff467..2a22d6cd6 100644 --- a/controller_manager_msgs/package.xml +++ b/controller_manager_msgs/package.xml @@ -2,6 +2,7 @@ controller_manager_msgs 0.15.1 Messages and services for the controller manager. + Bence Magyar Enrique Fernandez Mathias Lüdtke @@ -17,6 +18,8 @@ catkin std_msgs + message_generation + message_runtime diff --git a/controller_manager_tests/package.xml b/controller_manager_tests/package.xml index 5ab03f81b..81cec45d3 100644 --- a/controller_manager_tests/package.xml +++ b/controller_manager_tests/package.xml @@ -1,7 +1,8 @@ - + controller_manager_tests 0.15.1 controller_manager_tests + Bence Magyar Enrique Fernandez Mathias Lüdtke @@ -17,14 +18,13 @@ catkin - controller_manager - controller_interface - controller_manager - controller_interface - rostest - rosservice + controller_interface + controller_manager + rosbash rosnode + rosservice + rostest diff --git a/hardware_interface/package.xml b/hardware_interface/package.xml index c2cae6731..8b7288d57 100644 --- a/hardware_interface/package.xml +++ b/hardware_interface/package.xml @@ -2,6 +2,7 @@ hardware_interface 0.15.1 Hardware Interface base class. + Bence Magyar Enrique Fernandez Mathias Lüdtke @@ -16,7 +17,9 @@ Adolfo Rodriguez Tsouroukdissian catkin + roscpp + rostest rosunit diff --git a/joint_limits_interface/package.xml b/joint_limits_interface/package.xml index 77012ba9a..967164e58 100644 --- a/joint_limits_interface/package.xml +++ b/joint_limits_interface/package.xml @@ -2,22 +2,26 @@ joint_limits_interface 0.15.1 Interface for enforcing joint limits. + Bence Magyar Enrique Fernandez Mathias Lüdtke + BSD https://github.com/ros-controls/ros_control/wiki https://github.com/ros-controls/ros_control/issues https://github.com/ros-controls/ros_control + Adolfo Rodriguez Tsouroukdissian + catkin - roscpp hardware_interface - urdf liburdfdom-dev + roscpp + urdf rosunit rostest diff --git a/ros_control/package.xml b/ros_control/package.xml index 48bcb7bab..9585ef148 100644 --- a/ros_control/package.xml +++ b/ros_control/package.xml @@ -17,16 +17,16 @@ catkin - joint_limits_interface - transmission_interface - realtime_tools - controller_manager - controller_interface - hardware_interface - controller_manager_tests - controller_manager_msgs combined_robot_hw combined_robot_hw_tests + controller_interface + controller_manager + controller_manager_msgs + controller_manager_tests + hardware_interface + joint_limits_interface + realtime_tools + transmission_interface diff --git a/rqt_controller_manager/package.xml b/rqt_controller_manager/package.xml index d413b268d..2a3fce460 100644 --- a/rqt_controller_manager/package.xml +++ b/rqt_controller_manager/package.xml @@ -1,4 +1,3 @@ - rqt_controller_manager 0.15.1 @@ -23,6 +22,6 @@ rqt_gui - + diff --git a/transmission_interface/package.xml b/transmission_interface/package.xml index f4eba997d..249158a61 100644 --- a/transmission_interface/package.xml +++ b/transmission_interface/package.xml @@ -17,17 +17,18 @@ catkin - tinyxml - roscpp pluginlib - hardware_interface + roscpp + tinyxml + cmake_modules + hardware_interface - rosunit resource_retriever + rosunit - + From edda7b80fc82e67036ebb5424bc96f43abbaa1b3 Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Sat, 21 Dec 2019 02:47:30 -0500 Subject: [PATCH 02/19] Apply consistent style to CMakeLists.txt files --- combined_robot_hw/CMakeLists.txt | 41 ++++--- combined_robot_hw_tests/CMakeLists.txt | 53 ++++++--- controller_interface/CMakeLists.txt | 52 +++++---- controller_manager/CMakeLists.txt | 91 ++++++++++------ controller_manager_msgs/CMakeLists.txt | 32 +++--- controller_manager_tests/CMakeLists.txt | 67 ++++++++---- hardware_interface/CMakeLists.txt | 85 +++++++++------ joint_limits_interface/CMakeLists.txt | 54 ++++++---- rqt_controller_manager/CMakeLists.txt | 21 +++- transmission_interface/CMakeLists.txt | 138 +++++++++++++----------- 10 files changed, 407 insertions(+), 227 deletions(-) diff --git a/combined_robot_hw/CMakeLists.txt b/combined_robot_hw/CMakeLists.txt index 603019a6c..2a89b3503 100644 --- a/combined_robot_hw/CMakeLists.txt +++ b/combined_robot_hw/CMakeLists.txt @@ -1,33 +1,50 @@ cmake_minimum_required(VERSION 2.8.3) project(combined_robot_hw) +# Load catkin and all dependencies required for this package find_package(catkin REQUIRED COMPONENTS hardware_interface pluginlib roscpp ) -include_directories(include ${catkin_INCLUDE_DIRS}) - +# Declare a catkin package catkin_package( - INCLUDE_DIRS include - LIBRARIES ${PROJECT_NAME} - CATKIN_DEPENDS hardware_interface pluginlib roscpp + INCLUDE_DIRS + include + LIBRARIES + ${PROJECT_NAME} + CATKIN_DEPENDS + hardware_interface + pluginlib + roscpp ) -add_library(${PROJECT_NAME} - src/combined_robot_hw.cpp -) + +########### +## Build ## +########### + +# Specify header include paths +include_directories(include ${catkin_INCLUDE_DIRS}) + +add_library(${PROJECT_NAME} src/combined_robot_hw.cpp) add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS}) target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES}) -# Install +############# +## Install ## +############# + +# Install headers install(DIRECTORY include/${PROJECT_NAME}/ - DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}) + DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +) -# Install library +# Install targets install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}) + RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION} +) diff --git a/combined_robot_hw_tests/CMakeLists.txt b/combined_robot_hw_tests/CMakeLists.txt index cf65c1c08..61284037b 100644 --- a/combined_robot_hw_tests/CMakeLists.txt +++ b/combined_robot_hw_tests/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 2.8.3) project(combined_robot_hw_tests) +# Load catkin and all dependencies required for this package find_package(catkin REQUIRED COMPONENTS combined_robot_hw controller_manager @@ -9,14 +10,27 @@ find_package(catkin REQUIRED COMPONENTS roscpp ) -include_directories(include ${catkin_INCLUDE_DIRS}) - +# Declare a catkin package catkin_package( - INCLUDE_DIRS include - LIBRARIES ${PROJECT_NAME} - CATKIN_DEPENDS combined_robot_hw hardware_interface roscpp + INCLUDE_DIRS + include + LIBRARIES + ${PROJECT_NAME} + CATKIN_DEPENDS + combined_robot_hw + hardware_interface + roscpp + # Note: controller_manager and controller_manager_tests are only used in tests ) + +########### +## Build ## +########### + +# Specify header include paths +include_directories(include ${catkin_INCLUDE_DIRS}) + add_library(${PROJECT_NAME} src/my_robot_hw_1.cpp src/my_robot_hw_2.cpp @@ -29,9 +43,14 @@ target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES}) add_executable(combined_robot_hw_dummy_app src/dummy_app.cpp) target_link_libraries(combined_robot_hw_dummy_app ${PROJECT_NAME} ${catkin_LIBRARIES}) -if(CATKIN_ENABLE_TESTING) +############# +## Testing ## +############# + +if(CATKIN_ENABLE_TESTING) find_package(rostest REQUIRED) + add_rostest_gtest(combined_robot_hw_test test/combined_robot_hw_test.test test/combined_robot_hw_test.cpp @@ -43,18 +62,26 @@ if(CATKIN_ENABLE_TESTING) test/cm_test.cpp ) target_link_libraries(combined_robot_hw_cm_test ${PROJECT_NAME} ${catkin_LIBRARIES}) - endif() -# Install + +############# +## Install ## +############# + +# Install headers install(DIRECTORY include/${PROJECT_NAME}/ - DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}) + DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +) -# Install library -install(TARGETS ${PROJECT_NAME} +# Install targets +install(TARGETS ${PROJECT_NAME} combined_robot_hw_dummy_app ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}) + RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION} +) +# Install plugins install(FILES test_robot_hw_plugin.xml - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +) diff --git a/controller_interface/CMakeLists.txt b/controller_interface/CMakeLists.txt index 88feb9ee5..3d32f42c8 100644 --- a/controller_interface/CMakeLists.txt +++ b/controller_interface/CMakeLists.txt @@ -2,32 +2,48 @@ cmake_minimum_required(VERSION 2.8.3) project(controller_interface) # Load catkin and all dependencies required for this package -find_package(catkin REQUIRED COMPONENTS roscpp hardware_interface pluginlib) +find_package(catkin REQUIRED COMPONENTS + hardware_interface + pluginlib + roscpp +) -# Declare catkin package +# Declare a catkin package catkin_package( - CATKIN_DEPENDS roscpp hardware_interface pluginlib - INCLUDE_DIRS include - ) + INCLUDE_DIRS + include + CATKIN_DEPENDS + hardware_interface + pluginlib + roscpp +) -if(CATKIN_ENABLE_TESTING) - find_package(rosunit REQUIRED) +########### +## Build ## +########### - catkin_add_gmock(controller_base_test - test/controller_base_test.cpp - ) +# Specify header include paths +include_directories(include ${catkin_INCLUDE_DIRS}) - target_include_directories(controller_base_test PRIVATE include) - target_include_directories(controller_base_test SYSTEM PRIVATE ${catkin_INCLUDE_DIRS}) - target_link_libraries(controller_base_test - ${catkin_LIBRARIES} - ) +############# +## Testing ## +############# + +if(CATKIN_ENABLE_TESTING) + find_package(rosunit REQUIRED) + catkin_add_gmock(controller_base_test test/controller_base_test.cpp) + target_link_libraries(controller_base_test ${catkin_LIBRARIES}) endif() -# Install -install(DIRECTORY include/${PROJECT_NAME}/ - DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}) +############# +## Install ## +############# + +# Install headers +install(DIRECTORY include/${PROJECT_NAME}/ + DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +) diff --git a/controller_manager/CMakeLists.txt b/controller_manager/CMakeLists.txt index c187c9d4e..7b161f236 100644 --- a/controller_manager/CMakeLists.txt +++ b/controller_manager/CMakeLists.txt @@ -2,65 +2,92 @@ cmake_minimum_required(VERSION 2.8.3) project(controller_manager) # Load catkin and all dependencies required for this package -find_package(catkin REQUIRED COMPONENTS controller_interface controller_manager_msgs hardware_interface pluginlib) +find_package(catkin REQUIRED COMPONENTS + controller_interface + controller_manager_msgs + hardware_interface + pluginlib +) +# Include Boost.Thread find_package(Boost REQUIRED COMPONENTS thread) -include_directories(include ${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS}) +catkin_python_setup() -# Declare catkin package +# Declare a catkin package catkin_package( - DEPENDS Boost - CATKIN_DEPENDS controller_interface controller_manager_msgs hardware_interface pluginlib - INCLUDE_DIRS include - LIBRARIES ${PROJECT_NAME} + INCLUDE_DIRS + include + LIBRARIES + ${PROJECT_NAME} + CATKIN_DEPENDS + controller_interface + controller_manager_msgs + hardware_interface + pluginlib + DEPENDS + Boost ) + +########### +## Build ## +########### + +# Specify header include paths +include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIR}) + add_library(${PROJECT_NAME} - src/controller_manager.cpp - include/controller_manager/controller_manager.h - include/controller_manager/controller_loader_interface.h include/controller_manager/controller_loader.h + include/controller_manager/controller_loader_interface.h + include/controller_manager/controller_manager.h + src/controller_manager.cpp ) +add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS}) target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES}) -if(catkin_EXPORTED_TARGETS) - add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS}) -endif() -if(CATKIN_ENABLE_TESTING) +############# +## Testing ## +############# +if(CATKIN_ENABLE_TESTING) find_package(rostest REQUIRED) - add_rostest_gtest(controller_manager_hwi_switch_test + add_rostest_gtest(${PROJECT_NAME}_hwi_switch_test test/hwi_switch_test.test test/hwi_switch_test.cpp ) - target_link_libraries(controller_manager_hwi_switch_test ${PROJECT_NAME} ${catkin_LIBRARIES}) + target_link_libraries(${PROJECT_NAME}_hwi_switch_test ${PROJECT_NAME} ${catkin_LIBRARIES}) - add_rostest_gmock(controller_manager_hwi_update_test + add_rostest_gmock(${PROJECT_NAME}_hwi_update_test test/hwi_update_test.test test/hwi_update_test.cpp ) - target_link_libraries(controller_manager_hwi_update_test ${PROJECT_NAME} ${catkin_LIBRARIES}) - + target_link_libraries(${PROJECT_NAME}_hwi_update_test ${PROJECT_NAME} ${catkin_LIBRARIES}) endif() -# Install + +############# +## Install ## +############# + +# Install python scripts +catkin_install_python(PROGRAMS scripts/controller_group + scripts/controller_manager + scripts/spawner + scripts/unspawner + DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +) + +# Install headers install(DIRECTORY include/${PROJECT_NAME}/ - DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}) + DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +) -# Install library +# Install targets install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}) - -catkin_install_python(PROGRAMS - scripts/controller_group - scripts/controller_manager - scripts/spawner - scripts/unspawner - DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) - -catkin_python_setup() + RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION} +) diff --git a/controller_manager_msgs/CMakeLists.txt b/controller_manager_msgs/CMakeLists.txt index bf211290a..1ddc5261b 100644 --- a/controller_manager_msgs/CMakeLists.txt +++ b/controller_manager_msgs/CMakeLists.txt @@ -2,35 +2,39 @@ cmake_minimum_required(VERSION 2.8.3) project(controller_manager_msgs) # Load catkin and all dependencies required for this package -find_package(catkin REQUIRED COMPONENTS message_generation std_msgs) +find_package(catkin REQUIRED COMPONENTS + message_generation + std_msgs +) catkin_python_setup() -# Add message and service files -add_message_files( - FILES +# Add message files +add_message_files(FILES ControllerState.msg ControllerStatistics.msg ControllersStatistics.msg HardwareInterfaceResources.msg - ) +) -add_service_files( - FILES +# Add service files +add_service_files(FILES ListControllerTypes.srv ListControllers.srv LoadController.srv ReloadControllerLibraries.srv SwitchController.srv UnloadController.srv - ) +) # Generate added messages and services with any dependencies listed here -generate_messages( - DEPENDENCIES std_msgs - ) +generate_messages(DEPENDENCIES + std_msgs +) -# Declare catkin package +# Declare a catkin package catkin_package( - CATKIN_DEPENDS std_msgs message_runtime - ) + CATKIN_DEPENDS + message_runtime + std_msgs +) diff --git a/controller_manager_tests/CMakeLists.txt b/controller_manager_tests/CMakeLists.txt index b8397cfe6..dbeec4a96 100644 --- a/controller_manager_tests/CMakeLists.txt +++ b/controller_manager_tests/CMakeLists.txt @@ -2,18 +2,32 @@ cmake_minimum_required(VERSION 2.8.3) project(controller_manager_tests) # Load catkin and all dependencies required for this package -find_package(catkin REQUIRED COMPONENTS controller_manager controller_interface) -catkin_python_setup() +find_package(catkin REQUIRED COMPONENTS + controller_interface + controller_manager +) -include_directories(include ${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS}) +catkin_python_setup() +# Declare a catkin package catkin_package( - CATKIN_DEPENDS controller_manager controller_interface - INCLUDE_DIRS include - LIBRARIES ${PROJECT_NAME} - ) + INCLUDE_DIRS + include + LIBRARIES + ${PROJECT_NAME} + CATKIN_DEPENDS + controller_interface + controller_manager +) + + +########### +## Build ## +########### + +# Specify header include paths +include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIR}) -#common commands for building c++ executables and libraries add_library(${PROJECT_NAME} src/effort_test_controller.cpp src/extensible_controllers.cpp @@ -28,30 +42,45 @@ target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES}) add_executable(dummy_app src/dummy_app.cpp) target_link_libraries(dummy_app ${PROJECT_NAME} ${catkin_LIBRARIES}) + +############# +## Testing ## +############# + if(CATKIN_ENABLE_TESTING) find_package(rostest REQUIRED) + add_executable(cm_test test/cm_test.cpp) add_dependencies(tests cm_test) - target_link_libraries(cm_test ${GTEST_LIBRARIES} ${catkin_LIBRARIES}) + target_link_libraries(cm_test ${catkin_LIBRARIES} ${GTEST_LIBRARIES}) + add_rostest(test/cm_test.test) + catkin_add_nosetests(test) + add_rostest(test/cm_msgs_utils_rostest.test) + add_rostest(test/controller_manager_scripts.test) endif() -# Install + +############# +## Install ## +############# + +# Install headers install(DIRECTORY include/${PROJECT_NAME}/ - DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}) + DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +) -# Install library -install(TARGETS ${PROJECT_NAME} +# Install targets +install(TARGETS ${PROJECT_NAME} dummy_app ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}) - -# Install executable -install(TARGETS dummy_app - RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) + RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION} +) +# Install plugins install(FILES test_controllers_plugin.xml - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +) diff --git a/hardware_interface/CMakeLists.txt b/hardware_interface/CMakeLists.txt index be3380e37..b5ca96387 100644 --- a/hardware_interface/CMakeLists.txt +++ b/hardware_interface/CMakeLists.txt @@ -1,54 +1,75 @@ cmake_minimum_required(VERSION 2.8.3) project(hardware_interface) -find_package(catkin REQUIRED COMPONENTS roscpp) +# Load catkin and all dependencies required for this package +find_package(catkin REQUIRED COMPONENTS + roscpp +) -# Declare catkin package +# Declare a catkin package catkin_package( - CATKIN_DEPENDS roscpp - INCLUDE_DIRS include - ) + INCLUDE_DIRS + include + CATKIN_DEPENDS + roscpp +) -if(CATKIN_ENABLE_TESTING) - find_package(catkin REQUIRED COMPONENTS rosconsole) - include_directories(include ${catkin_INCLUDE_DIRS}) +########### +## Build ## +########### + +# Specify header include paths +include_directories(include ${catkin_INCLUDE_DIRS}) - catkin_add_gtest(hardware_resource_manager_test test/hardware_resource_manager_test.cpp) - target_link_libraries(hardware_resource_manager_test ${catkin_LIBRARIES}) - catkin_add_gtest(actuator_state_interface_test test/actuator_state_interface_test.cpp) - target_link_libraries(actuator_state_interface_test ${catkin_LIBRARIES}) +############# +## Testing ## +############# + +if(CATKIN_ENABLE_TESTING) + find_package(catkin REQUIRED COMPONENTS rosconsole) # TODO: Investigate - catkin_add_gtest(actuator_command_interface_test test/actuator_command_interface_test.cpp) - target_link_libraries(actuator_command_interface_test ${catkin_LIBRARIES}) + catkin_add_gtest(hardware_resource_manager_test test/hardware_resource_manager_test.cpp) + target_link_libraries(hardware_resource_manager_test ${catkin_LIBRARIES}) - catkin_add_gtest(joint_state_interface_test test/joint_state_interface_test.cpp) - target_link_libraries(joint_state_interface_test ${catkin_LIBRARIES}) + catkin_add_gtest(actuator_state_interface_test test/actuator_state_interface_test.cpp) + target_link_libraries(actuator_state_interface_test ${catkin_LIBRARIES}) - catkin_add_gtest(joint_command_interface_test test/joint_command_interface_test.cpp) - target_link_libraries(joint_command_interface_test ${catkin_LIBRARIES}) + catkin_add_gtest(actuator_command_interface_test test/actuator_command_interface_test.cpp) + target_link_libraries(actuator_command_interface_test ${catkin_LIBRARIES}) - catkin_add_gtest(force_torque_sensor_interface_test test/force_torque_sensor_interface_test.cpp) - target_link_libraries(force_torque_sensor_interface_test ${catkin_LIBRARIES}) + catkin_add_gtest(joint_state_interface_test test/joint_state_interface_test.cpp) + target_link_libraries(joint_state_interface_test ${catkin_LIBRARIES}) - catkin_add_gtest(imu_sensor_interface_test test/imu_sensor_interface_test.cpp) - target_link_libraries(imu_sensor_interface_test ${catkin_LIBRARIES}) + catkin_add_gtest(joint_command_interface_test test/joint_command_interface_test.cpp) + target_link_libraries(joint_command_interface_test ${catkin_LIBRARIES}) - catkin_add_gtest(robot_hw_test test/robot_hw_test.cpp) - target_link_libraries(robot_hw_test ${catkin_LIBRARIES}) + catkin_add_gtest(force_torque_sensor_interface_test test/force_torque_sensor_interface_test.cpp) + target_link_libraries(force_torque_sensor_interface_test ${catkin_LIBRARIES}) - catkin_add_gtest(interface_manager_test test/interface_manager_test.cpp) - target_link_libraries(interface_manager_test ${catkin_LIBRARIES}) + catkin_add_gtest(imu_sensor_interface_test test/imu_sensor_interface_test.cpp) + target_link_libraries(imu_sensor_interface_test ${catkin_LIBRARIES}) - catkin_add_gtest(posvel_command_interface_test test/posvel_command_interface_test.cpp) - target_link_libraries(posvel_command_interface_test ${catkin_LIBRARIES}) + catkin_add_gtest(robot_hw_test test/robot_hw_test.cpp) + target_link_libraries(robot_hw_test ${catkin_LIBRARIES}) - catkin_add_gtest(posvelacc_command_interface_test test/posvelacc_command_interface_test.cpp) - target_link_libraries(posvelacc_command_interface_test ${catkin_LIBRARIES}) + catkin_add_gtest(interface_manager_test test/interface_manager_test.cpp) + target_link_libraries(interface_manager_test ${catkin_LIBRARIES}) + catkin_add_gtest(posvel_command_interface_test test/posvel_command_interface_test.cpp) + target_link_libraries(posvel_command_interface_test ${catkin_LIBRARIES}) + + catkin_add_gtest(posvelacc_command_interface_test test/posvelacc_command_interface_test.cpp) + target_link_libraries(posvelacc_command_interface_test ${catkin_LIBRARIES}) endif() -# Install + +############# +## Install ## +############# + +# Install headers install(DIRECTORY include/${PROJECT_NAME}/ - DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}) + DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +) diff --git a/joint_limits_interface/CMakeLists.txt b/joint_limits_interface/CMakeLists.txt index f6353e8fd..cc71b9ca7 100644 --- a/joint_limits_interface/CMakeLists.txt +++ b/joint_limits_interface/CMakeLists.txt @@ -1,52 +1,62 @@ cmake_minimum_required(VERSION 2.8.3) project(joint_limits_interface) -find_package(urdfdom REQUIRED) - +# Load catkin and all dependencies required for this package find_package(catkin REQUIRED COMPONENTS hardware_interface roscpp urdf ) -include_directories(include ${catkin_INCLUDE_DIRS} ${urdfdom_INCLUDE_DIRS}) +# Include urdfdom +find_package(urdfdom REQUIRED) # TODO: Delete -# Declare catkin package +# Declare a catkin package catkin_package( - CATKIN_DEPENDS - hardware_interface - roscpp - urdf INCLUDE_DIRS include + CATKIN_DEPENDS + hardware_interface + roscpp urdf DEPENDS urdfdom ) + +########### +## Build ## +########### + +# Specify header include paths +include_directories(include ${catkin_INCLUDE_DIRS} ${urdfdom_INCLUDE_DIRS}) + + +############# +## Testing ## +############# + if(CATKIN_ENABLE_TESTING) find_package(rostest REQUIRED) + catkin_add_gtest(joint_limits_interface_test test/joint_limits_interface_test.cpp) - target_link_libraries(joint_limits_interface_test - ${catkin_LIBRARIES} - ${urdfdom_LIBRARIES} - ) + target_link_libraries(joint_limits_interface_test ${catkin_LIBRARIES} ${urdfdom_LIBRARIES}) catkin_add_gtest(joint_limits_urdf_test test/joint_limits_urdf_test.cpp) - target_link_libraries(joint_limits_urdf_test - ${catkin_LIBRARIES} - ${urdfdom_LIBRARIES} - ) + target_link_libraries(joint_limits_urdf_test ${catkin_LIBRARIES} ${urdfdom_LIBRARIES}) add_rostest_gtest(joint_limits_rosparam_test test/joint_limits_rosparam.test test/joint_limits_rosparam_test.cpp ) - target_link_libraries(joint_limits_rosparam_test - ${catkin_LIBRARIES} - ${urdfdom_LIBRARIES} - ) + target_link_libraries(joint_limits_rosparam_test ${catkin_LIBRARIES} ${urdfdom_LIBRARIES}) endif() -# Install + +############# +## Install ## +############# + +# Install headers install(DIRECTORY include/${PROJECT_NAME}/ - DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}) + DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +) diff --git a/rqt_controller_manager/CMakeLists.txt b/rqt_controller_manager/CMakeLists.txt index 6e7be6313..69067a88a 100644 --- a/rqt_controller_manager/CMakeLists.txt +++ b/rqt_controller_manager/CMakeLists.txt @@ -1,19 +1,30 @@ cmake_minimum_required(VERSION 2.8.3) project(rqt_controller_manager) +# Load catkin and all dependencies required for this package find_package(catkin REQUIRED COMPONENTS) + catkin_python_setup() + +# Declare a catkin package catkin_package() -install(FILES plugin.xml - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} -) +############# +## Install ## +############# + +# Install resources install(DIRECTORY resource DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} ) -install(PROGRAMS - scripts/rqt_controller_manager +# Install python scripts +catkin_install_python(PROGRAMS scripts/rqt_controller_manager DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} ) + +# Install plugins +install(FILES plugin.xml + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +) diff --git a/transmission_interface/CMakeLists.txt b/transmission_interface/CMakeLists.txt index e2d705fda..ada762644 100644 --- a/transmission_interface/CMakeLists.txt +++ b/transmission_interface/CMakeLists.txt @@ -14,12 +14,12 @@ find_package(TinyXML REQUIRED) # Declare a catkin package catkin_package( + INCLUDE_DIRS + include LIBRARIES ${PROJECT_NAME}_parser ${PROJECT_NAME}_loader ${PROJECT_NAME}_loader_plugins - INCLUDE_DIRS - include CATKIN_DEPENDS pluginlib roscpp @@ -27,99 +27,117 @@ catkin_package( TinyXML ) + ########### ## Build ## ########### -# Build +# Specify header include paths include_directories(include ${catkin_INCLUDE_DIRS} ${TinyXML_INCLUDE_DIRS}) -# Transmission parser Library +# Transmission parser library add_library(${PROJECT_NAME}_parser - src/transmission_parser.cpp include/transmission_interface/transmission_parser.h + include/transmission_interface/transmission_parser.h + src/transmission_parser.cpp ) target_link_libraries(${PROJECT_NAME}_parser ${catkin_LIBRARIES} ${TinyXML_LIBRARIES}) - # Transmission loader library add_library(${PROJECT_NAME}_loader - src/transmission_loader.cpp include/transmission_interface/transmission_loader.h - src/transmission_interface_loader.cpp include/transmission_interface/transmission_interface_loader.h + include/transmission_interface/transmission_interface_loader.h + include/transmission_interface/transmission_loader.h + src/transmission_interface_loader.cpp + src/transmission_loader.cpp ) target_link_libraries(${PROJECT_NAME}_loader ${PROJECT_NAME}_parser ${catkin_LIBRARIES} - ${TinyXML_LIBRARIES}) - + ${TinyXML_LIBRARIES} +) add_library(${PROJECT_NAME}_loader_plugins - src/simple_transmission_loader.cpp include/transmission_interface/simple_transmission_loader.h - src/differential_transmission_loader.cpp include/transmission_interface/differential_transmission_loader.h - src/four_bar_linkage_transmission_loader.cpp include/transmission_interface/four_bar_linkage_transmission_loader.h - src/joint_state_interface_provider.cpp include/transmission_interface/joint_state_interface_provider.h - src/position_joint_interface_provider.cpp include/transmission_interface/position_joint_interface_provider.h - src/velocity_joint_interface_provider.cpp include/transmission_interface/velocity_joint_interface_provider.h - src/effort_joint_interface_provider.cpp include/transmission_interface/effort_joint_interface_provider.h - src/bidirectional_position_joint_interface_provider.cpp include/transmission_interface/bidirectional_position_joint_interface_provider.h - src/bidirectional_velocity_joint_interface_provider.cpp include/transmission_interface/bidirectional_velocity_joint_interface_provider.h - src/bidirectional_effort_joint_interface_provider.cpp include/transmission_interface/bidirectional_effort_joint_interface_provider.h) -target_link_libraries(${PROJECT_NAME}_loader_plugins ${PROJECT_NAME}_loader) - - -############# -## Install ## -############# - -install(DIRECTORY include/${PROJECT_NAME}/ - DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}) - -# Install library -install(TARGETS ${PROJECT_NAME}_parser - ${PROJECT_NAME}_loader - ${PROJECT_NAME}_loader_plugins - ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION} + include/transmission_interface/bidirectional_effort_joint_interface_provider.h + include/transmission_interface/bidirectional_position_joint_interface_provider.h + include/transmission_interface/bidirectional_velocity_joint_interface_provider.h + include/transmission_interface/differential_transmission_loader.h + include/transmission_interface/effort_joint_interface_provider.h + include/transmission_interface/four_bar_linkage_transmission_loader.h + include/transmission_interface/joint_state_interface_provider.h + include/transmission_interface/position_joint_interface_provider.h + include/transmission_interface/simple_transmission_loader.h + include/transmission_interface/velocity_joint_interface_provider.h + src/bidirectional_effort_joint_interface_provider.cpp + src/bidirectional_position_joint_interface_provider.cpp + src/bidirectional_velocity_joint_interface_provider.cpp + src/differential_transmission_loader.cpp + src/effort_joint_interface_provider.cpp + src/four_bar_linkage_transmission_loader.cpp + src/joint_state_interface_provider.cpp + src/position_joint_interface_provider.cpp + src/simple_transmission_loader.cpp + src/velocity_joint_interface_provider.cpp ) +target_link_libraries(${PROJECT_NAME}_loader_plugins ${PROJECT_NAME}_loader) -install(FILES ros_control_plugins.xml - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) ############# ## Testing ## ############# if(CATKIN_ENABLE_TESTING) - + find_package(catkin REQUIRED COMPONENTS resource_retriever roscpp) # TODO: Investigate find_package(Boost REQUIRED COMPONENTS system thread) - find_package(catkin REQUIRED COMPONENTS resource_retriever roscpp) - catkin_add_gtest(simple_transmission_test test/simple_transmission_test.cpp) - target_link_libraries(simple_transmission_test ${Boost_LIBRARIES}) + catkin_add_gtest(simple_transmission_test test/simple_transmission_test.cpp) + target_link_libraries(simple_transmission_test ${Boost_LIBRARIES}) - catkin_add_gtest(differential_transmission_test test/differential_transmission_test.cpp) - target_link_libraries(differential_transmission_test ${Boost_LIBRARIES}) + catkin_add_gtest(differential_transmission_test test/differential_transmission_test.cpp) + target_link_libraries(differential_transmission_test ${Boost_LIBRARIES}) - catkin_add_gtest(four_bar_linkage_transmission_test test/four_bar_linkage_transmission_test.cpp) - target_link_libraries(four_bar_linkage_transmission_test ${Boost_LIBRARIES}) + catkin_add_gtest(four_bar_linkage_transmission_test test/four_bar_linkage_transmission_test.cpp) + target_link_libraries(four_bar_linkage_transmission_test ${Boost_LIBRARIES}) - catkin_add_gtest(transmission_interface_test test/transmission_interface_test.cpp) - target_link_libraries(transmission_interface_test ${TinyXML_LIBRARIES} ${catkin_LIBRARIES}) + catkin_add_gtest(transmission_interface_test test/transmission_interface_test.cpp) + target_link_libraries(transmission_interface_test ${TinyXML_LIBRARIES} ${catkin_LIBRARIES}) - catkin_add_gtest(transmission_parser_test test/transmission_parser_test.cpp) - target_link_libraries(transmission_parser_test ${PROJECT_NAME}_parser ${catkin_LIBRARIES}) + catkin_add_gtest(transmission_parser_test test/transmission_parser_test.cpp) + target_link_libraries(transmission_parser_test ${PROJECT_NAME}_parser ${catkin_LIBRARIES}) - catkin_add_gtest(simple_transmission_loader_test test/simple_transmission_loader_test.cpp) - target_link_libraries(simple_transmission_loader_test ${PROJECT_NAME}_parser ${catkin_LIBRARIES}) + catkin_add_gtest(simple_transmission_loader_test test/simple_transmission_loader_test.cpp) + target_link_libraries(simple_transmission_loader_test ${PROJECT_NAME}_parser ${catkin_LIBRARIES}) - catkin_add_gtest(differential_transmission_loader_test test/differential_transmission_loader_test.cpp) - target_link_libraries(differential_transmission_loader_test ${PROJECT_NAME}_parser ${catkin_LIBRARIES}) + catkin_add_gtest(differential_transmission_loader_test test/differential_transmission_loader_test.cpp) + target_link_libraries(differential_transmission_loader_test ${PROJECT_NAME}_parser ${catkin_LIBRARIES}) - catkin_add_gtest(four_bar_linkage_transmission_loader_test test/four_bar_linkage_transmission_loader_test.cpp) + catkin_add_gtest(four_bar_linkage_transmission_loader_test test/four_bar_linkage_transmission_loader_test.cpp) target_link_libraries(four_bar_linkage_transmission_loader_test ${PROJECT_NAME}_parser ${catkin_LIBRARIES}) - catkin_add_gtest(transmission_interface_loader_test test/transmission_interface_loader_test.cpp) - target_link_libraries(transmission_interface_loader_test ${PROJECT_NAME}_parser - transmission_interface_loader - ${catkin_LIBRARIES}) + catkin_add_gtest(transmission_interface_loader_test test/transmission_interface_loader_test.cpp) + target_link_libraries(transmission_interface_loader_test ${PROJECT_NAME}_parser + transmission_interface_loader + ${catkin_LIBRARIES}) endif() + + +############# +## Install ## +############# + +# Install headers +install(DIRECTORY include/${PROJECT_NAME}/ + DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +) + +# Install targets +install(TARGETS ${PROJECT_NAME}_loader + ${PROJECT_NAME}_loader_plugins + ${PROJECT_NAME}_parser + ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} + LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} + RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION} +) + +# Install plugins +install(FILES ros_control_plugins.xml + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +) From 70b07eb4d55e45797992e7958bd0cb7bc641cc6d Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Sun, 29 Dec 2019 11:55:42 -0500 Subject: [PATCH 03/19] Remove redundant rosconsole dependency --- hardware_interface/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/hardware_interface/CMakeLists.txt b/hardware_interface/CMakeLists.txt index b5ca96387..a64e791ba 100644 --- a/hardware_interface/CMakeLists.txt +++ b/hardware_interface/CMakeLists.txt @@ -28,8 +28,6 @@ include_directories(include ${catkin_INCLUDE_DIRS}) ############# if(CATKIN_ENABLE_TESTING) - find_package(catkin REQUIRED COMPONENTS rosconsole) # TODO: Investigate - catkin_add_gtest(hardware_resource_manager_test test/hardware_resource_manager_test.cpp) target_link_libraries(hardware_resource_manager_test ${catkin_LIBRARIES}) From 804e8b1e9d978067c07577c8d9abbda46610bf7d Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Sun, 29 Dec 2019 13:23:39 -0500 Subject: [PATCH 04/19] Fix transmission_interface dependencies --- transmission_interface/CMakeLists.txt | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/transmission_interface/CMakeLists.txt b/transmission_interface/CMakeLists.txt index ada762644..a5004eac0 100644 --- a/transmission_interface/CMakeLists.txt +++ b/transmission_interface/CMakeLists.txt @@ -9,6 +9,9 @@ find_package(catkin REQUIRED COMPONENTS roscpp ) +# Include header-only Boost libraries +find_package(Boost REQUIRED) + # Include a custom cmake file for TinyXML find_package(TinyXML REQUIRED) @@ -33,7 +36,7 @@ catkin_package( ########### # Specify header include paths -include_directories(include ${catkin_INCLUDE_DIRS} ${TinyXML_INCLUDE_DIRS}) +include_directories(include ${catkin_INCLUDE_DIRS} ${TinyXML_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}) # Transmission parser library add_library(${PROJECT_NAME}_parser @@ -85,37 +88,32 @@ target_link_libraries(${PROJECT_NAME}_loader_plugins ${PROJECT_NAME}_loader) ############# if(CATKIN_ENABLE_TESTING) - find_package(catkin REQUIRED COMPONENTS resource_retriever roscpp) # TODO: Investigate - find_package(Boost REQUIRED COMPONENTS system thread) + find_package(resource_retriever REQUIRED) catkin_add_gtest(simple_transmission_test test/simple_transmission_test.cpp) - target_link_libraries(simple_transmission_test ${Boost_LIBRARIES}) catkin_add_gtest(differential_transmission_test test/differential_transmission_test.cpp) - target_link_libraries(differential_transmission_test ${Boost_LIBRARIES}) catkin_add_gtest(four_bar_linkage_transmission_test test/four_bar_linkage_transmission_test.cpp) - target_link_libraries(four_bar_linkage_transmission_test ${Boost_LIBRARIES}) catkin_add_gtest(transmission_interface_test test/transmission_interface_test.cpp) - target_link_libraries(transmission_interface_test ${TinyXML_LIBRARIES} ${catkin_LIBRARIES}) + target_link_libraries(transmission_interface_test ${catkin_LIBRARIES}) catkin_add_gtest(transmission_parser_test test/transmission_parser_test.cpp) - target_link_libraries(transmission_parser_test ${PROJECT_NAME}_parser ${catkin_LIBRARIES}) + target_link_libraries(transmission_parser_test ${PROJECT_NAME}_parser ${resource_retriever_LIBRARIES}) catkin_add_gtest(simple_transmission_loader_test test/simple_transmission_loader_test.cpp) - target_link_libraries(simple_transmission_loader_test ${PROJECT_NAME}_parser ${catkin_LIBRARIES}) + target_link_libraries(simple_transmission_loader_test ${PROJECT_NAME}_parser ${resource_retriever_LIBRARIES}) catkin_add_gtest(differential_transmission_loader_test test/differential_transmission_loader_test.cpp) - target_link_libraries(differential_transmission_loader_test ${PROJECT_NAME}_parser ${catkin_LIBRARIES}) + target_link_libraries(differential_transmission_loader_test ${PROJECT_NAME}_parser ${resource_retriever_LIBRARIES}) catkin_add_gtest(four_bar_linkage_transmission_loader_test test/four_bar_linkage_transmission_loader_test.cpp) - target_link_libraries(four_bar_linkage_transmission_loader_test ${PROJECT_NAME}_parser ${catkin_LIBRARIES}) + target_link_libraries(four_bar_linkage_transmission_loader_test ${PROJECT_NAME}_parser ${resource_retriever_LIBRARIES}) catkin_add_gtest(transmission_interface_loader_test test/transmission_interface_loader_test.cpp) - target_link_libraries(transmission_interface_loader_test ${PROJECT_NAME}_parser - transmission_interface_loader - ${catkin_LIBRARIES}) + target_link_libraries(transmission_interface_loader_test transmission_interface_loader + ${resource_retriever_LIBRARIES}) endif() From 11200b9d0afe4d794dd73cfbe4b3cfdf30e7b668 Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Sun, 29 Dec 2019 13:24:18 -0500 Subject: [PATCH 05/19] Remove unused Boost dependencies --- combined_robot_hw/CMakeLists.txt | 2 +- combined_robot_hw_tests/CMakeLists.txt | 2 +- controller_manager_tests/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/combined_robot_hw/CMakeLists.txt b/combined_robot_hw/CMakeLists.txt index 2a89b3503..117416fd4 100644 --- a/combined_robot_hw/CMakeLists.txt +++ b/combined_robot_hw/CMakeLists.txt @@ -30,7 +30,7 @@ include_directories(include ${catkin_INCLUDE_DIRS}) add_library(${PROJECT_NAME} src/combined_robot_hw.cpp) add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS}) -target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES}) +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES}) ############# diff --git a/combined_robot_hw_tests/CMakeLists.txt b/combined_robot_hw_tests/CMakeLists.txt index 61284037b..b4fa46f22 100644 --- a/combined_robot_hw_tests/CMakeLists.txt +++ b/combined_robot_hw_tests/CMakeLists.txt @@ -38,7 +38,7 @@ add_library(${PROJECT_NAME} src/my_robot_hw_4.cpp ) add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS}) -target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES}) +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES}) add_executable(combined_robot_hw_dummy_app src/dummy_app.cpp) target_link_libraries(combined_robot_hw_dummy_app ${PROJECT_NAME} ${catkin_LIBRARIES}) diff --git a/controller_manager_tests/CMakeLists.txt b/controller_manager_tests/CMakeLists.txt index dbeec4a96..2d46d8388 100644 --- a/controller_manager_tests/CMakeLists.txt +++ b/controller_manager_tests/CMakeLists.txt @@ -26,7 +26,7 @@ catkin_package( ########### # Specify header include paths -include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIR}) +include_directories(include ${catkin_INCLUDE_DIRS}) add_library(${PROJECT_NAME} src/effort_test_controller.cpp From 00e4c8bc6d8d1ffe51123647c3475d54c0e7b296 Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Sun, 29 Dec 2019 13:24:33 -0500 Subject: [PATCH 06/19] Add missing Boost dependency --- hardware_interface/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hardware_interface/CMakeLists.txt b/hardware_interface/CMakeLists.txt index a64e791ba..0e597c00c 100644 --- a/hardware_interface/CMakeLists.txt +++ b/hardware_interface/CMakeLists.txt @@ -6,6 +6,9 @@ find_package(catkin REQUIRED COMPONENTS roscpp ) +# Include header-only Boost libraries +find_package(Boost REQUIRED) + # Declare a catkin package catkin_package( INCLUDE_DIRS @@ -20,7 +23,7 @@ catkin_package( ########### # Specify header include paths -include_directories(include ${catkin_INCLUDE_DIRS}) +include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}) ############# From 2befbc60162da8d49e5e9c6038dd6500eadcf811 Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Sun, 29 Dec 2019 13:25:18 -0500 Subject: [PATCH 07/19] Remove unnecessary rosunit/rostest dependencies --- controller_interface/CMakeLists.txt | 2 -- hardware_interface/package.xml | 1 - 2 files changed, 3 deletions(-) diff --git a/controller_interface/CMakeLists.txt b/controller_interface/CMakeLists.txt index 3d32f42c8..ad814dbe7 100644 --- a/controller_interface/CMakeLists.txt +++ b/controller_interface/CMakeLists.txt @@ -32,8 +32,6 @@ include_directories(include ${catkin_INCLUDE_DIRS}) ############# if(CATKIN_ENABLE_TESTING) - find_package(rosunit REQUIRED) - catkin_add_gmock(controller_base_test test/controller_base_test.cpp) target_link_libraries(controller_base_test ${catkin_LIBRARIES}) endif() diff --git a/hardware_interface/package.xml b/hardware_interface/package.xml index 8b7288d57..4cd7244c4 100644 --- a/hardware_interface/package.xml +++ b/hardware_interface/package.xml @@ -20,6 +20,5 @@ roscpp - rostest rosunit From ba1fc16bdeb268fc9b2b4f5f9ffb5c155072c7a4 Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Sun, 29 Dec 2019 13:44:47 -0500 Subject: [PATCH 08/19] Update package.xml descriptions --- combined_robot_hw_tests/package.xml | 2 +- controller_interface/package.xml | 2 +- controller_manager_tests/package.xml | 2 +- rqt_controller_manager/package.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/combined_robot_hw_tests/package.xml b/combined_robot_hw_tests/package.xml index 0b4592d64..9a3207b4c 100644 --- a/combined_robot_hw_tests/package.xml +++ b/combined_robot_hw_tests/package.xml @@ -1,7 +1,7 @@ combined_robot_hw_tests 0.15.1 - The combined_robot_hw_tests package + Tests for the combined Robot HW class. Bence Magyar Toni Oliver diff --git a/controller_interface/package.xml b/controller_interface/package.xml index ef6dcfde4..9a2e6ad3a 100644 --- a/controller_interface/package.xml +++ b/controller_interface/package.xml @@ -1,7 +1,7 @@ controller_interface 0.15.1 - Interface base class for controllers + Interface base class for controllers. Bence Magyar Enrique Fernandez diff --git a/controller_manager_tests/package.xml b/controller_manager_tests/package.xml index 81cec45d3..c7f4e52cb 100644 --- a/controller_manager_tests/package.xml +++ b/controller_manager_tests/package.xml @@ -1,7 +1,7 @@ controller_manager_tests 0.15.1 - controller_manager_tests + Tests for the controller manager. Bence Magyar Enrique Fernandez diff --git a/rqt_controller_manager/package.xml b/rqt_controller_manager/package.xml index 2a3fce460..b1531a555 100644 --- a/rqt_controller_manager/package.xml +++ b/rqt_controller_manager/package.xml @@ -1,7 +1,7 @@ rqt_controller_manager 0.15.1 - The rqt_controller_manager package + Graphical frontend for interacting with the controller manager. Bence Magyar Enrique Fernandez From 6f4648dedf888b4faccc582d0cb99da3deed6675 Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Thu, 9 Jan 2020 13:11:15 -0500 Subject: [PATCH 09/19] Remove installs from _tests packages --- combined_robot_hw_tests/CMakeLists.txt | 69 ++++++----------------- controller_manager_tests/CMakeLists.txt | 73 +++++++------------------ 2 files changed, 35 insertions(+), 107 deletions(-) diff --git a/combined_robot_hw_tests/CMakeLists.txt b/combined_robot_hw_tests/CMakeLists.txt index b4fa46f22..f451ccb52 100644 --- a/combined_robot_hw_tests/CMakeLists.txt +++ b/combined_robot_hw_tests/CMakeLists.txt @@ -11,37 +11,7 @@ find_package(catkin REQUIRED COMPONENTS ) # Declare a catkin package -catkin_package( - INCLUDE_DIRS - include - LIBRARIES - ${PROJECT_NAME} - CATKIN_DEPENDS - combined_robot_hw - hardware_interface - roscpp - # Note: controller_manager and controller_manager_tests are only used in tests -) - - -########### -## Build ## -########### - -# Specify header include paths -include_directories(include ${catkin_INCLUDE_DIRS}) - -add_library(${PROJECT_NAME} - src/my_robot_hw_1.cpp - src/my_robot_hw_2.cpp - src/my_robot_hw_3.cpp - src/my_robot_hw_4.cpp -) -add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS}) -target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES}) - -add_executable(combined_robot_hw_dummy_app src/dummy_app.cpp) -target_link_libraries(combined_robot_hw_dummy_app ${PROJECT_NAME} ${catkin_LIBRARIES}) +catkin_package() ############# @@ -51,6 +21,21 @@ target_link_libraries(combined_robot_hw_dummy_app ${PROJECT_NAME} ${catkin_LIBRA if(CATKIN_ENABLE_TESTING) find_package(rostest REQUIRED) + # Specify header include paths + include_directories(include ${catkin_INCLUDE_DIRS}) + + add_library(${PROJECT_NAME} EXCLUDE_FROM_ALL + src/my_robot_hw_1.cpp + src/my_robot_hw_2.cpp + src/my_robot_hw_3.cpp + src/my_robot_hw_4.cpp + ) + add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS}) + target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES}) + + add_executable(combined_robot_hw_dummy_app EXCLUDE_FROM_ALL src/dummy_app.cpp) + target_link_libraries(combined_robot_hw_dummy_app ${PROJECT_NAME} ${catkin_LIBRARIES}) + add_rostest_gtest(combined_robot_hw_test test/combined_robot_hw_test.test test/combined_robot_hw_test.cpp @@ -63,25 +48,3 @@ if(CATKIN_ENABLE_TESTING) ) target_link_libraries(combined_robot_hw_cm_test ${PROJECT_NAME} ${catkin_LIBRARIES}) endif() - - -############# -## Install ## -############# - -# Install headers -install(DIRECTORY include/${PROJECT_NAME}/ - DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} -) - -# Install targets -install(TARGETS ${PROJECT_NAME} combined_robot_hw_dummy_app - ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION} -) - -# Install plugins -install(FILES test_robot_hw_plugin.xml - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} -) diff --git a/controller_manager_tests/CMakeLists.txt b/controller_manager_tests/CMakeLists.txt index 2d46d8388..2fc09360d 100644 --- a/controller_manager_tests/CMakeLists.txt +++ b/controller_manager_tests/CMakeLists.txt @@ -10,37 +10,7 @@ find_package(catkin REQUIRED COMPONENTS catkin_python_setup() # Declare a catkin package -catkin_package( - INCLUDE_DIRS - include - LIBRARIES - ${PROJECT_NAME} - CATKIN_DEPENDS - controller_interface - controller_manager -) - - -########### -## Build ## -########### - -# Specify header include paths -include_directories(include ${catkin_INCLUDE_DIRS}) - -add_library(${PROJECT_NAME} - src/effort_test_controller.cpp - src/extensible_controllers.cpp - src/my_dummy_controller.cpp - src/my_robot_hw.cpp - src/pos_eff_controller.cpp - src/pos_eff_opt_controller.cpp - src/vel_eff_controller.cpp -) -target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES}) - -add_executable(dummy_app src/dummy_app.cpp) -target_link_libraries(dummy_app ${PROJECT_NAME} ${catkin_LIBRARIES}) +catkin_package() ############# @@ -50,7 +20,24 @@ target_link_libraries(dummy_app ${PROJECT_NAME} ${catkin_LIBRARIES}) if(CATKIN_ENABLE_TESTING) find_package(rostest REQUIRED) - add_executable(cm_test test/cm_test.cpp) + # Specify header include paths + include_directories(include ${catkin_INCLUDE_DIRS}) + + add_library(${PROJECT_NAME} EXCLUDE_FROM_ALL + src/effort_test_controller.cpp + src/extensible_controllers.cpp + src/my_dummy_controller.cpp + src/my_robot_hw.cpp + src/pos_eff_controller.cpp + src/pos_eff_opt_controller.cpp + src/vel_eff_controller.cpp + ) + target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES}) + + add_executable(dummy_app EXCLUDE_FROM_ALL src/dummy_app.cpp) + target_link_libraries(dummy_app ${PROJECT_NAME} ${catkin_LIBRARIES}) + + add_executable(cm_test EXCLUDE_FROM_ALL test/cm_test.cpp) add_dependencies(tests cm_test) target_link_libraries(cm_test ${catkin_LIBRARIES} ${GTEST_LIBRARIES}) @@ -62,25 +49,3 @@ if(CATKIN_ENABLE_TESTING) add_rostest(test/controller_manager_scripts.test) endif() - - -############# -## Install ## -############# - -# Install headers -install(DIRECTORY include/${PROJECT_NAME}/ - DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} -) - -# Install targets -install(TARGETS ${PROJECT_NAME} dummy_app - ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION} -) - -# Install plugins -install(FILES test_controllers_plugin.xml - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} -) From 41f6cff85e40dba33fb693724b351fc8ba37de9c Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Thu, 9 Jan 2020 13:40:27 -0500 Subject: [PATCH 10/19] Correct test dependencies --- combined_robot_hw_tests/CMakeLists.txt | 1 + controller_manager_tests/CMakeLists.txt | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/combined_robot_hw_tests/CMakeLists.txt b/combined_robot_hw_tests/CMakeLists.txt index f451ccb52..f29641d9f 100644 --- a/combined_robot_hw_tests/CMakeLists.txt +++ b/combined_robot_hw_tests/CMakeLists.txt @@ -46,5 +46,6 @@ if(CATKIN_ENABLE_TESTING) test/cm_test.test test/cm_test.cpp ) + add_dependencies(combined_robot_hw_cm_test combined_robot_hw_dummy_app) target_link_libraries(combined_robot_hw_cm_test ${PROJECT_NAME} ${catkin_LIBRARIES}) endif() diff --git a/controller_manager_tests/CMakeLists.txt b/controller_manager_tests/CMakeLists.txt index 2fc09360d..71aa3d0aa 100644 --- a/controller_manager_tests/CMakeLists.txt +++ b/controller_manager_tests/CMakeLists.txt @@ -38,14 +38,13 @@ if(CATKIN_ENABLE_TESTING) target_link_libraries(dummy_app ${PROJECT_NAME} ${catkin_LIBRARIES}) add_executable(cm_test EXCLUDE_FROM_ALL test/cm_test.cpp) - add_dependencies(tests cm_test) target_link_libraries(cm_test ${catkin_LIBRARIES} ${GTEST_LIBRARIES}) - add_rostest(test/cm_test.test) - catkin_add_nosetests(test) + add_rostest(test/cm_test.test DEPENDENCIES dummy_app cm_test) + add_rostest(test/cm_msgs_utils_rostest.test) - add_rostest(test/controller_manager_scripts.test) + add_rostest(test/controller_manager_scripts.test DEPENDENCIES dummy_app) endif() From 37d1288ee033b8933e9747121c92797c67a3a886 Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Thu, 9 Jan 2020 13:48:41 -0500 Subject: [PATCH 11/19] Remove rosunit test_depend from package.xml --- controller_interface/package.xml | 2 -- hardware_interface/package.xml | 2 -- joint_limits_interface/package.xml | 1 - transmission_interface/package.xml | 1 - 4 files changed, 6 deletions(-) diff --git a/controller_interface/package.xml b/controller_interface/package.xml index 9a2e6ad3a..99b4506da 100644 --- a/controller_interface/package.xml +++ b/controller_interface/package.xml @@ -20,6 +20,4 @@ hardware_interface pluginlib roscpp - - rosunit diff --git a/hardware_interface/package.xml b/hardware_interface/package.xml index 4cd7244c4..162a1d72a 100644 --- a/hardware_interface/package.xml +++ b/hardware_interface/package.xml @@ -19,6 +19,4 @@ catkin roscpp - - rosunit diff --git a/joint_limits_interface/package.xml b/joint_limits_interface/package.xml index 967164e58..9d5a69680 100644 --- a/joint_limits_interface/package.xml +++ b/joint_limits_interface/package.xml @@ -23,6 +23,5 @@ roscpp urdf - rosunit rostest diff --git a/transmission_interface/package.xml b/transmission_interface/package.xml index 249158a61..b775bab0d 100644 --- a/transmission_interface/package.xml +++ b/transmission_interface/package.xml @@ -25,7 +25,6 @@ hardware_interface resource_retriever - rosunit From 79b504c3c6b97538a52effa09b9e2cdb5c6a3bea Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Thu, 9 Jan 2020 14:07:03 -0500 Subject: [PATCH 12/19] Add missing roscpp & rospy dependencies --- controller_manager/CMakeLists.txt | 2 ++ controller_manager/package.xml | 1 + controller_manager_tests/CMakeLists.txt | 1 + controller_manager_tests/package.xml | 1 + joint_limits_interface/CMakeLists.txt | 3 ++- rqt_controller_manager/CMakeLists.txt | 2 +- rqt_controller_manager/package.xml | 1 + 7 files changed, 9 insertions(+), 2 deletions(-) diff --git a/controller_manager/CMakeLists.txt b/controller_manager/CMakeLists.txt index 7b161f236..5052746db 100644 --- a/controller_manager/CMakeLists.txt +++ b/controller_manager/CMakeLists.txt @@ -7,6 +7,7 @@ find_package(catkin REQUIRED COMPONENTS controller_manager_msgs hardware_interface pluginlib + roscpp ) # Include Boost.Thread @@ -25,6 +26,7 @@ catkin_package( controller_manager_msgs hardware_interface pluginlib + roscpp DEPENDS Boost ) diff --git a/controller_manager/package.xml b/controller_manager/package.xml index e25e77533..c42d1c4fc 100644 --- a/controller_manager/package.xml +++ b/controller_manager/package.xml @@ -22,6 +22,7 @@ controller_manager_msgs hardware_interface pluginlib + roscpp rostest diff --git a/controller_manager_tests/CMakeLists.txt b/controller_manager_tests/CMakeLists.txt index 71aa3d0aa..66292b49a 100644 --- a/controller_manager_tests/CMakeLists.txt +++ b/controller_manager_tests/CMakeLists.txt @@ -5,6 +5,7 @@ project(controller_manager_tests) find_package(catkin REQUIRED COMPONENTS controller_interface controller_manager + roscpp ) catkin_python_setup() diff --git a/controller_manager_tests/package.xml b/controller_manager_tests/package.xml index c7f4e52cb..97f57fa02 100644 --- a/controller_manager_tests/package.xml +++ b/controller_manager_tests/package.xml @@ -20,6 +20,7 @@ controller_interface controller_manager + roscpp rosbash rosnode diff --git a/joint_limits_interface/CMakeLists.txt b/joint_limits_interface/CMakeLists.txt index cc71b9ca7..fdb0d1afd 100644 --- a/joint_limits_interface/CMakeLists.txt +++ b/joint_limits_interface/CMakeLists.txt @@ -17,7 +17,8 @@ catkin_package( include CATKIN_DEPENDS hardware_interface - roscpp urdf + roscpp + urdf DEPENDS urdfdom ) diff --git a/rqt_controller_manager/CMakeLists.txt b/rqt_controller_manager/CMakeLists.txt index 69067a88a..f024e97fa 100644 --- a/rqt_controller_manager/CMakeLists.txt +++ b/rqt_controller_manager/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.3) project(rqt_controller_manager) # Load catkin and all dependencies required for this package -find_package(catkin REQUIRED COMPONENTS) +find_package(catkin REQUIRED) catkin_python_setup() diff --git a/rqt_controller_manager/package.xml b/rqt_controller_manager/package.xml index b1531a555..939b26144 100644 --- a/rqt_controller_manager/package.xml +++ b/rqt_controller_manager/package.xml @@ -20,6 +20,7 @@ controller_manager rqt_gui + rospy From 7ca25abf01cb22ef6610be63d219350780c8e000 Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Thu, 9 Jan 2020 19:04:43 -0500 Subject: [PATCH 13/19] Remove liburdfdom-dev --- joint_limits_interface/CMakeLists.txt | 13 ++++--------- joint_limits_interface/package.xml | 1 - 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/joint_limits_interface/CMakeLists.txt b/joint_limits_interface/CMakeLists.txt index fdb0d1afd..d2a994782 100644 --- a/joint_limits_interface/CMakeLists.txt +++ b/joint_limits_interface/CMakeLists.txt @@ -8,9 +8,6 @@ find_package(catkin REQUIRED COMPONENTS urdf ) -# Include urdfdom -find_package(urdfdom REQUIRED) # TODO: Delete - # Declare a catkin package catkin_package( INCLUDE_DIRS @@ -19,8 +16,6 @@ catkin_package( hardware_interface roscpp urdf - DEPENDS - urdfdom ) @@ -29,7 +24,7 @@ catkin_package( ########### # Specify header include paths -include_directories(include ${catkin_INCLUDE_DIRS} ${urdfdom_INCLUDE_DIRS}) +include_directories(include ${catkin_INCLUDE_DIRS}) ############# @@ -40,16 +35,16 @@ if(CATKIN_ENABLE_TESTING) find_package(rostest REQUIRED) catkin_add_gtest(joint_limits_interface_test test/joint_limits_interface_test.cpp) - target_link_libraries(joint_limits_interface_test ${catkin_LIBRARIES} ${urdfdom_LIBRARIES}) + target_link_libraries(joint_limits_interface_test ${catkin_LIBRARIES}) catkin_add_gtest(joint_limits_urdf_test test/joint_limits_urdf_test.cpp) - target_link_libraries(joint_limits_urdf_test ${catkin_LIBRARIES} ${urdfdom_LIBRARIES}) + target_link_libraries(joint_limits_urdf_test ${catkin_LIBRARIES}) add_rostest_gtest(joint_limits_rosparam_test test/joint_limits_rosparam.test test/joint_limits_rosparam_test.cpp ) - target_link_libraries(joint_limits_rosparam_test ${catkin_LIBRARIES} ${urdfdom_LIBRARIES}) + target_link_libraries(joint_limits_rosparam_test ${catkin_LIBRARIES}) endif() diff --git a/joint_limits_interface/package.xml b/joint_limits_interface/package.xml index 9d5a69680..fedf66b98 100644 --- a/joint_limits_interface/package.xml +++ b/joint_limits_interface/package.xml @@ -19,7 +19,6 @@ catkin hardware_interface - liburdfdom-dev roscpp urdf From 2864284b3c77973b54661fdf47a2b323c04d73a7 Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Thu, 9 Jan 2020 20:01:18 -0500 Subject: [PATCH 14/19] Re-install test plugins --- combined_robot_hw_tests/CMakeLists.txt | 10 ++++++++++ controller_manager_tests/CMakeLists.txt | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/combined_robot_hw_tests/CMakeLists.txt b/combined_robot_hw_tests/CMakeLists.txt index f29641d9f..6684f267a 100644 --- a/combined_robot_hw_tests/CMakeLists.txt +++ b/combined_robot_hw_tests/CMakeLists.txt @@ -49,3 +49,13 @@ if(CATKIN_ENABLE_TESTING) add_dependencies(combined_robot_hw_cm_test combined_robot_hw_dummy_app) target_link_libraries(combined_robot_hw_cm_test ${PROJECT_NAME} ${catkin_LIBRARIES}) endif() + + +############# +## Install ## +############# + +# Install plugins +install(FILES test_robot_hw_plugin.xml + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +) diff --git a/controller_manager_tests/CMakeLists.txt b/controller_manager_tests/CMakeLists.txt index 66292b49a..98f9a4f15 100644 --- a/controller_manager_tests/CMakeLists.txt +++ b/controller_manager_tests/CMakeLists.txt @@ -49,3 +49,13 @@ if(CATKIN_ENABLE_TESTING) add_rostest(test/controller_manager_scripts.test DEPENDENCIES dummy_app) endif() + + +############# +## Install ## +############# + +# Install plugins +install(FILES test_controllers_plugin.xml + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +) From b3654b3b2c1f732b34e54561597d5789dbce51c2 Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Fri, 10 Jan 2020 14:11:21 -0500 Subject: [PATCH 15/19] Update package dependencies --- combined_robot_hw_tests/CMakeLists.txt | 2 ++ combined_robot_hw_tests/package.xml | 11 +++++++---- controller_interface/CMakeLists.txt | 2 -- controller_interface/package.xml | 1 - controller_manager/package.xml | 5 +++++ controller_manager_msgs/package.xml | 2 ++ controller_manager_tests/CMakeLists.txt | 1 + controller_manager_tests/package.xml | 8 ++++++-- hardware_interface/CMakeLists.txt | 2 ++ hardware_interface/package.xml | 1 + joint_limits_interface/package.xml | 1 - rqt_controller_manager/package.xml | 5 +++-- transmission_interface/CMakeLists.txt | 2 ++ transmission_interface/package.xml | 3 ++- 14 files changed, 33 insertions(+), 13 deletions(-) diff --git a/combined_robot_hw_tests/CMakeLists.txt b/combined_robot_hw_tests/CMakeLists.txt index 6684f267a..d7ec445a3 100644 --- a/combined_robot_hw_tests/CMakeLists.txt +++ b/combined_robot_hw_tests/CMakeLists.txt @@ -5,8 +5,10 @@ project(combined_robot_hw_tests) find_package(catkin REQUIRED COMPONENTS combined_robot_hw controller_manager + controller_manager_msgs controller_manager_tests hardware_interface + pluginlib roscpp ) diff --git a/combined_robot_hw_tests/package.xml b/combined_robot_hw_tests/package.xml index 9a3207b4c..3d12593e9 100644 --- a/combined_robot_hw_tests/package.xml +++ b/combined_robot_hw_tests/package.xml @@ -18,12 +18,15 @@ catkin - combined_robot_hw - controller_manager - controller_manager_tests hardware_interface - roscpp + pluginlib + combined_robot_hw + controller_manager + roscpp + + controller_manager_msgs + controller_manager_tests rostest diff --git a/controller_interface/CMakeLists.txt b/controller_interface/CMakeLists.txt index ad814dbe7..f73239da1 100644 --- a/controller_interface/CMakeLists.txt +++ b/controller_interface/CMakeLists.txt @@ -4,7 +4,6 @@ project(controller_interface) # Load catkin and all dependencies required for this package find_package(catkin REQUIRED COMPONENTS hardware_interface - pluginlib roscpp ) @@ -14,7 +13,6 @@ catkin_package( include CATKIN_DEPENDS hardware_interface - pluginlib roscpp ) diff --git a/controller_interface/package.xml b/controller_interface/package.xml index 99b4506da..9194dbb07 100644 --- a/controller_interface/package.xml +++ b/controller_interface/package.xml @@ -18,6 +18,5 @@ catkin hardware_interface - pluginlib roscpp diff --git a/controller_manager/package.xml b/controller_manager/package.xml index c42d1c4fc..717bf67e0 100644 --- a/controller_manager/package.xml +++ b/controller_manager/package.xml @@ -18,11 +18,16 @@ catkin + boost controller_interface controller_manager_msgs hardware_interface pluginlib roscpp + std_msgs + rosparam + rospy + rostest diff --git a/controller_manager_msgs/package.xml b/controller_manager_msgs/package.xml index 2a22d6cd6..f154b1946 100644 --- a/controller_manager_msgs/package.xml +++ b/controller_manager_msgs/package.xml @@ -22,4 +22,6 @@ message_generation message_runtime + rosservice + rospy diff --git a/controller_manager_tests/CMakeLists.txt b/controller_manager_tests/CMakeLists.txt index 98f9a4f15..b15e56164 100644 --- a/controller_manager_tests/CMakeLists.txt +++ b/controller_manager_tests/CMakeLists.txt @@ -5,6 +5,7 @@ project(controller_manager_tests) find_package(catkin REQUIRED COMPONENTS controller_interface controller_manager + hardware_interface roscpp ) diff --git a/controller_manager_tests/package.xml b/controller_manager_tests/package.xml index 97f57fa02..ed5b2cbbd 100644 --- a/controller_manager_tests/package.xml +++ b/controller_manager_tests/package.xml @@ -20,11 +20,15 @@ controller_interface controller_manager - roscpp + hardware_interface + + roscpp + + controller_manager_msgs + rospy rosbash rosnode - rosservice rostest diff --git a/hardware_interface/CMakeLists.txt b/hardware_interface/CMakeLists.txt index 0e597c00c..18ad066c9 100644 --- a/hardware_interface/CMakeLists.txt +++ b/hardware_interface/CMakeLists.txt @@ -15,6 +15,8 @@ catkin_package( include CATKIN_DEPENDS roscpp + DEPENDS + Boost # TODO: Should header-only dependencies be DEPENDS or INCLUDE_DIRS? ) diff --git a/hardware_interface/package.xml b/hardware_interface/package.xml index 162a1d72a..3a8c4074d 100644 --- a/hardware_interface/package.xml +++ b/hardware_interface/package.xml @@ -18,5 +18,6 @@ catkin + boost roscpp diff --git a/joint_limits_interface/package.xml b/joint_limits_interface/package.xml index fedf66b98..ce862b506 100644 --- a/joint_limits_interface/package.xml +++ b/joint_limits_interface/package.xml @@ -15,7 +15,6 @@ Adolfo Rodriguez Tsouroukdissian - catkin hardware_interface diff --git a/rqt_controller_manager/package.xml b/rqt_controller_manager/package.xml index 939b26144..e773fcd3a 100644 --- a/rqt_controller_manager/package.xml +++ b/rqt_controller_manager/package.xml @@ -18,9 +18,10 @@ catkin - controller_manager - rqt_gui + controller_manager_msgs rospy + rqt_gui + rqt_gui_py diff --git a/transmission_interface/CMakeLists.txt b/transmission_interface/CMakeLists.txt index a5004eac0..e3c3e7fa4 100644 --- a/transmission_interface/CMakeLists.txt +++ b/transmission_interface/CMakeLists.txt @@ -24,9 +24,11 @@ catkin_package( ${PROJECT_NAME}_loader ${PROJECT_NAME}_loader_plugins CATKIN_DEPENDS + hardware_interface pluginlib roscpp DEPENDS + Boost # TODO: Should header-only dependencies be DEPENDS or INCLUDE_DIRS? TinyXML ) diff --git a/transmission_interface/package.xml b/transmission_interface/package.xml index b775bab0d..8153ea3bd 100644 --- a/transmission_interface/package.xml +++ b/transmission_interface/package.xml @@ -17,12 +17,13 @@ catkin + boost + hardware_interface pluginlib roscpp tinyxml cmake_modules - hardware_interface resource_retriever From 2db99f34d1fbfecf32c485239755ecfdfab6cee5 Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Sat, 11 Jan 2020 15:18:02 -0500 Subject: [PATCH 16/19] Re-install test plugin libraries --- combined_robot_hw_tests/CMakeLists.txt | 23 ++++++++++++++++++----- controller_manager_tests/CMakeLists.txt | 23 ++++++++++++++++++----- 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/combined_robot_hw_tests/CMakeLists.txt b/combined_robot_hw_tests/CMakeLists.txt index d7ec445a3..46402d29c 100644 --- a/combined_robot_hw_tests/CMakeLists.txt +++ b/combined_robot_hw_tests/CMakeLists.txt @@ -26,7 +26,7 @@ if(CATKIN_ENABLE_TESTING) # Specify header include paths include_directories(include ${catkin_INCLUDE_DIRS}) - add_library(${PROJECT_NAME} EXCLUDE_FROM_ALL + add_library(${PROJECT_NAME} src/my_robot_hw_1.cpp src/my_robot_hw_2.cpp src/my_robot_hw_3.cpp @@ -57,7 +57,20 @@ endif() ## Install ## ############# -# Install plugins -install(FILES test_robot_hw_plugin.xml - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} -) +# NOTE: Libraries and plugins required for tests are installed since CI +# runs tests out of the install space rather than the devel space + +if(CATKIN_ENABLE_TESTING) + + # Install targets + install(TARGETS ${PROJECT_NAME} + ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} + LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} + RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION} + ) + + # Install plugins + install(FILES test_robot_hw_plugin.xml + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} + ) +endif() diff --git a/controller_manager_tests/CMakeLists.txt b/controller_manager_tests/CMakeLists.txt index b15e56164..036aafc71 100644 --- a/controller_manager_tests/CMakeLists.txt +++ b/controller_manager_tests/CMakeLists.txt @@ -25,7 +25,7 @@ if(CATKIN_ENABLE_TESTING) # Specify header include paths include_directories(include ${catkin_INCLUDE_DIRS}) - add_library(${PROJECT_NAME} EXCLUDE_FROM_ALL + add_library(${PROJECT_NAME} src/effort_test_controller.cpp src/extensible_controllers.cpp src/my_dummy_controller.cpp @@ -56,7 +56,20 @@ endif() ## Install ## ############# -# Install plugins -install(FILES test_controllers_plugin.xml - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} -) +# NOTE: Libraries and plugins required for tests are installed since CI +# runs tests out of the install space rather than the devel space + +if(CATKIN_ENABLE_TESTING) + + # Install targets + install(TARGETS ${PROJECT_NAME} + ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} + LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} + RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION} + ) + + # Install plugins + install(FILES test_controllers_plugin.xml + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} + ) +endif() From fa93166c2c77163f661aa8da9b8eeb0cbed5d22d Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Sat, 11 Jan 2020 17:25:59 -0500 Subject: [PATCH 17/19] Add ${catkin_EXPORTED_TARGETS} dependencies --- combined_robot_hw_tests/CMakeLists.txt | 3 +-- controller_manager/CMakeLists.txt | 2 ++ controller_manager_tests/CMakeLists.txt | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/combined_robot_hw_tests/CMakeLists.txt b/combined_robot_hw_tests/CMakeLists.txt index 46402d29c..858b68e76 100644 --- a/combined_robot_hw_tests/CMakeLists.txt +++ b/combined_robot_hw_tests/CMakeLists.txt @@ -32,7 +32,6 @@ if(CATKIN_ENABLE_TESTING) src/my_robot_hw_3.cpp src/my_robot_hw_4.cpp ) - add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS}) target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES}) add_executable(combined_robot_hw_dummy_app EXCLUDE_FROM_ALL src/dummy_app.cpp) @@ -48,7 +47,7 @@ if(CATKIN_ENABLE_TESTING) test/cm_test.test test/cm_test.cpp ) - add_dependencies(combined_robot_hw_cm_test combined_robot_hw_dummy_app) + add_dependencies(combined_robot_hw_cm_test combined_robot_hw_dummy_app ${catkin_EXPORTED_TARGETS}) target_link_libraries(combined_robot_hw_cm_test ${PROJECT_NAME} ${catkin_LIBRARIES}) endif() diff --git a/controller_manager/CMakeLists.txt b/controller_manager/CMakeLists.txt index 5052746db..eaeb26fb4 100644 --- a/controller_manager/CMakeLists.txt +++ b/controller_manager/CMakeLists.txt @@ -60,12 +60,14 @@ if(CATKIN_ENABLE_TESTING) test/hwi_switch_test.test test/hwi_switch_test.cpp ) + add_dependencies(${PROJECT_NAME}_hwi_switch_test ${catkin_EXPORTED_TARGETS}) target_link_libraries(${PROJECT_NAME}_hwi_switch_test ${PROJECT_NAME} ${catkin_LIBRARIES}) add_rostest_gmock(${PROJECT_NAME}_hwi_update_test test/hwi_update_test.test test/hwi_update_test.cpp ) + add_dependencies(${PROJECT_NAME}_hwi_update_test ${catkin_EXPORTED_TARGETS}) target_link_libraries(${PROJECT_NAME}_hwi_update_test ${PROJECT_NAME} ${catkin_LIBRARIES}) endif() diff --git a/controller_manager_tests/CMakeLists.txt b/controller_manager_tests/CMakeLists.txt index 036aafc71..3165b9b5c 100644 --- a/controller_manager_tests/CMakeLists.txt +++ b/controller_manager_tests/CMakeLists.txt @@ -37,9 +37,11 @@ if(CATKIN_ENABLE_TESTING) target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES}) add_executable(dummy_app EXCLUDE_FROM_ALL src/dummy_app.cpp) + add_dependencies(dummy_app ${catkin_EXPORTED_TARGETS}) target_link_libraries(dummy_app ${PROJECT_NAME} ${catkin_LIBRARIES}) add_executable(cm_test EXCLUDE_FROM_ALL test/cm_test.cpp) + add_dependencies(cm_test ${catkin_EXPORTED_TARGETS}) target_link_libraries(cm_test ${catkin_LIBRARIES} ${GTEST_LIBRARIES}) catkin_add_nosetests(test) From 78c19574f9d0b59eebb4b9861d1b4511aaa300a0 Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Mon, 13 Jan 2020 16:00:30 -0500 Subject: [PATCH 18/19] Update dependencies - Dependencies needed to compile are - Dependencies used in public headers are - Dependencies needed to link or run are --- combined_robot_hw/package.xml | 8 ++++++-- combined_robot_hw_tests/package.xml | 12 +++++++----- controller_interface/package.xml | 5 ++++- controller_manager/package.xml | 14 ++++++++++---- controller_manager_tests/CMakeLists.txt | 1 + controller_manager_tests/package.xml | 10 +++++++--- hardware_interface/package.xml | 5 ++++- joint_limits_interface/package.xml | 5 ++++- transmission_interface/package.xml | 10 +++++++--- 9 files changed, 50 insertions(+), 20 deletions(-) diff --git a/combined_robot_hw/package.xml b/combined_robot_hw/package.xml index 77ceac014..232bf9129 100644 --- a/combined_robot_hw/package.xml +++ b/combined_robot_hw/package.xml @@ -18,7 +18,11 @@ catkin - hardware_interface - pluginlib roscpp + + hardware_interface + pluginlib + + hardware_interface + pluginlib diff --git a/combined_robot_hw_tests/package.xml b/combined_robot_hw_tests/package.xml index 3d12593e9..8f599d671 100644 --- a/combined_robot_hw_tests/package.xml +++ b/combined_robot_hw_tests/package.xml @@ -18,12 +18,14 @@ catkin - hardware_interface - pluginlib + combined_robot_hw + controller_manager + hardware_interface + roscpp - combined_robot_hw - controller_manager - roscpp + pluginlib + + pluginlib controller_manager_msgs controller_manager_tests diff --git a/controller_interface/package.xml b/controller_interface/package.xml index 9194dbb07..455de7edb 100644 --- a/controller_interface/package.xml +++ b/controller_interface/package.xml @@ -17,6 +17,9 @@ catkin - hardware_interface roscpp + + hardware_interface + + hardware_interface diff --git a/controller_manager/package.xml b/controller_manager/package.xml index 717bf67e0..f1a1b35b7 100644 --- a/controller_manager/package.xml +++ b/controller_manager/package.xml @@ -19,12 +19,18 @@ catkin boost - controller_interface - controller_manager_msgs - hardware_interface - pluginlib roscpp + controller_interface + controller_manager_msgs + hardware_interface + pluginlib + + controller_interface + controller_manager_msgs + hardware_interface + pluginlib + std_msgs rosparam rospy diff --git a/controller_manager_tests/CMakeLists.txt b/controller_manager_tests/CMakeLists.txt index 3165b9b5c..7cdb4a365 100644 --- a/controller_manager_tests/CMakeLists.txt +++ b/controller_manager_tests/CMakeLists.txt @@ -6,6 +6,7 @@ find_package(catkin REQUIRED COMPONENTS controller_interface controller_manager hardware_interface + pluginlib roscpp ) diff --git a/controller_manager_tests/package.xml b/controller_manager_tests/package.xml index ed5b2cbbd..282eb6ff8 100644 --- a/controller_manager_tests/package.xml +++ b/controller_manager_tests/package.xml @@ -18,11 +18,15 @@ catkin - controller_interface + controller_interface controller_manager - hardware_interface + roscpp - roscpp + hardware_interface + pluginlib + + hardware_interface + pluginlib controller_manager_msgs rospy diff --git a/hardware_interface/package.xml b/hardware_interface/package.xml index 3a8c4074d..8fe302dec 100644 --- a/hardware_interface/package.xml +++ b/hardware_interface/package.xml @@ -18,6 +18,9 @@ catkin - boost roscpp + + boost + + boost diff --git a/joint_limits_interface/package.xml b/joint_limits_interface/package.xml index ce862b506..e72fb8cee 100644 --- a/joint_limits_interface/package.xml +++ b/joint_limits_interface/package.xml @@ -17,9 +17,12 @@ catkin - hardware_interface roscpp urdf + hardware_interface + + hardware_interface + rostest diff --git a/transmission_interface/package.xml b/transmission_interface/package.xml index 8153ea3bd..87facfc36 100644 --- a/transmission_interface/package.xml +++ b/transmission_interface/package.xml @@ -17,13 +17,17 @@ catkin - boost - hardware_interface - pluginlib roscpp tinyxml + boost cmake_modules + hardware_interface + pluginlib + + boost + hardware_interface + pluginlib resource_retriever From def3541cce4ce19495e08124ba39218d08176ebc Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Mon, 13 Jan 2020 16:02:08 -0500 Subject: [PATCH 19/19] Resolve Boost dependency issues --- controller_manager/CMakeLists.txt | 2 +- hardware_interface/CMakeLists.txt | 2 +- transmission_interface/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/controller_manager/CMakeLists.txt b/controller_manager/CMakeLists.txt index eaeb26fb4..0fe594e65 100644 --- a/controller_manager/CMakeLists.txt +++ b/controller_manager/CMakeLists.txt @@ -37,7 +37,7 @@ catkin_package( ########### # Specify header include paths -include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIR}) +include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}) add_library(${PROJECT_NAME} include/controller_manager/controller_loader.h diff --git a/hardware_interface/CMakeLists.txt b/hardware_interface/CMakeLists.txt index 18ad066c9..0022b40fe 100644 --- a/hardware_interface/CMakeLists.txt +++ b/hardware_interface/CMakeLists.txt @@ -16,7 +16,7 @@ catkin_package( CATKIN_DEPENDS roscpp DEPENDS - Boost # TODO: Should header-only dependencies be DEPENDS or INCLUDE_DIRS? + Boost ) diff --git a/transmission_interface/CMakeLists.txt b/transmission_interface/CMakeLists.txt index e3c3e7fa4..360813b3e 100644 --- a/transmission_interface/CMakeLists.txt +++ b/transmission_interface/CMakeLists.txt @@ -28,7 +28,7 @@ catkin_package( pluginlib roscpp DEPENDS - Boost # TODO: Should header-only dependencies be DEPENDS or INCLUDE_DIRS? + Boost TinyXML )