diff --git a/.github/workflows/all_ci.yml b/.github/workflows/all_ci.yml index 6a2bfe76e..ac577d422 100644 --- a/.github/workflows/all_ci.yml +++ b/.github/workflows/all_ci.yml @@ -39,18 +39,10 @@ jobs: compiler: ${{ matrix.compiler }} build: ${{ matrix.build }} - mac: - strategy: - matrix: - compiler: [clang] - build: [Release, Debug] - os: ['macos-14'] - uses: ./.github/workflows/generic_ci.yml - with: - install-name: 'install_osx.sh' - os: ${{ matrix.os }} - compiler: ${{ matrix.compiler }} - build: ${{ matrix.build }} + # TODO: the mac os jobs have been removed as part of + # https://github.com/flexible-collision-library/fcl/pull/659. Getting FCL to + # successfully build and pass tests on mac os is still an open issue. See + # https://github.com/flexible-collision-library/fcl/issues/661. # TODO: # - Revisit coveralls. diff --git a/CHANGELOG.md b/CHANGELOG.md index 5135fe986..a640e6022 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## FCL 0 +* Breaking changes + + * Macosx is no longer part of CI. [659](https://github.com/flexible-collision-library/fcl/pull/659) + * See Issue [661](https://github.com/flexible-collision-library/fcl/issues/661) on how to restore it. + ### FCL 0.7.0 (2021-09-09) * Breaking changes diff --git a/CMakeLists.txt b/CMakeLists.txt index d03ebe301..db07db33d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -283,7 +283,7 @@ if(FCL_WITH_OCTOMAP) endif() set(FCL_HAVE_OCTOMAP 1) - message(STATUS "FCL uses OctoMap") + message(STATUS "FCL uses OctoMap ${OCTOMAP_VERSION}") set(PKG_EXTERNAL_DEPS "${PKG_EXTERNAL_DEPS} octomap") else() message(STATUS "FCL does not use OctoMap") @@ -342,7 +342,13 @@ add_subdirectory(include/fcl) set(PKG_DESC "Flexible Collision Library") +if(WIN32) +# It's not clear what is necessary to make C++17 and eigen play together nicely +# on windows. TODO: Figure this out. set(CMAKE_CXX_STANDARD 14) +else() +set(CMAKE_CXX_STANDARD 17) +endif() configure_file(fcl.pc.in fcl.pc @ONLY) diff --git a/ci/install_linux.sh b/ci/install_linux.sh index 8ca130d5b..400846917 100755 --- a/ci/install_linux.sh +++ b/ci/install_linux.sh @@ -7,9 +7,14 @@ sudo apt-get -qq --yes --force-yes install libccd-dev # Octomap git clone https://github.com/OctoMap/octomap cd octomap -git checkout tags/v1.8.0 +git checkout tags/v1.10.0 mkdir build cd build -cmake .. +cmake \ + -DBUILD_DYNAMICETD3D_SUBPROJECT=off \ + -DBUILD_OCTOVIS_SUBPROJECT=off \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.10 \ + .. make sudo make install diff --git a/ci/install_osx.sh b/ci/install_osx.sh index 867493dc9..a15758569 100755 --- a/ci/install_osx.sh +++ b/ci/install_osx.sh @@ -1,3 +1,6 @@ +# Note: this file is vestigial until issue 661 is resolved and macos CI builds +# are restored. + brew update > /dev/null brew install git @@ -8,9 +11,14 @@ brew install libccd # Octomap git clone https://github.com/OctoMap/octomap cd octomap -git checkout tags/v1.8.0 +git checkout tags/v1.10.0 mkdir build cd build -cmake .. +cmake \ + -DBUILD_DYNAMICETD3D_SUBPROJECT=off \ + -DBUILD_OCTOVIS_SUBPROJECT=off \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.10 \ + .. make sudo make install diff --git a/test/geometry/shape/test_convex.cpp b/test/geometry/shape/test_convex.cpp index 5924af495..cc242f40c 100644 --- a/test/geometry/shape/test_convex.cpp +++ b/test/geometry/shape/test_convex.cpp @@ -778,7 +778,7 @@ class TessellatedSphere final : public Polytope { public: TessellatedSphere() : Polytope(1.0) { // The angle between the latitude lines measured along the prime meridian. - const double dphi = M_PI / 8; + const double dphi = constants::pi() / 8; auto slice_height = [dphi](int slice_index) { // Assumes 1 <= slice_index < 8. return std::cos(slice_index * dphi); @@ -791,7 +791,7 @@ class TessellatedSphere final : public Polytope { vertices_->push_back({0, 0, 1}); // Now create the bands of vertices between slices 1 & 2, 2 & 3, etc. // The angle between the longitude lines measured along the equator. - const double dtheta = 2 * M_PI / 8; + const double dtheta = 2 * constants::pi() / 8; for (int slice = 1; slice < 8; ++slice) { double z = slice_height(slice); double r = slice_radius(slice); diff --git a/test/test_fcl_capsule_capsule.cpp b/test/test_fcl_capsule_capsule.cpp index 771be30c8..08015a661 100644 --- a/test/test_fcl_capsule_capsule.cpp +++ b/test/test_fcl_capsule_capsule.cpp @@ -604,7 +604,8 @@ class CapsuleCapsuleSegmentTest : public ::testing::Test { detail::capsuleCapsuleDistance(this->c1_, this->X_FC1_, this->c2_, this->X_FC2_, &distance, &p_FW1, &p_FW2); - const auto eps = constants::eps_78(); + // Slightly looser tolerance to accommodate multiple platforms. + const auto eps = constants::eps_34(); using std::abs; S error = abs(distance - this->expected_distance_); if (error > eps) { @@ -683,7 +684,7 @@ class CapsuleCapsuleSegmentTest : public ::testing::Test { Transform3 X_TC1 = Transform3::Identity(); Transform3 X_TC2 = Transform3::Identity(); - // Position C2 so that the lower end of its center lines is at the origin + // Position C2 so that the lower end of its center line is at the origin // and overlaps with the upper end of C1's center line. X_TC2.translation() << S(0), S(0), c2_.lz / S(2); diff --git a/test/test_fcl_geometric_shapes.cpp b/test/test_fcl_geometric_shapes.cpp index c76149e33..6be84b0a1 100755 --- a/test/test_fcl_geometric_shapes.cpp +++ b/test/test_fcl_geometric_shapes.cpp @@ -3947,27 +3947,27 @@ void test_shapeDistance_conecylinder() S dist; res = solver1().shapeDistance(s1, Transform3::Identity(), s2, Transform3::Identity(), &dist); - EXPECT_TRUE(dist < 0); + EXPECT_LT(dist, 0); EXPECT_FALSE(res); res = solver1().shapeDistance(s1, transform, s2, transform, &dist); - EXPECT_TRUE(dist < 0); + EXPECT_LT(dist, 0); EXPECT_FALSE(res); res = solver1().shapeDistance(s1, Transform3::Identity(), s2, Transform3(Translation3(Vector3(10.1, 0, 0))), &dist); - EXPECT_TRUE(fabs(dist - 0.1) < 0.01); + EXPECT_NEAR(dist - 0.1, 0, 0.01); EXPECT_TRUE(res); res = solver1().shapeDistance(s1, transform, s2, transform * Transform3(Translation3(Vector3(10.1, 0, 0))), &dist); - EXPECT_TRUE(fabs(dist - 0.1) < 0.02); + EXPECT_NEAR(dist - 0.1, 0, 0.02); EXPECT_TRUE(res); res = solver1().shapeDistance(s1, Transform3::Identity(), s2, Transform3(Translation3(Vector3(40, 0, 0))), &dist); - EXPECT_TRUE(fabs(dist - 30) < 0.01); + EXPECT_NEAR(dist - 30, 0, 0.01); EXPECT_TRUE(res); res = solver1().shapeDistance(s1, transform, s2, transform * Transform3(Translation3(Vector3(40, 0, 0))), &dist); - EXPECT_TRUE(fabs(dist - 30) < 0.1); + EXPECT_NEAR(dist - 30, 0, 0.01); EXPECT_TRUE(res); }