Skip to content

Commit

Permalink
fix catkin_lint issues (#1341)
Browse files Browse the repository at this point in the history
* Change package.xml to format 2
* Fix dependencies
  * add missing dependencies in package.xml
  * add missing find_package(... REQUIRED) calls
  * add missing CATKIN_DEPENDS
  * fix system DEPENDS
* Use CATKIN_*_DESTINATION
* Quote cmake variable expansions for PROPERTIES
* Suppress spurious catkin_lint errors/warnings: fkie/catkin_lint#62
* Only run coverage tests if CATKIN_ENABLE_TESTING is set
  • Loading branch information
rhaschke committed Feb 7, 2019
1 parent 8121e46 commit 8075221
Show file tree
Hide file tree
Showing 106 changed files with 494 additions and 697 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
Expand Up @@ -20,8 +20,7 @@ env:
- TEST_BLACKLIST=moveit_ros_perception # mesh_filter_test fails due to broken Mesa OpenGL
- WARNINGS_OK=false
matrix:
- TEST=clang-format
- TEST=catkin_lint
- TEST="clang-format catkin_lint"
- ROS_DISTRO=melodic
- ROS_DISTRO=kinetic

Expand All @@ -32,9 +31,6 @@ matrix: # Add a separate config to the matrix, using clang as compiler
env: ROS_REPO=ros-shadow-fixed
BEFORE_DOCKER_SCRIPT="source moveit_kinematics/test/test_ikfast_plugins.sh"

allow_failures:
- env: TEST=catkin_lint # need to fix catkin_lint errors

before_script:
- git clone -q --depth=1 https://github.com/ros-planning/moveit_ci.git .moveit_ci

Expand Down
14 changes: 7 additions & 7 deletions moveit/package.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<package>
<package format="2">
<name>moveit</name>
<version>0.10.8</version>
<description>Meta package that contains all essential package of MoveIt!. Until Summer 2016 MoveIt! had been developed over multiple repositories, where developers' usability and maintenance effort was non-trivial. See <a href = "http://discourse.ros.org/t/migration-to-one-github-repo-for-moveit/266/34">the detailed discussion for the merge of several repositories</a>.</description>
Expand All @@ -20,12 +20,12 @@
<author email="robot.moveit@gmail.com">Sachin Chitta</author>

<buildtool_depend>catkin</buildtool_depend>
<run_depend>moveit_commander</run_depend>
<run_depend>moveit_core</run_depend>
<run_depend>moveit_planners</run_depend>
<run_depend>moveit_plugins</run_depend>
<run_depend>moveit_ros</run_depend>
<run_depend>moveit_setup_assistant</run_depend>
<exec_depend>moveit_commander</exec_depend>
<exec_depend>moveit_core</exec_depend>
<exec_depend>moveit_planners</exec_depend>
<exec_depend>moveit_plugins</exec_depend>
<exec_depend>moveit_ros</exec_depend>
<exec_depend>moveit_setup_assistant</exec_depend>

<export>
<metapackage/>
Expand Down
20 changes: 10 additions & 10 deletions moveit_commander/package.xml
@@ -1,4 +1,4 @@
<package>
<package format="2">
<name>moveit_commander</name>
<version>0.10.8</version>
<description>Python interfaces to MoveIt</description>
Expand All @@ -20,15 +20,15 @@

<build_depend>python</build_depend>

<run_depend>geometry_msgs</run_depend>
<run_depend>moveit_msgs</run_depend>
<run_depend>moveit_ros_planning_interface</run_depend>
<run_depend>python</run_depend>
<run_depend>python-pyassimp</run_depend>
<run_depend>rospy</run_depend>
<run_depend>sensor_msgs</run_depend>
<run_depend>shape_msgs</run_depend>
<run_depend>tf</run_depend>
<exec_depend>geometry_msgs</exec_depend>
<exec_depend>moveit_msgs</exec_depend>
<exec_depend>moveit_ros_planning_interface</exec_depend>
<exec_depend>python</exec_depend>
<exec_depend>python-pyassimp</exec_depend>
<exec_depend>rospy</exec_depend>
<exec_depend>sensor_msgs</exec_depend>
<exec_depend>shape_msgs</exec_depend>
<exec_depend>tf</exec_depend>

<test_depend>rostest</test_depend>
<test_depend>moveit_resources</test_depend>
Expand Down
4 changes: 2 additions & 2 deletions moveit_commander/test/CMakeLists.txt
@@ -1,6 +1,6 @@
if (CATKIN_ENABLE_TESTING)
find_package(moveit_resources)
find_package(rostest)
find_package(moveit_resources REQUIRED)
find_package(rostest REQUIRED)

add_rostest(python_moveit_commander.test)
add_rostest(python_moveit_commander_ns.test)
Expand Down
27 changes: 15 additions & 12 deletions moveit_core/CMakeLists.txt
@@ -1,6 +1,9 @@
cmake_minimum_required(VERSION 2.8.12)
project(moveit_core)

#suppress spurious errors: https://github.com/fkie/catkin_lint/issues/62
#catkin_lint: ignore duplicate_find (find_package(moveit_resources))

add_compile_options(-std=c++14)

# Warnings
Expand All @@ -25,6 +28,7 @@ find_package(Eigen3 REQUIRED)
find_package(PkgConfig REQUIRED)

pkg_check_modules(LIBFCL REQUIRED fcl)
# replace LIBFCL_LIBRARIES with full path to the library
find_library(LIBFCL_LIBRARIES_FULL ${LIBFCL_LIBRARIES} ${LIBFCL_LIBRARY_DIRS})
set(LIBFCL_LIBRARIES "${LIBFCL_LIBRARIES_FULL}")

Expand All @@ -35,7 +39,6 @@ find_package(urdfdom_headers REQUIRED)
find_package(catkin REQUIRED
COMPONENTS
tf2_eigen
tf2_kdl
tf2_geometry_msgs
eigen_stl_containers
geometric_shapes
Expand All @@ -52,17 +55,12 @@ COMPONENTS
srdfdom
std_msgs
trajectory_msgs
urdf
visualization_msgs
xmlrpcpp
)

set(VERSION_FILE_PATH "${CATKIN_DEVEL_PREFIX}/include")
# Add the folder for the generated version header to the package's
# exported include dirs to avoid a catkin_lint error.
# This is how gencpp adds the folder of generated message code to
# the include dirs, see:
# https://github.com/ros/gencpp/blob/e5acaf6/cmake/gencpp-extras.cmake.em#L51-L54
list(APPEND ${PROJECT_NAME}_INCLUDE_DIRS ${VERSION_FILE_PATH})
file(MAKE_DIRECTORY "${VERSION_FILE_PATH}/moveit")

set(THIS_PACKAGE_INCLUDE_DIRS
Expand Down Expand Up @@ -93,6 +91,8 @@ set(THIS_PACKAGE_INCLUDE_DIRS
utils/include
)

#suppress spurious error: https://github.com/fkie/catkin_lint/issues/62
#catkin_lint: ignore_once exported_pkg_config (LIBFCL)
catkin_package(
INCLUDE_DIRS
${THIS_PACKAGE_INCLUDE_DIRS}
Expand Down Expand Up @@ -120,7 +120,6 @@ catkin_package(
moveit_utils
${OCTOMAP_LIBRARIES}
CATKIN_DEPENDS
tf2_eigen
eigen_stl_containers
geometric_shapes
geometry_msgs
Expand All @@ -129,8 +128,11 @@ catkin_package(
octomap_msgs
random_numbers
sensor_msgs
shape_msgs
srdfdom
std_msgs
tf2_eigen
tf2_geometry_msgs
trajectory_msgs
visualization_msgs
DEPENDS
Expand All @@ -144,20 +146,20 @@ catkin_package(


# to run: catkin_make -DENABLE_COVERAGE_TESTING=ON package_name_coverage
if(ENABLE_COVERAGE_TESTING)
if(CATKIN_ENABLE_TESTING AND ENABLE_COVERAGE_TESTING)
find_package(code_coverage REQUIRED) # catkin package ros-*-code-coverage
include(CodeCoverage)
APPEND_COVERAGE_COMPILER_FLAGS()
set(COVERAGE_EXCLUDES "*/test/*")
add_code_coverage(
NAME ${PROJECT_NAME}_coverage
)
add_code_coverage(NAME ${PROJECT_NAME}_coverage)
endif()

include_directories(SYSTEM ${EIGEN3_INCLUDE_DIRS}
${LIBFCL_INCLUDE_DIRS}
)

#suppress spurious error: https://github.com/fkie/catkin_lint/issues/62
#catkin_lint: ignore_once external_directory missing_directory (${VERSION_FILE_PATH})
include_directories(${THIS_PACKAGE_INCLUDE_DIRS}
${VERSION_FILE_PATH}
${Boost_INCLUDE_DIRS}
Expand All @@ -175,6 +177,7 @@ set(MOVEIT_VERSION_EXTRA "Alpha")
set(MOVEIT_VERSION "${MOVEIT_VERSION_MAJOR}.${MOVEIT_VERSION_MINOR}.${MOVEIT_VERSION_PATCH}-${MOVEIT_VERSION_EXTRA}")
message(STATUS " *** Building MoveIt! ${MOVEIT_VERSION} ***")
configure_file("version/version.h.in" "${VERSION_FILE_PATH}/moveit/version.h")
#catkin_lint: ignore_once external_file
install(FILES "${VERSION_FILE_PATH}/moveit/version.h" DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}/moveit)

add_subdirectory(version)
Expand Down
2 changes: 1 addition & 1 deletion moveit_core/background_processing/CMakeLists.txt
@@ -1,7 +1,7 @@
set(MOVEIT_LIB_NAME moveit_background_processing)

add_library(${MOVEIT_LIB_NAME} src/background_processing.cpp)
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION})
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")

target_link_libraries(${MOVEIT_LIB_NAME} ${catkin_LIBRARIES} ${urdfdom_LIBRARIES} ${urdfdom_headers_LIBRARIES} ${Boost_LIBRARIES})

Expand Down
2 changes: 1 addition & 1 deletion moveit_core/collision_detection/CMakeLists.txt
Expand Up @@ -11,7 +11,7 @@ add_library(${MOVEIT_LIB_NAME}
src/world.cpp
src/world_diff.cpp
)
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION})
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")

target_link_libraries(${MOVEIT_LIB_NAME} moveit_robot_state ${catkin_LIBRARIES} ${urdfdom_LIBRARIES} ${urdfdom_headers_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(${MOVEIT_LIB_NAME} ${catkin_EXPORTED_TARGETS})
Expand Down
2 changes: 1 addition & 1 deletion moveit_core/collision_detection_fcl/CMakeLists.txt
Expand Up @@ -5,7 +5,7 @@ add_library(${MOVEIT_LIB_NAME}
src/collision_robot_fcl.cpp
src/collision_world_fcl.cpp
)
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION})
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")

target_link_libraries(${MOVEIT_LIB_NAME} moveit_collision_detection ${catkin_LIBRARIES} ${urdfdom_LIBRARIES} ${urdfdom_headers_LIBRARIES} ${LIBFCL_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(${MOVEIT_LIB_NAME} ${catkin_EXPORTED_TARGETS})
Expand Down
2 changes: 1 addition & 1 deletion moveit_core/collision_distance_field/CMakeLists.txt
Expand Up @@ -13,7 +13,7 @@ add_library(${MOVEIT_LIB_NAME}
src/collision_robot_hybrid.cpp
src/collision_world_hybrid.cpp
)
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION})
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")
target_link_libraries(${MOVEIT_LIB_NAME}
moveit_planning_scene moveit_distance_field
${catkin_LIBRARIES} ${Boost_LIBRARIES})
Expand Down
2 changes: 1 addition & 1 deletion moveit_core/constraint_samplers/CMakeLists.txt
Expand Up @@ -7,7 +7,7 @@ add_library(${MOVEIT_LIB_NAME}
src/default_constraint_samplers.cpp
src/union_constraint_sampler.cpp
)
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION})
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")

