Skip to content

Commit

Permalink
Merge pull request #449 from jcarpent/hppfcl2x
Browse files Browse the repository at this point in the history
Add citations
  • Loading branch information
jcarpent authored Jul 26, 2023
2 parents a8e5f33 + 0d507fb commit e050e6d
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 16 deletions.
6 changes: 6 additions & 0 deletions CITATION.bib
Original file line number Diff line number Diff line change
@@ -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}
}
23 changes: 23 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion cmake
2 changes: 1 addition & 1 deletion include/hpp/fcl/BVH/BVH_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions include/hpp/fcl/internal/tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <Eigen/Dense>
#include <Eigen/Geometry>
#include <hpp/fcl/fwd.hh>

#include <cmath>
#include <iostream>
Expand Down Expand Up @@ -110,6 +109,7 @@ void eigen(const Eigen::MatrixBase<Derived>& 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}};
Expand Down
4 changes: 2 additions & 2 deletions src/BV/AABB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ 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;

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;
Expand Down
12 changes: 7 additions & 5 deletions src/BV/OBB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions test/obb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
Expand All @@ -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
// */
}
Expand Down

0 comments on commit e050e6d

Please sign in to comment.