Skip to content

Commit 3c114e1

Browse files
authored
Merge branch 'hppfcl3x' into cmake-assimp
2 parents 7092869 + edff674 commit 3c114e1

File tree

100 files changed

+5186
-2034
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+5186
-2034
lines changed

.git-blame-ignore-revs

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
0067c8aa66aac548601e2a3fd029aa264cc59f2a
22
76b68f785df31b00e153290b45ec290a9c5f7963
3+
# ruff --fix . (Guilhem Saurel, 2023-10-25)
4+
02cef56abfacee590c8444fd379c8837bf007fa1
5+
# black . (Guilhem Saurel, 2023-10-25)
6+
febfbcbe9c98cdb4e0c7bbf4554a6925b391834b
37
# ruff --fix . (Guilhem Saurel, 2023-10-24)
48
58dee5ae90eded5125825a2da0fe76a5031f3334
59
# black . (Guilhem Saurel, 2023-10-24)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: fcl
2+
channels:
3+
- conda-forge
4+
- nodefaults
5+
dependencies:
6+
- eigen
7+
- octomap
8+
- assimp
9+
- numpy
10+
- boost
11+
- eigenpy
12+
- python
13+
- doxygen
14+
- lxml
15+
- pylatexenc
16+
- qhull
17+
- cmake
18+
- ccache
19+
- cxx-compiler
20+
- llvm-openmp
21+
- pkg-config
22+
- ninja

.github/workflows/conda/conda-env.yml .github/workflows/conda/environment_windows.yml

+4
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ dependencies:
1414
- lxml
1515
- pylatexenc
1616
- qhull
17+
- cmake
18+
- ccache
19+
- pkg-config
20+
- ninja

.github/workflows/macos-linux-conda.yml

+41-29
Original file line numberDiff line numberDiff line change
@@ -4,63 +4,75 @@ on: [push,pull_request]
44

55
jobs:
66
hpp-fcl-conda:
7-
name: CI on ${{ matrix.os }} with Conda
7+
name: CI on ${{ matrix.os }} with Conda Python ${{ matrix.python-version }} - ${{ matrix.build_type }} ${{ matrix.cxx_options }}
88
runs-on: ${{ matrix.os }}
9+
env:
10+
CCACHE_BASEDIR: "${GITHUB_WORKSPACE}"
11+
CCACHE_DIR: "${GITHUB_WORKSPACE}/.ccache"
12+
CCACHE_COMPRESS: true
13+
CCACHE_COMPRESSLEVEL: 6
914

1015
strategy:
1116
fail-fast: false
1217
matrix:
1318
os: ["ubuntu-latest", "macos-latest"]
1419
python-version: ["3.8", "3.12"]
20+
cxx_options: ['', '-mavx2']
21+
build_type: [Release, Debug]
22+
exclude:
23+
- build_type: Debug
24+
cxx_options: -mavx2
25+
os: macos-latest
26+
- build_type: Release
27+
cxx_options: -mavx2
28+
os: macos-latest
1529

1630
steps:
17-
- uses: actions/checkout@v3
31+
- uses: actions/checkout@v4
1832
with:
1933
submodules: recursive
2034

21-
- uses: conda-incubator/setup-miniconda@v2
35+
- uses: actions/cache@v3
2236
with:
23-
activate-environment: hpp-fcl
37+
path: .ccache
38+
key: ccache-macos-linux-conda-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.cxx_options }}-${{ matrix.python-version }}-${{ github.sha }}
39+
restore-keys: ccache-macos-linux-conda-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.cxx_options }}-${{ matrix.python-version }}-
40+
41+
- uses: conda-incubator/setup-miniconda@v3
42+
with:
43+
activate-environment: fcl
2444
auto-update-conda: true
25-
environment-file: .github/workflows/conda/conda-env.yml
45+
environment-file: .github/workflows/conda/environment_macos_linux.yml
2646
python-version: ${{ matrix.python-version }}
27-
28-
- name: Install compilers on OSX
29-
if: contains(matrix.os, 'macos')
30-
shell: bash -l {0}
31-
run: |
32-
conda activate hpp-fcl
33-
conda install compilers=1.4.2 -c conda-forge
34-
35-
- name: Install cmake and update conda
36-
shell: bash -l {0}
37-
run: |
38-
conda activate hpp-fcl
39-
conda install cmake -c main
40-
conda install llvm-openmp -c conda-forge
47+
auto-activate-base: false
4148