target_link_libraries(${MOVEIT_LIB_NAME}
moveit_robot_state
Expand Down
2 changes: 1 addition & 1 deletion moveit_core/distance_field/CMakeLists.txt
Expand Up @@ -5,7 +5,7 @@ add_library(${MOVEIT_LIB_NAME}
src/find_internal_points.cpp
src/propagation_distance_field.cpp
)
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION})
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")

target_link_libraries(${MOVEIT_LIB_NAME} ${catkin_LIBRARIES} ${urdfdom_LIBRARIES} ${urdfdom_headers_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(${MOVEIT_LIB_NAME} ${catkin_EXPORTED_TARGETS})
Expand Down
2 changes: 1 addition & 1 deletion moveit_core/dynamics_solver/CMakeLists.txt
@@ -1,7 +1,7 @@
set(MOVEIT_LIB_NAME moveit_dynamics_solver)

add_library(${MOVEIT_LIB_NAME} src/dynamics_solver.cpp)
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION})
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")

target_link_libraries(${MOVEIT_LIB_NAME} moveit_robot_state ${catkin_LIBRARIES} ${urdfdom_LIBRARIES} ${urdfdom_headers_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(${MOVEIT_LIB_NAME} ${catkin_EXPORTED_TARGETS})
Expand Down
2 changes: 1 addition & 1 deletion moveit_core/exceptions/CMakeLists.txt
@@ -1,7 +1,7 @@
set(MOVEIT_LIB_NAME moveit_exceptions)

add_library(${MOVEIT_LIB_NAME} src/exceptions.cpp)
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION})
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")

