Skip to content

Commit

Permalink
Imported upstream version '2.3.0' of 'upstream'
Browse files Browse the repository at this point in the history
  • Loading branch information
wxmerkt committed Mar 17, 2023
1 parent dca43ac commit 21f8832
Show file tree
Hide file tree
Showing 27 changed files with 206 additions and 96 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/macos-linux-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
os: ["ubuntu-latest", "macos-latest"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive

Expand All @@ -24,6 +24,13 @@ jobs:
environment-file: .github/workflows/conda/conda-env.yml
python-version: 3.7

- name: Install compilers on OSX
if: contains(matrix.os, 'macos')
shell: bash -l {0}
run: |
conda activate hpp-fcl
conda install compilers=1.4.2 -c conda-forge
- name: Install cmake and update conda
shell: bash -l {0}
run: |
Expand All @@ -35,6 +42,7 @@ jobs:
shell: bash -l {0}
run: |
conda activate hpp-fcl
conda list
echo $CONDA_PREFIX
mkdir build
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/ros_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,21 @@ jobs:
- {ROS_DISTRO: melodic, PRERELEASE: false}
- {ROS_DISTRO: noetic}
- {ROS_DISTRO: foxy}
- {ROS_DISTRO: galactic}
- {ROS_DISTRO: rolling}
- {ROS_DISTRO: humble}
env:
CCACHE_DIR: /github/home/.ccache # Enable ccache
BUILDER: colcon
PRERELEASE: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
# This step will fetch/store the directory used by ccache before/after the ci run
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}
# Run industrial_ci
- uses: 'ros-industrial/industrial_ci@master'
- uses: 'ros-industrial/industrial_ci@6a8f546cbd31fbd5c9f77e3409265c8b39abc3d6'
env: ${{ matrix.env }}
2 changes: 1 addition & 1 deletion .github/workflows/windows-conda-clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
compiler: clang-cl

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: goanpeca/setup-miniconda@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-conda-v142.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
os: windows-2019

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: goanpeca/setup-miniconda@v1
Expand Down
6 changes: 4 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
ci:
autoupdate_branch: 'devel'
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v15.0.4
rev: v15.0.7
hooks:
- id: clang-format
args: ['--style={BasedOnStyle: Google, SortIncludes: false}']
Expand All @@ -9,6 +11,6 @@ repos:
hooks:
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 23.1.0
hooks:
- id: black
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Software License Agreement (BSD License)
#
# Copyright (c) 2014-2022 CNRS-LAAS, INRIA
# Copyright (c) 2014-2023 CNRS-LAAS, INRIA
# Author: Florent Lamiraux, Joseph Mirabel
# All rights reserved.
#
Expand Down Expand Up @@ -267,7 +267,9 @@ add_subdirectory(src)
if (BUILD_PYTHON_INTERFACE)
add_subdirectory(python)
endif ()
add_subdirectory(test)
if(BUILD_TESTING)
add_subdirectory(test)
endif(BUILD_TESTING)

pkg_config_append_libs("hpp-fcl")
IF(HPP_FCL_HAS_OCTOMAP)
Expand Down
9 changes: 8 additions & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ Dependencies:
============