4249
- name: Build hpp-fcl
43-
shell: bash -l {0}
50+
shell: bash -el {0}
4451
run: |
45-
conda activate hpp-fcl
4652
conda list
4753
echo $CONDA_PREFIX
4854
4955
mkdir build
5056
cd build
5157
52-
cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$(which python3) -DGENERATE_PYTHON_STUBS=ON -DHPP_FCL_HAS_QHULL=ON
53-
make -j2
54-
make build_tests
55-
export CTEST_OUTPUT_ON_FAILURE=1
56-
make test
57-
make install
58+
cmake .. \
59+
-G "Ninja" \
60+
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
61+
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
62+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
63+
-DCMAKE_CXX_FLAGS=${{ matrix.cxx_options }} \
64+
-DPYTHON_EXECUTABLE=$(which python3) \
65+
-DGENERATE_PYTHON_STUBS=ON \
66+
-DHPP_FCL_HAS_QHULL=ON
67+
cmake --build . -j2
68+
ctest --output-on-failure
69+
cmake --install .
5870
5971
- name: Uninstall hpp-fcl
60-
shell: bash -l {0}
72+
shell: bash -el {0}
6173
run: |
6274
cd build
63-
make uninstall
75+
cmake --build . --target uninstall
6476
6577
check:
6678
if: always()

.github/workflows/windows-conda-clang.yml

+24-20
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ on: [push,pull_request]
44
jobs:
55
build:
66
runs-on: ${{ matrix.os }}
7+
env:
8+
CCACHE_BASEDIR: "${GITHUB_WORKSPACE}"
9+
CCACHE_DIR: "${GITHUB_WORKSPACE}/.ccache"
10+
CCACHE_COMPRESS: true
11+
CCACHE_COMPRESSLEVEL: 6
12+
713
strategy:
814
fail-fast: false
915
matrix:
@@ -15,42 +21,40 @@ jobs:
1521
compiler: clang-cl
1622

1723
steps:
18-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
1925
with:
2026
submodules: recursive
21-
- uses: conda-incubator/setup-miniconda@v2
22-
env:
23-
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
27+
28+
- uses: actions/cache@v3
29+
with:
30+
path: .ccache
31+
key: ccache-windows-conda-clang-${{ matrix.os }}-${{ matrix.compiler }}-${{ github.sha }}
32+
restore-keys: ccache-windows-conda-clang-${{ matrix.os }}-${{ matrix.compiler }}-
33+
34+
- uses: conda-incubator/setup-miniconda@v3
2435
with:
2536
activate-environment: fcl
26-
environment-file: .github/workflows/conda/conda-env.yml
37+
auto-update-conda: true
38+
environment-file: .github/workflows/conda/environment_windows.yml
2739
python-version: "3.10"
28-
- name: Install cmake and update conda
29-
run: |
30-
conda install cmake -c main
40+
auto-activate-base: false
3141

3242
- name: Build FCL
3343
shell: cmd /C CALL {0}
34-
env:
35-
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
3644
run: |
37-
:: unset extra Boost envs
38-
set Boost_ROOT=
39-
set BOOST_ROOT_1_69_0=
40-
set BOOST_ROOT_1_72_0=
41-
set PATH=%PATH:C:\hostedtoolcache\windows\Boost\1.72.0;=%
42-
4345
call "%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64
46+
:: Tell Ninja to use clang-cl
47+
set CC=clang-cl
48+
set CXX=clang-cl
4449
4550
:: Create build
4651
mkdir build
4752
pushd build
4853
49-
:: Configure
50-
set PKG_CONFIG_PATH=%CONDA_PREFIX%\Library\share\pkgconfig:%CONDA_PREFIX%\Library\share\pkgconfig
5154
cmake ^
52-
-G "Visual Studio 16 2019" -T "ClangCl" -DCMAKE_GENERATOR_PLATFORM=x64 ^
55+
-G "Ninja" ^
5356
-DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^
57+
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache ^
5458
-DCMAKE_BUILD_TYPE=Release ^
5559
-DGENERATE_PYTHON_STUBS=ON ^
5660
-DPYTHON_SITELIB=%CONDA_PREFIX%\Lib\site-packages ^
@@ -65,7 +69,7 @@ jobs:
6569
if errorlevel 1 exit 1
6670
6771
:: Testing
68-
ctest --output-on-failure -C Release -V
72+
ctest --output-on-failure -C Release
6973
if errorlevel 1 exit 1
7074
7175
:: Test Python import

.github/workflows/windows-conda-v142.yml

+21-19
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ on: [push,pull_request]
44
jobs:
55
build:
66
runs-on: ${{ matrix.os }}
7+
env:
8+
CCACHE_BASEDIR: "${GITHUB_WORKSPACE}"
9+
CCACHE_DIR: "${GITHUB_WORKSPACE}/.ccache"
10+
CCACHE_COMPRESS: true
11+
CCACHE_COMPRESSLEVEL: 6
12+
713
strategy:
814
fail-fast: false
915
matrix:
@@ -14,42 +20,38 @@ jobs:
1420
os: windows-2019
1521

1622
steps:
17-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
1824
with:
1925
submodules: recursive
20-
- uses: conda-incubator/setup-miniconda@v2
21-
env:
22-
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
26+
27+
- uses: actions/cache@v3
28+
with:
29+
path: .ccache
30+
key: ccache-windows-conda-vs-${{ matrix.os }}-${{ matrix.compiler }}-${{ github.sha }}
31+
restore-keys: ccache-windows-conda-vs-${{ matrix.os }}-${{ matrix.compiler }}-
32+
33+
- uses: conda-incubator/setup-miniconda@v3
2334
with:
2435
activate-environment: fcl
25-
environment-file: .github/workflows/conda/conda-env.yml
36+
auto-update-conda: true
37+
environment-file: .github/workflows/conda/environment_windows.yml
2638
python-version: "3.10"
27-
- name: Install cmake and update conda
28-
run: |
29-
conda install cmake -c main
39+
auto-activate-base: false
3040

3141
- name: Build FCL
3242
shell: cmd /C CALL {0}
33-
env:
34-
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
3543
run: |
36-
:: unset extra Boost envs
37-
set Boost_ROOT=
38-
set BOOST_ROOT_1_69_0=
39-
set BOOST_ROOT_1_72_0=
40-
set PATH=%PATH:C:\hostedtoolcache\windows\Boost\1.72.0;=%
41-
4244
call "%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64
4345
4446
:: Create build
4547
mkdir build
4648
pushd build
4749
4850
:: Configure
49-
set PKG_CONFIG_PATH=%CONDA_PREFIX%\Library\share\pkgconfig:%CONDA_PREFIX%\Library\share\pkgconfig
5051
cmake ^
51-
-G "Visual Studio 16 2019" -T "v142" -DCMAKE_GENERATOR_PLATFORM=x64 ^
52+
-G "Ninja" ^
5253
-DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^
54+
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache ^
5355
-DCMAKE_BUILD_TYPE=Release ^
5456
-DGENERATE_PYTHON_STUBS=ON ^
5557
-DPYTHON_SITELIB=%CONDA_PREFIX%\Lib\site-packages ^
@@ -64,7 +66,7 @@ jobs:
6466
if errorlevel 1 exit 1
6567
6668
:: Testing
67-
ctest --output-on-failure -C Release -V
69+
ctest --output-on-failure -C Release
6870
if errorlevel 1 exit 1
6971
7072
:: Test Python import

CMakeLists.txt

+9-3
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ CMAKE_DEPENDENT_OPTION(GENERATE_PYTHON_STUBS "Generate the Python stubs associat
107107
ADD_PROJECT_DEPENDENCY(Eigen3 REQUIRED PKG_CONFIG_REQUIRES "eigen3 >= 3.0.0")
108108

109109
if(BUILD_PYTHON_INTERFACE)
110-
FIND_PACKAGE(eigenpy 2.7.10 REQUIRED)
110+
FIND_PACKAGE(eigenpy 2.9.2 REQUIRED)
111111
endif()
112112

113113
# Required dependencies
@@ -243,7 +243,6 @@ SET(${PROJECT_NAME}_HEADERS
243243
include/hpp/fcl/BVH/BVH_utility.h
244244
include/hpp/fcl/collision_object.h
245245
include/hpp/fcl/collision_utility.h
246-
include/hpp/fcl/octree.h
247246
include/hpp/fcl/hfield.h
248247
include/hpp/fcl/fwd.hh
249248
include/hpp/fcl/mesh_loader/assimp.h
@@ -257,7 +256,6 @@ SET(${PROJECT_NAME}_HEADERS
257256
include/hpp/fcl/internal/traversal_node_bvh_shape.h
258257
include/hpp/fcl/internal/traversal_node_bvhs.h
259258
include/hpp/fcl/internal/traversal_node_hfield_shape.h
260-
include/hpp/fcl/internal/traversal_node_octree.h
261259
include/hpp/fcl/internal/traversal_node_setup.h
262260
include/hpp/fcl/internal/traversal_node_shapes.h
263261
include/hpp/fcl/internal/traversal_recurse.h
@@ -282,6 +280,14 @@ SET(${PROJECT_NAME}_HEADERS
282280
include/hpp/fcl/timings.h
283281
)
284282

283+
IF(HPP_FCL_HAS_OCTOMAP)
284+
LIST(APPEND ${PROJECT_NAME}_HEADERS
285+
include/hpp/fcl/octree.h
286+
include/hpp/fcl/serialization/octree.h
287+
include/hpp/fcl/internal/traversal_node_octree.h
288+
)
289+
ENDIF(HPP_FCL_HAS_OCTOMAP)
290+
285291
add_subdirectory(doc)
286292
add_subdirectory(src)
287293
if (BUILD_PYTHON_INTERFACE)

LICENSE

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ Software License Agreement (BSD License)
22

33
Copyright (c) 2008-2014, Willow Garage, Inc.
44
Copyright (c) 2014-2015, Open Source Robotics Foundation
5+
Copyright (c) 2014-2023, CNRS
6+
Copyright (c) 2018-2023, INRIA
57
All rights reserved.
68

79
Redistribution and use in source and binary forms, with or without

0 commit comments

Comments
 (0)