target_link_libraries(${MOVEIT_LIB_NAME} ${catkin_LIBRARIES} ${urdfdom_LIBRARIES} ${urdfdom_headers_LIBRARIES} ${Boost_LIBRARIES})

Expand Down
2 changes: 1 addition & 1 deletion moveit_core/kinematic_constraints/CMakeLists.txt
Expand Up @@ -3,7 +3,7 @@ set(MOVEIT_LIB_NAME moveit_kinematic_constraints)
add_library(${MOVEIT_LIB_NAME}
src/kinematic_constraint.cpp
src/utils.cpp)
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION})
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")

target_link_libraries(${MOVEIT_LIB_NAME}
moveit_robot_model moveit_kinematics_base moveit_robot_state moveit_collision_detection_fcl
Expand Down
2 changes: 1 addition & 1 deletion moveit_core/kinematics_base/CMakeLists.txt
@@ -1,7 +1,7 @@
set(MOVEIT_LIB_NAME moveit_kinematics_base)

add_library(${MOVEIT_LIB_NAME} src/kinematics_base.cpp)
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION})
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")
# Avoid warnings about deprecated members of KinematicsBase when building KinematicsBase itself.
# TODO: remove when deperecated variables (tip_frame_, search_discretization_) are finally removed.
target_compile_options(${MOVEIT_LIB_NAME} PRIVATE -Wno-deprecated-declarations)
Expand Down
2 changes: 1 addition & 1 deletion moveit_core/kinematics_metrics/CMakeLists.txt
@@ -1,7 +1,7 @@
set(MOVEIT_LIB_NAME moveit_kinematics_metrics)

