diff --git a/CITATION.bib b/CITATION.bib new file mode 100644 index 000000000..cc6fee36e --- /dev/null +++ b/CITATION.bib @@ -0,0 +1,6 @@ +@misc{hppfclweb, + author = {Jia Pan and Sachin Chitta and Dinesh Manocha and Florent Lamiraux and Joseph Mirabel and Justin Carpentier and Louis Montaut and others}, + title = {HPP-FCL: an extension of the Flexible Collision Library}, + howpublished = {https://github.com/humanoid-path-planner/hpp-fcl}, + year = {2015--2023} +} \ No newline at end of file diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 000000000..d70e6d190 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,23 @@ +cff-version: 1.2.0 +message: Thanks for using HPP-FCL. Please use the following metadata to cite us in your documents. +title: HPP-FCL - An extension of the Flexible Collision Library +abstract: An extension of the Flexible Collision Library + - family-names: Pan + given-names: Jia + - family-names: Chitta + given-names: Sachin + - family-names: Pan + given-names: Jia + - family-names: Manocha + given-names: Dinesh + - family-names: Mirabel + given-names: Joseph + - family-names: Carpentier + given-names: Justin + orcid: "https://orcid.org/0000-0001-6585-2894" + - family-names: Montaut + given-names: Louis +version: 2.3.5 +date-released: "2023-07-11" +license: BSD-2-Clause +repository-code: "https://github.com/humanoid-path-planner/hpp-fcl" \ No newline at end of file diff --git a/cmake b/cmake index f7cc14fec..47b924b47 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit f7cc14fecaa04a439399923ad1c9cc6cafa8a251 +Subproject commit 47b924b4760b239a75474462c1d6d66f74ba42d8 diff --git a/include/hpp/fcl/BVH/BVH_model.h b/include/hpp/fcl/BVH/BVH_model.h index cc88f0fb0..a57fc7b84 100644 --- a/include/hpp/fcl/BVH/BVH_model.h +++ b/include/hpp/fcl/BVH/BVH_model.h @@ -328,7 +328,7 @@ class HPP_FCL_DLLAPI BVHModel : public BVHModelBase { /// save one matrix transformation. void makeParentRelative() { Matrix3f I(Matrix3f::Identity()); - makeParentRelativeRecurse(0, I, Vec3f()); + makeParentRelativeRecurse(0, I, Vec3f::Zero()); } protected: diff --git a/include/hpp/fcl/internal/tools.h b/include/hpp/fcl/internal/tools.h index 4e1a342c8..52a2ecad7 100644 --- a/include/hpp/fcl/internal/tools.h +++ b/include/hpp/fcl/internal/tools.h @@ -35,11 +35,10 @@ /** \author Joseph Mirabel */ -#ifndef HPP_FCL_MATH_TOOLS_H -#define HPP_FCL_MATH_TOOLS_H +#ifndef HPP_FCL_INTERNAL_TOOLS_H +#define HPP_FCL_INTERNAL_TOOLS_H -#include -#include +#include #include #include @@ -110,6 +109,7 @@ void eigen(const Eigen::MatrixBase& m, int j, iq, ip, i; Scalar tresh, theta, tau, t, sm, s, h, g, c; int nrot; + HPP_FCL_UNUSED_VARIABLE(nrot); Scalar b[3]; Scalar z[3]; Scalar v[3][3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}; diff --git a/src/BV/AABB.cpp b/src/BV/AABB.cpp index 3fdc7036c..665efc0b4 100644 --- a/src/BV/AABB.cpp +++ b/src/BV/AABB.cpp @@ -55,7 +55,7 @@ bool AABB::overlap(const AABB& other, const CollisionRequest& request, sqrDistLowerBound = (min_ - other.max_ - Vec3f::Constant(request.security_margin)) .array() - .max(0) + .max(FCL_REAL(0)) .matrix() .squaredNorm(); if (sqrDistLowerBound > break_distance_squared) return false; @@ -63,7 +63,7 @@ bool AABB::overlap(const AABB& other, const CollisionRequest& request, sqrDistLowerBound = (other.min_ - max_ - Vec3f::Constant(request.security_margin)) .array() - .max(0) + .max(FCL_REAL(0)) .matrix() .squaredNorm(); if (sqrDistLowerBound > break_distance_squared) return false; diff --git a/src/BV/OBB.cpp b/src/BV/OBB.cpp index 63e7a7b91..10d508953 100644 --- a/src/BV/OBB.cpp +++ b/src/BV/OBB.cpp @@ -292,7 +292,7 @@ inline FCL_REAL obbDisjoint_check_A_axis(const Vec3f& T, const Vec3f& a, // |T| - |B| * b - a Vec3f AABB_corner(T.cwiseAbs() - a); AABB_corner.noalias() -= Bf * b; - return AABB_corner.array().max(0).matrix().squaredNorm(); + return AABB_corner.array().max(FCL_REAL(0)).matrix().squaredNorm(); } inline FCL_REAL obbDisjoint_check_B_axis(const Matrix3f& B, const Vec3f& T, @@ -356,10 +356,12 @@ bool obbDisjointAndLowerBoundDistance(const Matrix3f& B, const Vec3f& T, request.break_distance * request.break_distance; Matrix3f Bf(B.cwiseAbs()); - const Vec3f a( - (a_ + Vec3f::Constant(request.security_margin / 2)).array().max(0)); - const Vec3f b( - (b_ + Vec3f::Constant(request.security_margin / 2)).array().max(0)); + const Vec3f a((a_ + Vec3f::Constant(request.security_margin / 2)) + .array() + .max(FCL_REAL(0))); + const Vec3f b((b_ + Vec3f::Constant(request.security_margin / 2)) + .array() + .max(FCL_REAL(0))); // Corner of b axis aligned bounding box the closest to the origin squaredLowerBoundDistance = internal::obbDisjoint_check_A_axis(T, a, b, Bf); diff --git a/test/obb.cpp b/test/obb.cpp index 578d8f73f..cad2c8c5a 100644 --- a/test/obb.cpp +++ b/test/obb.cpp @@ -129,7 +129,7 @@ inline FCL_REAL _computeDistanceForCase1(const Vec3f& T, const Vec3f& a, AABB_corner.noalias() = T.cwiseAbs() - Bf * b - a; #endif // */ - return AABB_corner.array().max(0).matrix().squaredNorm(); + return AABB_corner.array().max(FCL_REAL(0)).matrix().squaredNorm(); } inline FCL_REAL _computeDistanceForCase2(const Matrix3f& B, const Vec3f& T, @@ -138,7 +138,7 @@ inline FCL_REAL _computeDistanceForCase2(const Matrix3f& B, const Vec3f& T, /* Vec3f AABB_corner(PRODUCT(B.transpose(), T).cwiseAbs() - b); AABB_corner.noalias() -= PRODUCT(Bf.transpose(), a); - return AABB_corner.array().max(0).matrix().squaredNorm (); + return AABB_corner.array().max(FCL_REAL(0)).matrix().squaredNorm (); /*/ #if MANUAL_PRODUCT FCL_REAL s, t = 0; @@ -151,7 +151,7 @@ inline FCL_REAL _computeDistanceForCase2(const Matrix3f& B, const Vec3f& T, return t; #else Vec3f AABB_corner((B.transpose() * T).cwiseAbs() - Bf.transpose() * a - b); - return AABB_corner.array().max(0).matrix().squaredNorm(); + return AABB_corner.array().max(FCL_REAL(0)).matrix().squaredNorm(); #endif // */ }