Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix catkin package definitions #180

Merged
merged 6 commits into from
Jul 27, 2018
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .travis/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,32 @@

set -o errexit

pip install gh-pr-comment
pip install gh-pr-comment catkin_lint

source /opt/ros/${ROS_DISTRO}/setup.bash

set -o verbose

cd /catkin_ws


pkgs=`find . -name package.xml | xargs -n1 dirname`
catkin_lint $pkgs \
|| (gh-pr-comment "[#${TRAVIS_BUILD_NUMBER}] FAILED on ${ROS_DISTRO}" \
"<details><summary>catkin_lint failed</summary>

\`\`\`
`catkin_lint $pkgs 2>&1`
\`\`\`
</details>"; false)


sed -i -e '5a set(CMAKE_C_FLAGS "-Wall -Werror -O2")' \
/opt/ros/${ROS_DISTRO}/share/catkin/cmake/toplevel.cmake
sed -i -e '5a set(CMAKE_CXX_FLAGS "-Wall -Werror -O2")' \
/opt/ros/${ROS_DISTRO}/share/catkin/cmake/toplevel.cmake


mkdir -p /catkin_ws/build/mcl_3dl/test/
mv /catkin_ws/src/mcl_3dl/.cached-dataset/* /catkin_ws/build/mcl_3dl/test/
ls -lh /catkin_ws/build/mcl_3dl/test/
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O1")


include_directories(${catkin_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${PCL_INCLUDE_DIR} include)
link_directories(${Boost_LIBRARY_DIRS} ${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})

# Binary installed pcl provided by Linux distro is built with -march=native
Expand All @@ -87,6 +86,7 @@ add_dependencies(mcl_3dl ${catkin_EXPORTED_TARGETS})

if(CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)
find_package(rosunit REQUIRED)
add_subdirectory(test)

find_package(roslint REQUIRED)
Expand Down
4 changes: 2 additions & 2 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<package format="2">
<name>mcl_3dl</name>
<version>0.1.3</version>
<description>The mcl_3dl package</description>
<description>3-D/6-DOF localization for mobile robots with 3-D LIDAR(s)</description>

<maintainer email="[email protected]">Atsushi Watanabe</maintainer>
<license>BSD</license>
<author email="[email protected]">Atsushi Watanabe</author>

<buildtool_depend>catkin</buildtool_depend>

<build_depend>cmake_modules</build_depend>
<depend>roscpp</depend>
<test_depend>roslint</test_depend>
<test_depend>rostest</test_depend>
<test_depend>rosunit</test_depend>

<depend>geometry_msgs</depend>
<depend>nav_msgs</depend>
Expand Down
11 changes: 3 additions & 8 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
cmake_minimum_required(VERSION 2.8.3)

find_package(catkin REQUIRED COMPONENTS roscpp rostest nav_msgs tf)

catkin_add_gtest(test_vec3 src/test_vec3.cpp)
target_link_libraries(test_vec3 ${catkin_LIBRARIES})
catkin_add_gtest(test_quat src/test_quat.cpp)
Expand All @@ -23,7 +19,7 @@ target_link_libraries(performance_raycast ${catkin_LIBRARIES} ${Boost_LIBRARIES}
add_rostest_gtest(test_transform_failure tests/transform_rostest.test
src/test_transform_failure.cpp)
target_link_libraries(test_transform_failure ${catkin_LIBRARIES})
add_dependencies(test_transform_failure mcl_3dl)
add_dependencies(test_transform_failure ${PROJECT_NAME})
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert for consistency


if(MCL_3DL_EXTRA_TESTS)

Expand Down Expand Up @@ -61,9 +57,8 @@ if(MCL_3DL_EXTRA_TESTS)
mcl_3dl
)

else(MCL_3DL_EXTRA_TESTS)
else()

message("To perform extra heavy tests for mcl_3dl, use -DMCL_3DL_EXTRA_TESTS:=ON")

endif(MCL_3DL_EXTRA_TESTS)

endif()