Skip to content

Commit

Permalink
fix catkin lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Ponza committed Oct 14, 2019
1 parent 132c62a commit dff7959
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 82 deletions.
86 changes: 71 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
cmake_minimum_required(VERSION 2.8.3)
project(gpd_ros)

add_compile_options(-std=c++14)

## 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 cmake_modules eigen_conversions message_generation roscpp rospy sensor_msgs std_msgs)
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
cmake_modules
eigen_conversions
geometry_msgs
message_generation
pcl_conversions
roscpp
sensor_msgs
std_msgs
visualization_msgs
)

# PCL
find_package(PCL REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})

## System dependencies are found with CMake's conventions
find_library(GPD_LIB NAMES gpd PATHS /usr/local/lib PATH_SUFFIXES lib NO_DEFAULT_PATH)
Expand All @@ -22,11 +30,15 @@ endif()
include_directories(${GPD_LIB_INCLUDE_DIR})
message(STATUS "gpd_include_dir: ${GPD_LIB_INCLUDE_DIR}")

set(CMAKE_CXX_FLAGS "-O3 -fopenmp -fPIC -Wno-deprecated -Wenum-compare -Wno-ignored-attributes -std=c++14")

## Generate messages in the 'msg' folder
add_message_files(FILES CloudIndexed.msg CloudSamples.msg CloudSources.msg GraspConfig.msg GraspConfigList.msg
SamplesMsg.msg)
add_message_files(FILES
CloudIndexed.msg
CloudSamples.msg
CloudSources.msg
GraspConfig.msg
GraspConfigList.msg
SamplesMsg.msg
)

## Generate services in the 'srv' folder
add_service_files(FILES detect_grasps.srv)
Expand All @@ -44,11 +56,22 @@ generate_messages(DEPENDENCIES geometry_msgs sensor_msgs std_msgs)
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS cmake_modules eigen_conversions geometry_msgs message_runtime roscpp sensor_msgs std_msgs
DEPENDS PCL
# CATKIN_DEPENDS cmake_modules eigen_conversions geometry_msgs message_runtime roscpp sensor_msgs std_msgs
# DEPENDS Eigen OpenCV PCL
INCLUDE_DIRS include
LIBRARIES
${PROJECT_NAME}_grasp_messages
${PROJECT_NAME}_grasp_plotter
CATKIN_DEPENDS
cmake_modules
eigen_conversions
geometry_msgs
message_generation
message_runtime
pcl_conversions
roscpp
sensor_msgs
std_msgs
visualization_msgs
DEPENDS PCL
)

###########
Expand Down Expand Up @@ -91,3 +114,36 @@ target_link_libraries(${PROJECT_NAME}_grasp_plotter
target_link_libraries(${PROJECT_NAME}_grasp_messages
${GPD_LIB}
${catkin_LIBRARIES})


#############
## Install ##
#############

# all install targets should use catkin DESTINATION variables
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html

## Mark executables and/or libraries for installation
install(TARGETS
${PROJECT_NAME}_detect_grasps
${PROJECT_NAME}_detect_grasps_server
${PROJECT_NAME}_grasp_messages
${PROJECT_NAME}_grasp_plotter

ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
PATTERN "*.git" EXCLUDE
)

## Mark other files for installation (e.g. launch and bag files, etc.)
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
PATTERN ".git" EXCLUDE
)
85 changes: 18 additions & 67 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,80 +1,31 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE package>
<package format="2">
<name>gpd_ros</name>
<version>0.0.0</version>
<description>The gpd_ros package</description>
<description>
wrapper around the GPD package for detecting 6-DOF grasp poses for a
2-finger robot hand (e.g. a parallel jaw gripper) in 3D point clouds.
</description>

<!-- One maintainer tag required, multiple allowed, one person per tag -->
<!-- Example: -->
<!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
<maintainer email="ur5@todo.todo">ur5</maintainer>

<license>BSD</license>

<!-- One license tag required, multiple allowed, one license per tag -->
<!-- Commonly used license strings: -->
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
<license>TODO</license>


<!-- Url tags are optional, but multiple are allowed, one per tag -->
<!-- Optional attribute type can be: website, bugtracker, or repository -->
<!-- Example: -->
<!-- <url type="website">http://wiki.ros.org/gpd_ros</url> -->
<buildtool_depend>catkin</buildtool_depend>

<depend>cmake_modules</depend>
<depend>eigen_conversions</depend>
<depend>geometry_msgs</depend>
<depend>pcl_conversions</depend>
<depend>roscpp</depend>
<depend>sensor_msgs</depend>
<depend>std_msgs</depend>
<depend>visualization_msgs</depend>

<!-- Author tags are optional, multiple are allowed, one per tag -->
<!-- Authors do not have to be maintainers, but could be -->
<!-- Example: -->
<!-- <author email="jane.doe@example.com">Jane Doe</author> -->
<build_depend>message_generation</build_depend>

<build_export_depend>message_generation</build_export_depend>

<!-- The *depend tags are used to specify dependencies -->
<!-- Dependencies can be catkin packages or system dependencies -->
<!-- Examples: -->
<!-- Use depend as a shortcut for packages that are both build and exec dependencies -->
<!-- <depend>roscpp</depend> -->
<!-- Note that this is equivalent to the following: -->
<!-- <build_depend>roscpp</build_depend> -->
<!-- <exec_depend>roscpp</exec_depend> -->
<!-- Use build_depend for packages you need at compile time: -->
<!-- <build_depend>message_generation</build_depend> -->
<!-- Use build_export_depend for packages you need in order to build against this package: -->
<!-- <build_export_depend>message_generation</build_export_depend> -->
<!-- Use buildtool_depend for build tool packages: -->
<!-- <buildtool_depend>catkin</buildtool_depend> -->
<!-- Use exec_depend for packages you need at runtime: -->
<!-- <exec_depend>message_runtime</exec_depend> -->
<!-- Use test_depend for packages you need only for testing: -->
<!-- <test_depend>gtest</test_depend> -->
<!-- Use doc_depend for packages you need only for building documentation: -->
<!-- <doc_depend>doxygen</doc_depend> -->
<buildtool_depend>catkin</buildtool_depend>

<build_depend>cmake_modules</build_depend>
<build_depend>eigen_conversions</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>message_generation</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>std_msgs</build_depend>

<build_export_depend>roscpp</build_export_depend>
<build_export_depend>rospy</build_export_depend>

<exec_depend>cmake_modules</exec_depend>
<exec_depend>eigen_conversions</exec_depend>
<exec_depend>geometry_msgs</exec_depend>
<exec_depend>message_runtime</exec_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>rospy</exec_depend>
<exec_depend>sensor_msgs</exec_depend>
<exec_depend>std_msgs</exec_depend>


<!-- The export tag contains other, unspecified, tags -->
<export>
<!-- Other tools can request additional information be placed here -->

</export>
</package>

0 comments on commit dff7959

Please sign in to comment.