Skip to content
Snippets Groups Projects
Unverified Commit ae41279c authored by Joseph Mirabel's avatar Joseph Mirabel Committed by GitHub
Browse files

Merge pull request #114 from jcarpent/devel

Improve packaging + add ROS package
parents a553870e 87c0c584
No related branches found
No related tags found
No related merge requests found
#
# Software License Agreement (BSD License)
#
# Copyright (c) 2014 CNRS-LAAS
# Copyright (c) 2014-2019 CNRS-LAAS, INRIA
# Author: Florent Lamiraux, Joseph Mirabel
# All rights reserved.
#
......@@ -45,6 +45,11 @@ SET(PROJECT_USE_CMAKE_EXPORT TRUE)
CMAKE_POLICY(SET CMP0022 NEW)
SET(PROJECT_USE_KEYWORD_LINK_LIBRARIES TRUE)
# Check if the submodule cmake have been initialized
IF(NOT EXISTS "${CMAKE_SOURCE_DIR}/cmake/base.cmake")
MESSAGE(FATAL_ERROR "\nPlease run the following command first:\ngit submodule update --init\n")
ENDIF()
include(cmake/eigen.cmake)
include(cmake/boost.cmake)
include(cmake/python.cmake)
......
## FCL -- The Flexible Collision Library
HPP-FCL — An extension of the Flexible Collision Library
=======
[![Building Status](https://travis-ci.org/humanoid-path-planner/hpp-fcl.svg?branch=master)](https://travis-ci.org/humanoid-path-planner/hpp-fcl)
[![Pipeline status](https://gepgitlab.laas.fr/humanoid-path-planner/hpp-fcl/badges/master/pipeline.svg)](https://gepgitlab.laas.fr/humanoid-path-planner/hpp-fcl/commits/master)
[![Coverage report](https://gepgitlab.laas.fr/humanoid-path-planner/hpp-fcl/badges/master/coverage.svg?job=doc-coverage)](http://projects.laas.fr/gepetto/doc/humanoid-path-planner/hpp-fcl/master/coverage/)
This project is a fork from https://github.com/flexible-collision-library/fcl.
The main differences are.
This project is initially a fork from https://github.com/flexible-collision-library/fcl and has evolved since then.
The main new features are:
- the use of a safety margin when detecting collision,
- the computation of a lower bound of the distance between two objects when collision checking is performed and no collision is found.
- the implementation of Python bindings for easy code prototyping.
- the fix of various bugs.
This project is now used in many robotics frameworks such as [Pinocchio](https://github.com/stack-of-tasks/pinocchio), an open-source software which implements efficient and versatile rigid body dynamics algorithms and the [Humanoid Path Planner](https://humanoid-path-planner.github.io/hpp-doc), an open-source software for Motion and Manipulation Planning.
## Acknowledgments
The development of **HPP-FCL** is actively supported by the [Gepetto team](http://projects.laas.fr/gepetto/) [@LAAS-CNRS](http://www.laas.fr)
Subproject commit 8e87406799ea10cfeb90a56f84f3e1ef9c049753
Subproject commit 308d3c947a3e276b06c5fa79894119346635de4d
<?xml version="1.0"?>
<package format="2">
<name>hpp-fcl</name>
<version>1.2.0</version>
<description>An extension of the Flexible Collision Library.</description>
<!-- The maintainer listed here is for the ROS release to receive emails for the buildfarm.
Please check the repository URL for full list of authors and maintainers. -->
<maintainer email="jmirabel@laas.fr">Joseph Mirabel</maintainer>
<maintainer email="justin.carpentier@inria.fr">Justin Carpentier</maintainer>
<maintainer email="wolfgang.merkt@ed.ac.uk">Wolfgang Merkt</maintainer>
<license>BSD</license>
<url type="website">https://github.com/humanoid-path-planner/hpp-fcl</url>
<build_depend>git</build_depend>
<build_depend>doxygen</build_depend>
<doc_depend>doxygen</doc_depend>
<depend>python</depend>
<depend>python-numpy</depend>
<depend>eigen</depend>
<depend>boost</depend>
<depend>assimp</depend>
<depend>octomap</depend>
<depend>eigenpy</depend>
<buildtool_depend>cmake</buildtool_depend>
<export>
<build_type>cmake</build_type>
</export>
</package>
......@@ -47,9 +47,8 @@ ADD_LIBRARY(${LIBRARY_NAME} SHARED
distance.cc
fcl.cc)
TARGET_LINK_BOOST_PYTHON(${LIBRARY_NAME})
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${Boost_LIBRARIES})
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${PROJECT_NAME})
TARGET_LINK_BOOST_PYTHON(${LIBRARY_NAME} PUBLIC)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} PUBLIC ${PROJECT_NAME} ${BOOST_system_LIBRARY})
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} eigenpy)
SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES
......
......@@ -82,19 +82,28 @@ set(${LIBRARY_NAME}_SOURCES
mesh_loader/loader.cpp
)
link_directories(${Boost_LIBRARY_DIRS})
add_library(${LIBRARY_NAME}
SHARED
${${LIBRARY_NAME}_SOURCES}
)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${Boost_LIBRARIES})
target_include_directories(${LIBRARY_NAME} SYSTEM PUBLIC
TARGET_LINK_LIBRARIES(${LIBRARY_NAME}
PUBLIC
Boost::thread
Boost::date_time
Boost::system
)
target_include_directories(${LIBRARY_NAME}
SYSTEM PUBLIC
${EIGEN3_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
target_include_directories(${LIBRARY_NAME}
PUBLIC
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} assimp)
if (NOT ${ASSIMP_VERSION} VERSION_LESS "2.0.1150")
target_compile_definitions(${LIBRARY_NAME} PRIVATE -DHPP_FCL_USE_ASSIMP_UNIFIED_HEADER_NAMES)
......@@ -111,8 +120,6 @@ IF(OCTOMAP_FOUND)
-DOCTOMAP_PATCH_VERSION=${OCTOMAP_PATCH_VERSION})
ENDIF(OCTOMAP_FOUND)
target_include_directories(${LIBRARY_NAME} PUBLIC
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
install(TARGETS ${LIBRARY_NAME}
EXPORT ${TARGETS_EXPORT_NAME}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
config_files(fcl_resources/config.h)
macro(add_fcl_template_test test_name)
add_executable(${ARGV})
target_link_libraries(${test_name}
${Boost_LIBRARIES}
)
add_test(${test_name} ${EXECUTABLE_OUTPUT_PATH}/${test_name})
endmacro(add_fcl_template_test)
macro(add_fcl_test test_name)
add_executable(${ARGV})
target_link_libraries(${test_name}
hpp-fcl
PUBLIC
${PROJECT_NAME}
${Boost_LIBRARIES}
Boost::unit_test_framework
utility
)
PKG_CONFIG_USE_DEPENDENCY(${test_name} assimp)
......@@ -26,7 +20,7 @@ IF(RUN_TESTS)
ELSE()
add_library(utility STATIC EXCLUDE_FROM_ALL utility.cpp)
ENDIF()
target_link_libraries(utility hpp-fcl)
target_link_libraries(utility PUBLIC ${PROJECT_NAME})
add_fcl_test(math math.cpp)
......@@ -60,7 +54,13 @@ endif(HPP_FCL_HAVE_OCTOMAP)
## Benchmark
add_executable(test-benchmark benchmark.cpp)
target_link_libraries(test-benchmark hpp-fcl ${Boost_LIBRARIES} utility)
target_link_libraries(test-benchmark
PUBLIC
utility
Boost::chrono
Boost::filesystem
${PROJECT_NAME}
)
## Python tests
IF(BUILD_PYTHON_INTERFACE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment