From 83993a0ecb7e16d93720c0955c63b9297faff4b7 Mon Sep 17 00:00:00 2001 From: Sean Curtis Date: Wed, 5 Aug 2020 14:24:43 -0700 Subject: [PATCH] Move CI to more modern platforms 1. Advance linux to bionic 2. Advance mac to xcode 11.3; that correlates with macOS 10.14.6 which is a common contemporary of bionic. 3. Appveyor accesses eigen via gitlab (instead of bitbucket). 4. Clean up: - HierarchyTree::SortByMorton had "maybe" uninitialized values. Cleaned up initialization and instantiation (using RAII). --- .appveyor.yml | 6 +-- .travis.yml | 6 +-- CHANGELOG.md | 38 +++++++++++++++++++ .../detail/hierarchy_tree_array-inl.h | 23 +++-------- .../broadphase/detail/hierarchy_tree_array.h | 7 +++- include/fcl/common/warning.h | 15 -------- 6 files changed, 54 insertions(+), 41 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 4131300de..99cde2fc0 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -38,9 +38,9 @@ before_build: cd ..\.. ) else (echo Using cached libccd) - cmd: if not exist C:\"Program Files"\Eigen\include\eigen3\Eigen\Core ( - curl -L -o eigen-eigen-dc6cfdf9bcec.tar.gz https://bitbucket.org/eigen/eigen/get/3.2.9.tar.gz && - cmake -E tar zxf eigen-eigen-dc6cfdf9bcec.tar.gz && - cd eigen-eigen-dc6cfdf9bcec && + curl -LO https://gitlab.com/libeigen/eigen/-/archive/3.2.9/eigen-3.2.9.tar.gz && + cmake -E tar zxf eigen-3.2.9.tar.gz && + cd eigen-3.2.9 && mkdir build && cd build && cmake -G "%CMAKE_GENERATOR_NAME%" -DCMAKE_BUILD_TYPE=%Configuration% .. && diff --git a/.travis.yml b/.travis.yml index 13725ace4..283319551 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ sudo: required -dist: trusty +dist: bionic cache: apt: true @@ -20,11 +20,11 @@ matrix: compiler: clang env: BUILD_TYPE=Release COVERALLS=OFF - os: osx - osx_image: xcode9 + osx_image: xcode11.3 compiler: clang env: BUILD_TYPE=Debug COVERALLS=OFF - os: osx - osx_image: xcode9 + osx_image: xcode11.3 compiler: clang env: BUILD_TYPE=Release COVERALLS=OFF diff --git a/CHANGELOG.md b/CHANGELOG.md index 97629ed89..94597a828 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,43 @@ ## FCL 0 +### FCL 0.7.0 (????-??-??) + +* Breaking changes + + * Macros `FCL_SUPPRESS_MAYBE_UNINITIALIZED_BEGIN` and `FCL_SUPPRESS_MAYBE_UNINITIALIZED_END` defined in `fcl/common/warning.h` have been removed: + [#489](https://github.com/flexible-collision-library/fcl/pull/489) + +* Core/Common + +* Math + +* Geometry + + * OcTree logic for determining free/occupied: + [#467](https://github.com/flexible-collision-library/fcl/pull/467) + * Bugs in RSS distance queries fixed: + [#467](https://github.com/flexible-collision-library/fcl/pull/467) + +* Broadphase + +* Narrowphase + + * Primitive convex-half space collision algorithm introduced: + [#469](https://github.com/flexible-collision-library/fcl/pull/469) + * Contact and distance query results types changed to be compatible with OcTree: + [#472](https://github.com/flexible-collision-library/fcl/pull/472) + * Documentation for OcTree no longer mistakenly excluded from doxygen: + [#472](https://github.com/flexible-collision-library/fcl/pull/472) + +* Build/Test/Misc + + * Fixed synatx prevent build in Visual Studio 2015: + [#459](https://github.com/flexible-collision-library/fcl/pull/459) + * Fix compilation errors using default options on Emscripten: + [#470](https://github.com/flexible-collision-library/fcl/pull/470) + * Change supported linux build to Ubuntu 18.04 and Mac OS 10.14.6: + [#489](https://github.com/flexible-collision-library/fcl/pull/489) + ### FCL 0.6.1 (2020-02-26) * Math diff --git a/include/fcl/broadphase/detail/hierarchy_tree_array-inl.h b/include/fcl/broadphase/detail/hierarchy_tree_array-inl.h index 6e9d33498..961b605ea 100644 --- a/include/fcl/broadphase/detail/hierarchy_tree_array-inl.h +++ b/include/fcl/broadphase/detail/hierarchy_tree_array-inl.h @@ -161,10 +161,7 @@ void HierarchyTree::init_1(NodeType* leaves, int n_leaves_) for(size_t i = 0; i < n_leaves; ++i) ids[i] = i; - FCL_SUPPRESS_MAYBE_UNINITIALIZED_BEGIN - SortByMorton comp; - FCL_SUPPRESS_MAYBE_UNINITIALIZED_END - comp.nodes = nodes; + const SortByMorton comp{nodes}; std::sort(ids, ids + n_leaves, comp); root_node = mortonRecurse_0(ids, ids + n_leaves, (1 << (coder.bits()-1)), coder.bits()-1); delete [] ids; @@ -208,10 +205,7 @@ void HierarchyTree::init_2(NodeType* leaves, int n_leaves_) for(size_t i = 0; i < n_leaves; ++i) ids[i] = i; - FCL_SUPPRESS_MAYBE_UNINITIALIZED_BEGIN - SortByMorton comp; - FCL_SUPPRESS_MAYBE_UNINITIALIZED_END - comp.nodes = nodes; + const SortByMorton comp{nodes}; std::sort(ids, ids + n_leaves, comp); root_node = mortonRecurse_1(ids, ids + n_leaves, (1 << (coder.bits()-1)), coder.bits()-1); delete [] ids; @@ -255,10 +249,7 @@ void HierarchyTree::init_3(NodeType* leaves, int n_leaves_) for(size_t i = 0; i < n_leaves; ++i) ids[i] = i; - FCL_SUPPRESS_MAYBE_UNINITIALIZED_BEGIN - SortByMorton comp; - FCL_SUPPRESS_MAYBE_UNINITIALIZED_END - comp.nodes = nodes; + const SortByMorton comp{nodes}; std::sort(ids, ids + n_leaves, comp); root_node = mortonRecurse_2(ids, ids + n_leaves); delete [] ids; @@ -722,9 +713,7 @@ size_t HierarchyTree::mortonRecurse_0(size_t* lbeg, size_t* lend, const uint { if(bits > 0) { - SortByMorton comp; - comp.nodes = nodes; - comp.split = split; + const SortByMorton comp{nodes, split}; size_t* lcenter = std::lower_bound(lbeg, lend, NULL_NODE, comp); if(lcenter == lbeg) @@ -771,9 +760,7 @@ size_t HierarchyTree::mortonRecurse_1(size_t* lbeg, size_t* lend, const uint { if(bits > 0) { - SortByMorton comp; - comp.nodes = nodes; - comp.split = split; + const SortByMorton comp{nodes, split}; size_t* lcenter = std::lower_bound(lbeg, lend, NULL_NODE, comp); if(lcenter == lbeg) diff --git a/include/fcl/broadphase/detail/hierarchy_tree_array.h b/include/fcl/broadphase/detail/hierarchy_tree_array.h index b55f1e85e..85e80feaf 100644 --- a/include/fcl/broadphase/detail/hierarchy_tree_array.h +++ b/include/fcl/broadphase/detail/hierarchy_tree_array.h @@ -65,6 +65,9 @@ class FCL_EXPORT HierarchyTree struct SortByMorton { + SortByMorton(NodeType* nodes_in) : nodes(nodes_in) {} + SortByMorton(NodeType* nodes_in, uint32 split_in) + : nodes(nodes_in), split(split_in) {} bool operator() (size_t a, size_t b) const { if((a != NULL_NODE) && (b != NULL_NODE)) @@ -77,8 +80,8 @@ class FCL_EXPORT HierarchyTree return false; } - NodeType* nodes; - uint32 split; + NodeType* nodes{}; + uint32 split{}; }; public: diff --git a/include/fcl/common/warning.h b/include/fcl/common/warning.h index f4ec7ee7d..8b93d2684 100644 --- a/include/fcl/common/warning.h +++ b/include/fcl/common/warning.h @@ -68,13 +68,6 @@ #define FCL_SUPPRESS_UNINITIALIZED_END \ _Pragma("GCC diagnostic pop") - #define FCL_SUPPRESS_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma("GCC diagnostic push") \ - _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") - - #define FCL_SUPPRESS_MAYBE_UNINITIALIZED_END \ - _Pragma("GCC diagnostic pop") - #elif defined (FCL_COMPILER_CLANG) #define FCL_SUPPRESS_DEPRECATED_BEGIN \ @@ -91,10 +84,6 @@ #define FCL_SUPPRESS_UNINITIALIZED_END \ _Pragma("clang diagnostic pop") - #define FCL_SUPPRESS_MAYBE_UNINITIALIZED_BEGIN - - #define FCL_SUPPRESS_MAYBE_UNINITIALIZED_END - #elif defined (FCL_COMPILER_MSVC) #define FCL_SUPPRESS_DEPRECATED_BEGIN \ @@ -108,10 +97,6 @@ #define FCL_SUPPRESS_UNINITIALIZED_END // TODO - #define FCL_SUPPRESS_MAYBE_UNINITIALIZED_BEGIN // TODO - - #define FCL_SUPPRESS_MAYBE_UNINITIALIZED_END // TODO - #endif #endif // FCL_COMMON_WARNING_H