Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Humanoid Path Planner
hpp-fcl
Commits
203e9663
Verified
Commit
203e9663
authored
Nov 16, 2020
by
Justin Carpentier
Browse files
all: fix HPP_FCL_HAS_OCTOMAP
Previously, it was name
parent
991b9195
Changes
9
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
203e9663
...
...
@@ -92,14 +92,14 @@ endif ()
# Optional dependencies
ADD_PROJECT_DEPENDENCY
(
octomap PKG_CONFIG_REQUIRES
"octomap >= 1.6"
)
if
(
octomap_FOUND
)
SET
(
HPP_FCL_HA
VE
_OCTOMAP TRUE
)
SET
(
HPP_FCL_HA
S
_OCTOMAP TRUE
)
string
(
REPLACE
"."
";"
VERSION_LIST
${
octomap_VERSION
}
)
list
(
GET VERSION_LIST 0 OCTOMAP_MAJOR_VERSION
)
list
(
GET VERSION_LIST 1 OCTOMAP_MINOR_VERSION
)
list
(
GET VERSION_LIST 2 OCTOMAP_PATCH_VERSION
)
message
(
STATUS
"FCL uses Octomap"
)
else
()
SET
(
HPP_FCL_HA
VE
_OCTOMAP FALSE
)
SET
(
HPP_FCL_HA
S
_OCTOMAP FALSE
)
message
(
STATUS
"FCL does not use Octomap"
)
endif
()
...
...
@@ -184,11 +184,11 @@ endif ()
add_subdirectory
(
test
)
pkg_config_append_libs
(
"hpp-fcl"
)
IF
(
HPP_FCL_HA
VE
_OCTOMAP
)
IF
(
HPP_FCL_HA
S
_OCTOMAP
)
# FCL_HAVE_OCTOMAP kept for backward compatibility reasons.
PKG_CONFIG_APPEND_CFLAGS
(
"-DHPP_FCL_HA
VE
_OCTOMAP -DFCL_HAVE_OCTOMAP -DOCTOMAP_MAJOR_VERSION=
${
OCTOMAP_MAJOR_VERSION
}
-DOCTOMAP_MINOR_VERSION=
${
OCTOMAP_MINOR_VERSION
}
-DOCTOMAP_PATCH_VERSION=
${
OCTOMAP_PATCH_VERSION
}
"
)
ENDIF
(
HPP_FCL_HA
VE
_OCTOMAP
)
"-DHPP_FCL_HA
S
_OCTOMAP -DFCL_HAVE_OCTOMAP -DOCTOMAP_MAJOR_VERSION=
${
OCTOMAP_MAJOR_VERSION
}
-DOCTOMAP_MINOR_VERSION=
${
OCTOMAP_MINOR_VERSION
}
-DOCTOMAP_PATCH_VERSION=
${
OCTOMAP_PATCH_VERSION
}
"
)
ENDIF
(
HPP_FCL_HA
S
_OCTOMAP
)
# Install catkin package.xml
INSTALL
(
FILES package.xml DESTINATION share/
${
PROJECT_NAME
}
)
include/hpp/fcl/data_types.h
View file @
203e9663
...
...
@@ -46,7 +46,8 @@
namespace
hpp
{
#ifdef HPP_FCL_HAVE_OCTOMAP
#ifdef HPP_FCL_HAS_OCTOMAP
#define HPP_FCL_HAVE_OCTOMAP
#define OCTOMAP_VERSION_AT_LEAST(x,y,z) \
(OCTOMAP_MAJOR_VERSION > x || (OCTOMAP_MAJOR_VERSION >= x && \
(OCTOMAP_MINOR_VERSION > y || (OCTOMAP_MINOR_VERSION >= y && \
...
...
@@ -56,7 +57,7 @@ namespace hpp
(OCTOMAP_MAJOR_VERSION < x || (OCTOMAP_MAJOR_VERSION <= x && \
(OCTOMAP_MINOR_VERSION < y || (OCTOMAP_MINOR_VERSION <= y && \
OCTOMAP_PATCH_VERSION <= z))))
#endif // HPP_FCL_HA
VE
_OCTOMAP
#endif // HPP_FCL_HA
S
_OCTOMAP
}
namespace
hpp
...
...
include/hpp/fcl/internal/traversal_node_setup.h
View file @
203e9663
...
...
@@ -45,7 +45,7 @@
#include <hpp/fcl/internal/traversal_node_shapes.h>
#include <hpp/fcl/internal/traversal_node_bvh_shape.h>
#ifdef HPP_FCL_HA
VE
_OCTOMAP
#ifdef HPP_FCL_HA
S
_OCTOMAP
#include <hpp/fcl/internal/traversal_node_octree.h>
#endif
...
...
@@ -56,7 +56,7 @@ namespace hpp
namespace
fcl
{
#ifdef HPP_FCL_HA
VE
_OCTOMAP
#ifdef HPP_FCL_HA
S
_OCTOMAP
/// @brief Initialize traversal node for collision between two octrees, given current object transform
inline
bool
initialize
(
OcTreeCollisionTraversalNode
&
node
,
const
OcTree
&
model1
,
const
Transform3f
&
tf1
,
...
...
src/CMakeLists.txt
View file @
203e9663
...
...
@@ -202,7 +202,7 @@ IF(octomap_FOUND)
target_include_directories
(
${
LIBRARY_NAME
}
SYSTEM PUBLIC
${
OCTOMAP_INCLUDE_DIRS
}
)
target_link_libraries
(
${
LIBRARY_NAME
}
PUBLIC
${
OCTOMAP_LIBRARIES
}
)
target_compile_definitions
(
${
LIBRARY_NAME
}
PUBLIC
-DHPP_FCL_HA
VE
_OCTOMAP
-DHPP_FCL_HA
S
_OCTOMAP
-DOCTOMAP_MAJOR_VERSION=
${
OCTOMAP_MAJOR_VERSION
}
-DOCTOMAP_MINOR_VERSION=
${
OCTOMAP_MINOR_VERSION
}
-DOCTOMAP_PATCH_VERSION=
${
OCTOMAP_PATCH_VERSION
}
)
...
...
src/collision_func_matrix.cpp
View file @
203e9663
...
...
@@ -49,7 +49,7 @@ namespace hpp
namespace
fcl
{
#ifdef HPP_FCL_HA
VE
_OCTOMAP
#ifdef HPP_FCL_HA
S
_OCTOMAP
template
<
typename
TypeA
,
typename
TypeB
>
std
::
size_t
Collide
(
const
CollisionGeometry
*
o1
,
const
Transform3f
&
tf1
,
const
CollisionGeometry
*
o2
,
const
Transform3f
&
tf2
,
...
...
@@ -416,7 +416,7 @@ CollisionFunctionMatrix::CollisionFunctionMatrix()
collision_matrix
[
BV_kIOS
][
BV_kIOS
]
=
&
BVHCollide
<
kIOS
>
;
collision_matrix
[
BV_OBBRSS
][
BV_OBBRSS
]
=
&
BVHCollide
<
OBBRSS
>
;
#ifdef HPP_FCL_HA
VE
_OCTOMAP
#ifdef HPP_FCL_HA
S
_OCTOMAP
collision_matrix
[
GEOM_OCTREE
][
GEOM_BOX
]
=
&
Collide
<
OcTree
,
Box
>
;
collision_matrix
[
GEOM_OCTREE
][
GEOM_SPHERE
]
=
&
Collide
<
OcTree
,
Sphere
>
;
collision_matrix
[
GEOM_OCTREE
][
GEOM_CAPSULE
]
=
&
Collide
<
OcTree
,
Capsule
>
;
...
...
src/distance_func_matrix.cpp
View file @
203e9663
...
...
@@ -47,7 +47,7 @@ namespace hpp
namespace
fcl
{
#ifdef HPP_FCL_HA
VE
_OCTOMAP
#ifdef HPP_FCL_HA
S
_OCTOMAP
template
<
typename
TypeA
,
typename
TypeB
>
FCL_REAL
Distance
(
const
CollisionGeometry
*
o1
,
const
Transform3f
&
tf1
,
const
CollisionGeometry
*
o2
,
const
Transform3f
&
tf2
,
const
GJKSolver
*
nsolver
,
...
...
@@ -390,7 +390,7 @@ DistanceFunctionMatrix::DistanceFunctionMatrix()
distance_matrix
[
BV_kIOS
][
BV_kIOS
]
=
&
BVHDistance
<
kIOS
>
;
distance_matrix
[
BV_OBBRSS
][
BV_OBBRSS
]
=
&
BVHDistance
<
OBBRSS
>
;
#ifdef HPP_FCL_HA
VE
_OCTOMAP
#ifdef HPP_FCL_HA
S
_OCTOMAP
distance_matrix
[
GEOM_OCTREE
][
GEOM_BOX
]
=
&
Distance
<
OcTree
,
Box
>
;
distance_matrix
[
GEOM_OCTREE
][
GEOM_SPHERE
]
=
&
Distance
<
OcTree
,
Sphere
>
;
distance_matrix
[
GEOM_OCTREE
][
GEOM_CAPSULE
]
=
&
Distance
<
OcTree
,
Capsule
>
;
...
...
src/mesh_loader/loader.cpp
View file @
203e9663
...
...
@@ -37,7 +37,7 @@
#include <hpp/fcl/mesh_loader/loader.h>
#include <hpp/fcl/mesh_loader/assimp.h>
#ifdef HPP_FCL_HA
VE
_OCTOMAP
#ifdef HPP_FCL_HA
S
_OCTOMAP
# include <hpp/fcl/octree.h>
#endif
...
...
@@ -83,7 +83,7 @@ namespace fcl {
CollisionGeometryPtr_t
MeshLoader
::
loadOctree
(
const
std
::
string
&
filename
)
{
#ifdef HPP_FCL_HA
VE
_OCTOMAP
#ifdef HPP_FCL_HA
S
_OCTOMAP
shared_ptr
<
octomap
::
OcTree
>
octree
(
new
octomap
::
OcTree
(
filename
));
return
CollisionGeometryPtr_t
(
new
hpp
::
fcl
::
OcTree
(
octree
));
#else
...
...
test/CMakeLists.txt
View file @
203e9663
...
...
@@ -57,9 +57,9 @@ add_fcl_test(bvh_models bvh_models.cpp)
add_fcl_test
(
profiling profiling.cpp
)
add_fcl_test
(
gjk gjk.cpp
)
if
(
HPP_FCL_HA
VE
_OCTOMAP
)
if
(
HPP_FCL_HA
S
_OCTOMAP
)
add_fcl_test
(
octree octree.cpp
)
endif
(
HPP_FCL_HA
VE
_OCTOMAP
)
endif
(
HPP_FCL_HA
S
_OCTOMAP
)
## Benchmark
IF
(
BUILD_TESTING
)
...
...
test/utility.cpp
View file @
203e9663
...
...
@@ -216,7 +216,7 @@ void saveOBJFile(const char* filename, std::vector<Vec3f>& points, std::vector<T
os
.
close
();
}
#ifdef HPP_FCL_HA
VE
_OCTOMAP
#ifdef HPP_FCL_HA
S
_OCTOMAP
OcTree
loadOctreeFile
(
const
std
::
string
&
filename
,
const
FCL_REAL
&
resolution
)
{
OcTreePtr_t
octree
(
new
octomap
::
OcTree
(
filename
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment