From 96d114e152590a61d12ffb181cea7af9577d689c Mon Sep 17 00:00:00 2001 From: Mateus Amarante Date: Thu, 10 Sep 2020 19:12:49 -0300 Subject: [PATCH] Format package.xml and CMakeLists.txt according to ros_control pkgs --- ackermann_steering_controller/CMakeLists.txt | 33 +++++++++++++++----- ackermann_steering_controller/package.xml | 7 ++++- 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/ackermann_steering_controller/CMakeLists.txt b/ackermann_steering_controller/CMakeLists.txt index 15e097ffd..3565ce125 100644 --- a/ackermann_steering_controller/CMakeLists.txt +++ b/ackermann_steering_controller/CMakeLists.txt @@ -6,6 +6,7 @@ if(NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 14) endif() +# Load catkin and all dependencies required for this package find_package(catkin REQUIRED COMPONENTS controller_interface diff_drive_controller @@ -21,6 +22,7 @@ find_package(Boost REQUIRED COMPONENTS system thread) find_package(urdfdom REQUIRED) +# Declare a catkin package catkin_package( LIBRARIES ${PROJECT_NAME} CATKIN_DEPENDS @@ -34,6 +36,11 @@ catkin_package( DEPENDS Boost ) +########### +## Build ## +########### + +# Specify header include paths include_directories( include ${Boost_INCLUDE_DIRS} @@ -44,14 +51,9 @@ include_directories( add_library(${PROJECT_NAME} src/ackermann_steering_controller.cpp src/odometry.cpp) target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${urdfdom_LIBRARIES}) -install(TARGETS ${PROJECT_NAME} - ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} -) - -install(FILES ${PROJECT_NAME}_plugins.xml - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) +############# +## Testing ## +############# if (CATKIN_ENABLE_TESTING) find_package(controller_manager REQUIRED) @@ -125,3 +127,18 @@ if (CATKIN_ENABLE_TESTING) add_rostest(test/ackermann_steering_controller_radius_param_fail_test/ackermann_steering_controller_radius_param_fail.test) add_rostest(test/ackermann_steering_controller_separation_param_test/ackermann_steering_controller_separation_param.test) endif() + +############# +## Install ## +############# + +# Install targets +install(TARGETS ${PROJECT_NAME} + ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} + LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} + RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +) + +# Install plugins +install(FILES ${PROJECT_NAME}_plugins.xml + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) diff --git a/ackermann_steering_controller/package.xml b/ackermann_steering_controller/package.xml index 46f6c3ea7..d6a265aab 100644 --- a/ackermann_steering_controller/package.xml +++ b/ackermann_steering_controller/package.xml @@ -1,8 +1,12 @@ - + + ackermann_steering_controller 0.17.0 Controller for a steer drive mobile base. + Masaru Morita Bence Magyar @@ -10,6 +14,7 @@ https://github.com/ros-controls/ros_controllers/issues https://github.com/ros-controls/ros_controllers/ackermann_steering_controller + Masaru Morita catkin