add_library(${MOVEIT_LIB_NAME} src/kinematics_metrics.cpp)
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION})
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")

target_link_libraries(${MOVEIT_LIB_NAME} moveit_robot_state ${catkin_LIBRARIES} ${urdfdom_LIBRARIES} ${urdfdom_headers_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(${MOVEIT_LIB_NAME} ${catkin_EXPORTED_TARGETS})
Expand Down
89 changes: 31 additions & 58 deletions moveit_core/package.xml
@@ -1,4 +1,4 @@
<package>
<package format="2">
<name>moveit_core</name>
<version>0.10.8</version>
<description>Core libraries used by MoveIt!</description>
Expand All @@ -19,66 +19,39 @@
<buildtool_depend>catkin</buildtool_depend>
<buildtool_depend>pkg-config</buildtool_depend>

<build_depend>assimp</build_depend>
<build_depend>boost</build_depend>
<build_depend>eigen</build_depend>
<build_depend>eigen_stl_containers</build_depend>
<build_depend>libfcl-dev</build_depend>
<build_depend version_gte="0.5.2">geometric_shapes</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>kdl_parser</build_depend>
<build_depend>libconsole-bridge-dev</build_depend>
<build_depend>urdf</build_depend>
<build_depend>liburdfdom-dev</build_depend>
<build_depend>liburdfdom-headers-dev</build_depend>
<build_depend>moveit_msgs</build_depend>
<build_depend>octomap</build_depend>
<build_depend>octomap_msgs</build_depend>
<build_depend>random_numbers</build_depend>
<build_depend>roslib</build_depend>
<build_depend>rostime</build_depend>
<build_depend>rosconsole</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>shape_msgs</build_depend>
<build_depend>srdfdom</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>tf2_eigen</build_depend>
<build_depend>tf2_kdl</build_depend>
<build_depend>tf2_geometry_msgs</build_depend>
<build_depend>trajectory_msgs</build_depend>
<build_depend>visualization_msgs</build_depend>
<build_depend>xmlrpcpp</build_depend>

<run_depend>assimp</run_depend>
<run_depend>boost</run_depend>
<run_depend>eigen</run_depend>
<run_depend>eigen_stl_containers</run_depend>
<run_depend>libfcl-dev</run_depend>
<run_depend version_gte="0.5.2">geometric_shapes</run_depend>
<run_depend>geometry_msgs</run_depend>
<run_depend>kdl_parser</run_depend>
<run_depend>libconsole-bridge-dev</run_depend>
<run_depend>urdf</run_depend>
<run_depend>liburdfdom-dev</run_depend>
<run_depend>liburdfdom-headers-dev</run_depend>
<run_depend>moveit_msgs</run_depend>
<run_depend>octomap</run_depend>
<run_depend>octomap_msgs</run_depend>
<run_depend>random_numbers</run_depend>
<run_depend>rostime</run_depend>
<run_depend>rosconsole</run_depend>
<run_depend>sensor_msgs</run_depend>
<run_depend>srdfdom</run_depend>
<run_depend>std_msgs</run_depend>
<run_depend>tf2_eigen</run_depend>
<run_depend>tf2_kdl</run_depend>
<run_depend>tf2_geometry_msgs</run_depend>
<run_depend>trajectory_msgs</run_depend>
<run_depend>visualization_msgs</run_depend>
<run_depend>xmlrpcpp</run_depend>
<depend>assimp</depend>
<depend>boost</depend>
<depend>eigen</depend>
<depend>eigen_stl_containers</depend>
<depend>libfcl-dev</depend>
<depend version_gte="0.5.2">geometric_shapes</depend>
<depend>geometry_msgs</depend>
<depend>kdl_parser</depend>
<depend>libconsole-bridge-dev</depend>
<depend>urdf</depend>
<depend>liburdfdom-dev</depend>
<depend>liburdfdom-headers-dev</depend>
<depend>moveit_msgs</depend>
<depend>octomap</depend>
<depend>octomap_msgs</depend>
<depend>random_numbers</depend>
<depend>roslib</depend>
<depend>rostime</depend>
<depend>rosconsole</depend>
<depend>sensor_msgs</depend>
<depend>shape_msgs</depend>
<depend>srdfdom</depend>
<depend>std_msgs</depend>
<depend>tf2_eigen</depend>
<depend>tf2_geometry_msgs</depend>
<depend>trajectory_msgs</depend>
<depend>visualization_msgs</depend>
<depend>xmlrpcpp</depend>

<test_depend>angles</test_depend>
<test_depend>moveit_resources</test_depend>
<test_depend>tf2_kdl</test_depend>
<test_depend>orocos_kdl</test_depend>
<test_depend>rosunit</test_depend>
<test_depend>code_coverage</test_depend>
</package>

0 comments on commit 8075221

Please sign in to comment.