atenpas / gpd_ros

ROS wrapper around GPD
BSD 2-Clause "Simplified" License
55 stars 67 forks source link

ROS CppStyleGuide formatting and catkin_lint fixes #8

Open aPonza opened 4 years ago

aPonza commented 4 years ago

Applied automatic formatting as per the C++ Style Guide to the files and reduced the catkin_lint issues from

<user>@<machine>:~/catkin_ws/src/gpd2_ros$ catkin lint -W2
gpd_ros: CMakeLists.txt: error: unconfigured build_depend on 'geometry_msgs'
gpd_ros: CMakeLists.txt: error: unconfigured message dependency 'geometry_msgs'
gpd_ros: CMakeLists.txt(25): error: variable CMAKE_CXX_FLAGS is overwritten
gpd_ros: package.xml: error: missing build_export_depend on 'sensor_msgs'
gpd_ros: package.xml: error: missing build_export_depend on 'std_msgs'
gpd_ros: package.xml: error: missing build_export_depend on 'eigen_conversions'
gpd_ros: package.xml: error: missing build_export_depend on 'cmake_modules'
gpd_ros: package.xml: error: missing build_export_depend on 'geometry_msgs'
gpd_ros: package.xml: error: missing build_export_depend on 'std_msgs'
gpd_ros: package.xml: error: missing build_export_depend on 'sensor_msgs'
gpd_ros: package.xml: error: missing build_export_depend on 'geometry_msgs'
gpd_ros: CMakeLists.txt: warning: target 'gpd_ros_detect_grasps' is not installed
gpd_ros: CMakeLists.txt: warning: target 'gpd_ros_detect_grasps_server' is not installed
gpd_ros: CMakeLists.txt(12): warning: use of link_directories() is strongly discouraged
gpd_ros: CMakeLists.txt(46): warning: exported package include path but no exported library
gpd_ros: CMakeLists.txt(46): warning: catkin_package() exports package include path that is not installed
gpd_ros: notice: package path name '~/catkin_ws/src/gpd2_ros' differs from package name
gpd_ros: package.xml: notice: meaningless package description 'The gpd_ros package'
catkin_lint: checked 1 packages and found 18 problems

to

<user>@<machine>:~/catkin_ws/src/gpd2_ros$ catkin lint -W2
gpd_ros: notice: package path name '~/catkin_ws/src/gpd2_ros' differs from package name
catkin_lint: checked 1 packages and found 1 problems

The last notice seems to be related to backwards compatibility (as per link), unless you want (me?) to change some names from "gpd_ros" to "gpd2_ros".

The package still compiles and links, I'm not sure about the set(CMAKE_CXX_FLAGS ... (line 25 in CMakeLists.txt): I usually set them on a target-by-target basis but that requires a minimum cmake bump. The email in package.xml is incorrect as well, of course, but I would probably remove the line altogether.

aPonza commented 4 years ago

The last commit for message generation is because catkin build isn't letting me compile without the project exported targets added as a dependency, the error being the same as the one that was likely fixed via e999bd3ad5f886c53a51b2cca2ff5f5df990fc9c, but it keeps a consistent style as to the rest of the CMakeLists.