- Eigen
- Boost (thread, date_time, unit_test_framework, filesystem)
- Boost (thread, date_time, filesystem)
- assimp
- octomap (optional dependency, available at http://octomap.github.com)
- Qhull (optional dependency, available at http://www.qhull.org)

Expand All @@ -12,6 +13,12 @@ collision detection with octrees will not be possible.

For installation, CMake will also be needed (http://cmake.org).

Test dependencies:
=================

When building tests (BUILD_TESTING=ON), additional dependencies are required:
- Boost (unit_test_framework, timer)

Install:
=======

Expand Down
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,37 @@ HPP-FCL — An extension of the Flexible Collision Library

<p align="center">
<a href="https://gepgitlab.laas.fr/humanoid-path-planner/hpp-fcl/commits/master/"><img src="https://gepgitlab.laas.fr/humanoid-path-planner/hpp-fcl/badges/master/pipeline.svg" alt="Pipeline status"/></a>
<a href="https://gepettoweb.laas.fr/hpp/hpp-fcl/doxygen-html/index.html"><img src="https://img.shields.io/badge/docs-online-brightgreen" alt="Documentation"/></a>
<a href="http://projects.laas.fr/gepetto/doc/humanoid-path-planner/hpp-fcl/master/coverage/"><img src="https://gepgitlab.laas.fr/humanoid-path-planner/hpp-fcl/badges/master/coverage.svg?job=doc-coverage" alt="Coverage report"/></a>
<a href="https://anaconda.org/conda-forge/hpp-fcl"><img src="https://img.shields.io/conda/dn/conda-forge/hpp-fcl.svg" alt="Conda Downloads"/></a>
<a href="https://anaconda.org/conda-forge/hpp-fcl"><img src="https://img.shields.io/conda/vn/conda-forge/hpp-fcl.svg" alt="Conda Version"/></a>
<a href="https://badge.fury.io/py/hpp-fcl"><img src="https://badge.fury.io/py/hpp-fcl.svg" alt="PyPI version"></a>
</p>

[FCL](https://github.com/flexible-collision-library/fcl) was forked in 2015. Since then, a large part of the code has been rewritten or removed (for the unused part).
[FCL](https://github.com/flexible-collision-library/fcl) was forked in 2015. Since then, a large part of the code has been rewritten or removed (for the unused and untested part).
The broadphase was reintroduced by J. Carpentier in 2022 based on the FCL version 0.7.0.

## New features

Compared to the original [FCL](https://github.com/flexible-collision-library/fcl) library, the main new features are:
- a dedicated implementation of the GJK algorithm (we do not rely anymore on [libccd](https://github.com/danfis/libccd))
- the use of a safety margin when detecting collision
- a dedicated and efficient implementation of the GJK algorithm (we do not rely anymore on [libccd](https://github.com/danfis/libccd))
- the support of safety margins for collision detection
- an accelerated version of Collision Detection *à la Nesterov* which leads to increased performances (up to a factor 2). More details are available in this [paper](https://hal.archives-ouvertes.fr/hal-03662157/)
- 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 support of height fields, capsule shapes, etc.
- 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.

## Performances

Unlike the original FCL library, HPP-FCL implements the well-established GJK algorithm and [its variants](https://hal.archives-ouvertes.fr/hal-03662157/) for collision detection and distance computation. These implementations lead to state-of-the-art performances, as depicted by the figure below. In particular, you can observe that GJK-based approaches largely outperform solutions based on classic optimization solvers (e.g., QP solver like [ProxQP](https://github.com/Simple-Robotics/proxsuite)), notably for large geometries composed of tens or hundred of vertices.

<p align="center">
<img src="./doc/images/hpp-fcl-performances.jpg" width="600" alt="HPP-FCL performances" align="center"/>
</p>

## Acknowledgments

The development of **HPP-FCL** is actively supported by the [Gepetto team](http://projects.laas.fr/gepetto/) [@LAAS-CNRS](http://www.laas.fr), the [Willow team](https://www.di.ens.fr/willow/) [@INRIA](http://www.inria.fr) and, to some extend, [Eureka Robotics](https://eurekarobotics.com/).
Expand Down
3 changes: 0 additions & 3 deletions cmake/.docs/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ def _cmake_object_inventory(env, document, line, objtype, targetid):


class CMakeTransform(Transform):

# Run this transform early since we insert nodes we want
# treated as if they were written in the documents.
default_priority = 210
Expand Down Expand Up @@ -281,7 +280,6 @@ def add_target_and_index(self, name, sig, signode):


class CMakeXRefRole(XRefRole):

# See sphinx.util.nodes.explicit_title_re; \x00 escapes '<'.
_re = re.compile(r"^(.+?)(\s*)(?<!\x00)<(.*?)>$", re.DOTALL)
_re_sub = re.compile(r"^([^()\s]+)\s*\(([^()]*)\)$", re.DOTALL)
Expand Down Expand Up @@ -318,7 +316,6 @@ def __call__(self, typ, rawtext, text, *args, **keys):


class CMakeXRefTransform(Transform):

# Run this transform early since we insert nodes we want
# treated as if they were written in the documents, but
# after the sphinx (210) and docutils (220) substitutions.
Expand Down
1 change: 0 additions & 1 deletion cmake/.docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@


class IfMode(Directive):

has_content = True
required_arguments = 1
optional_arguments = 0
Expand Down
4 changes: 2 additions & 2 deletions cmake/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repos:
- id: check-useless-excludes
- id: check-hooks-apply
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v15.0.4
rev: v15.0.7
hooks:
- id: clang-format
args: [--style=Google]
Expand All @@ -25,7 +25,7 @@ repos:
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 23.1.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
Expand Down
2 changes: 2 additions & 0 deletions cmake/base.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ foreach(VARIABLE ${REQUIRED_VARIABLES})
endif(NOT DEFINED ${VARIABLE})
endforeach(VARIABLE)

message(STATUS "Configuring \"${PROJECT_NAME}\" (${PROJECT_URL})")

# If the project version number is not set, compute it automatically.
if(NOT DEFINED PROJECT_VERSION)
version_compute()
Expand Down
2 changes: 1 addition & 1 deletion cmake/cython/setup.in.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def GenExtension(name):

setup(
name="@CYTHON_BINDINGS_PACKAGE_NAME@",
version="@CYTHON_BINDINGS_VERSION@-{}".format(version_hash),
version="@CYTHON_BINDINGS_VERSION@+{}".format(version_hash),
ext_modules=extensions,
packages=packages,
package_data=package_data,
Expand Down
Loading

0 comments on commit 21f8832

Please sign in to comment.