From 840faa5ec9dcb1dd21aff9b49f3fc27c1b08f08b Mon Sep 17 00:00:00 2001 From: Walter Fetter Lages Date: Wed, 12 Dec 2018 11:35:20 -0200 Subject: [PATCH] Port to Melodic. --- CMakeLists.txt | 96 ++++++++++++++++++++++++++++++++++++++++------------------ package.xml | 59 ++++++++++++++++++++++-------------- 2 files changed, 103 insertions(+), 52 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b1800bb..fafbdee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,22 +1,26 @@ cmake_minimum_required(VERSION 2.8.3) project(pid_plus_gravity_controller) +## Compile as C++11, supported in ROS Kinetic and newer +add_compile_options(-std=c++11) + ## Find catkin macros and libraries ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) ## is used, also find other catkin packages find_package(catkin REQUIRED COMPONENTS - controller_interface - control_msgs - urdf + cmake_modules + control_msgs + controller_interface + kdl_parser +# orocos_kdl + trajectory_msgs + urdf ) -find_package(cmake_modules REQUIRED) ## System dependencies are found with CMake's conventions # find_package(Boost REQUIRED COMPONENTS system) -find_package(Eigen REQUIRED) +find_package(cmake_modules REQUIRED) find_package(orocos_kdl REQUIRED) -find_package(kdl_parser REQUIRED) - ## Uncomment this if the package has a setup.py. This macro ensures ## modules and global scripts declared therein get installed @@ -32,11 +36,11 @@ find_package(kdl_parser REQUIRED) ## * Let MSG_DEP_SET be the set of packages whose message types you use in ## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). ## * In the file package.xml: -## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET -## * If MSG_DEP_SET isn't empty the following dependencies might have been -## pulled in transitively but can be declared for certainty nonetheless: -## * add a build_depend tag for "message_generation" -## * add a run_depend tag for "message_runtime" +## * add a build_depend tag for "message_generation" +## * add a build_depend and a exec_depend tag for each package in MSG_DEP_SET +## * If MSG_DEP_SET isn't empty the following dependency has been pulled in +## but can be declared for certainty nonetheless: +## * add a exec_depend tag for "message_runtime" ## * In this file (CMakeLists.txt): ## * add "message_generation" and every package in MSG_DEP_SET to ## find_package(catkin REQUIRED COMPONENTS ...) @@ -71,7 +75,27 @@ find_package(kdl_parser REQUIRED) ## Generate added messages and services with any dependencies listed here # generate_messages( # DEPENDENCIES -# std_msgs # Or other packages containing msgs +# control_msgs# trajectory_msgs +# ) + +################################################ +## Declare ROS dynamic reconfigure parameters ## +################################################ + +## To declare and build dynamic reconfigure parameters within this +## package, follow these steps: +## * In the file package.xml: +## * add a build_depend and a exec_depend tag for "dynamic_reconfigure" +## * In this file (CMakeLists.txt): +## * add "dynamic_reconfigure" to +## find_package(catkin REQUIRED COMPONENTS ...) +## * uncomment the "generate_dynamic_reconfigure_options" section below +## and list every .cfg file to be processed + +## Generate dynamic reconfigure parameters in the 'cfg' folder +# generate_dynamic_reconfigure_options( +# cfg/DynReconf1.cfg +# cfg/DynReconf2.cfg # ) ################################### @@ -79,16 +103,15 @@ find_package(kdl_parser REQUIRED) ################################### ## The catkin_package macro generates cmake config files for your package ## Declare things to be passed to dependent projects -## INCLUDE_DIRS: uncomment this if you package contains header files +## INCLUDE_DIRS: uncomment this if your package contains header files ## 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( # INCLUDE_DIRS include - LIBRARIES ${PROJECT_NAME} - CATKIN_DEPENDS controller_interface control_msgs urdf -# DEPENDS system_lib - DEPENDS eigen orocos_kdl kdl_parser + LIBRARIES pid_plus_gravity_controller + CATKIN_DEPENDS cmake_modules control_msgs controller_interface kdl_parser trajectory_msgs urdf + DEPENDS orocos_kdl ) ########### @@ -97,28 +120,41 @@ catkin_package( ## Specify additional locations of header files ## Your package locations should be listed before other locations -include_directories(include +include_directories( + include ${catkin_INCLUDE_DIRS} - ${Eigen_INCLUDE_DIRS} + ${orocos_kdl_INCLUDE_DIRS} ) -## Declare a cpp library -add_library(pid_plus_gravity_controller +## Declare a C++ library +add_library(${PROJECT_NAME} src/pid_plus_gravity_controller.cpp ) -## Declare a cpp executable -# add_executable(pid_plus_gravity_controller_node src/pid_plus_gravity_controller_node.cpp) +## Add cmake target dependencies of the library +## as an example, code may need to be generated before libraries +## either from message generation or dynamic reconfigure +# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) + +## Declare a C++ executable +## With catkin_make all packages are built within a single CMake context +## The recommended prefix ensures that target names across packages don't collide +# add_executable(${PROJECT_NAME}_node src/pid_plus_gravity_controller_node.cpp) + +## Rename C++ executable without prefix +## The above recommended prefix causes long target names, the following renames the +## target back to the shorter version for ease of user use +## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node" +# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "") -## Add cmake target dependencies of the executable/library -## as an example, message headers may need to be generated before nodes -# add_dependencies(pid_plus_gravity_controller_node pid_plus_gravity_controller_generate_messages_cpp) +## Add cmake target dependencies of the executable +## same as for the library above +# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) ## Specify libraries to link a library or executable target against target_link_libraries(${PROJECT_NAME} - ${catkin_LIBRARIES} - ${orocos_kdl_LIBRARIES} - ${kdl_parser_LIBRARIES} + ${catkin_LIBRARIES} + ${orocos_kdl_LIBRARIES} ) ############# diff --git a/package.xml b/package.xml index 650270b..fab1600 100644 --- a/package.xml +++ b/package.xml @@ -1,10 +1,10 @@ - + pid_plus_gravity_controller - 1.0.0 + 1.0.1 The pid_plus_gravity_controller package - + Walter Fetter Lages @@ -16,50 +16,65 @@ GPLv3 - + - - + + Walter Fetter Lages - + + + + + + + + + - - + + + + catkin - + cmake_modules + control_msgs controller_interface - orocos_kdl kdl_parser + orocos_kdl trajectory_msgs - control_msgs urdf - cmake_modules - - controller_interface - controller_manager - control_msgs - urdf - kdl_parser + cmake_modules + control_msgs + controller_interface + kdl_parser + orocos_kdl + trajectory_msgs + urdf + cmake_modules + control_msgs + controller_interface + kdl_parser + orocos_kdl + trajectory_msgs + urdf + - - - -- 2.12.0