Skip to content
GitLab
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
a089b172
Unverified
Commit
a089b172
authored
Sep 13, 2021
by
Justin Carpentier
Committed by
GitHub
Sep 13, 2021
Browse files
Merge pull request #241 from jcarpent/devel
Bug fixes
parents
a8a119ed
8471b409
Pipeline
#16030
passed with stage
in 23 minutes and 8 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.github/workflows/conda/conda-env.yml
View file @
a089b172
...
...
@@ -13,3 +13,4 @@ dependencies:
-
doxygen
-
lxml
-
pylatexenc
-
qhull
.github/workflows/macos-linux-conda.yml
View file @
a089b172
...
...
@@ -40,7 +40,7 @@ jobs:
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$(which python3) -DGENERATE_PYTHON_STUBS=ON
cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$(which python3) -DGENERATE_PYTHON_STUBS=ON
-DHPP_FCL_HAS_QHULL=ON
make -j2
make build_tests
export CTEST_OUTPUT_ON_FAILURE=1
...
...
.github/workflows/windows-conda-clang.yml
View file @
a089b172
...
...
@@ -55,6 +55,7 @@ jobs:
-DGENERATE_PYTHON_STUBS=OFF ^
-DPYTHON_SITELIB=%CONDA_PREFIX%\Lib\site-packages ^
-DPYTHON_EXECUTABLE=%CONDA_PREFIX%\python.exe ^
-DHPP_FCL_HAS_QHULL=ON ^
-DBUILD_PYTHON_INTERFACE=ON ^
..
...
...
.github/workflows/windows-conda-v142.yml
View file @
a089b172
...
...
@@ -54,6 +54,7 @@ jobs:
-DGENERATE_PYTHON_STUBS=OFF ^
-DPYTHON_SITELIB=%CONDA_PREFIX%\Lib\site-packages ^
-DPYTHON_EXECUTABLE=%CONDA_PREFIX%\python.exe ^
-DHPP_FCL_HAS_QHULL=ON ^
-DBUILD_PYTHON_INTERFACE=ON ^
..
...
...
CMakeLists.txt
View file @
a089b172
...
...
@@ -120,10 +120,8 @@ endif()
option
(
HPP_FCL_HAS_QHULL
"use qhull library to compute convex hulls."
FALSE
)
if
(
HPP_FCL_HAS_QHULL
)
if
(
DEFINED CMAKE_CXX_STANDARD AND CMAKE_CXX_STANDARD EQUAL 98
)
message
(
FATAL_ERROR
"Cannot use qhull library with C++ < 11.
\n
You may add -DCMAKE_CXX_STANDARD=11"
)
endif
()
find_package
(
Qhull COMPONENTS qhull_r qhullcpp
)
CHECK_MINIMAL_CXX_STANDARD
(
11 ENFORCE
)
ADD_PROJECT_DEPENDENCY
(
Qhull COMPONENTS qhull_r qhullcpp PKG_CONFIG_REQUIRES
"qhull_r, qhuppcpp"
)
if
(
Qhull_FOUND
)
set
(
HPP_FCL_USE_SYSTEM_QHULL TRUE
)
else
()
...
...
include/hpp/fcl/internal/traversal_node_base.h
View file @
a089b172
...
...
@@ -119,10 +119,7 @@ public:
virtual
bool
BVDisjoints
(
int
b1
,
int
b2
,
FCL_REAL
&
sqrDistLowerBound
)
const
=
0
;
/// @brief Leaf test between node b1 and b2, if they are both leafs
virtual
void
leafCollides
(
int
/*b1*/
,
int
/*b2*/
,
FCL_REAL
&
/*sqrDistLowerBound*/
)
const
{
throw
std
::
runtime_error
(
"Not implemented"
);
}
virtual
void
leafCollides
(
int
/*b1*/
,
int
/*b2*/
,
FCL_REAL
&
/*sqrDistLowerBound*/
)
const
=
0
;
/// @brief Check whether the traversal can stop
bool
canStop
()
const
{
return
this
->
request
.
isSatisfied
(
*
(
this
->
result
));
}
...
...
python/collision-geometries.cc
View file @
a089b172
...
...
@@ -77,12 +77,20 @@ typedef std::vector<Triangle> Triangles;
struct
BVHModelBaseWrapper
{
static
Vec3f
vertices
(
const
BVHModelBase
&
bvh
,
int
i
)
typedef
Eigen
::
Matrix
<
double
,
Eigen
::
Dynamic
,
3
>
MatrixX3
;
typedef
Eigen
::
Map
<
MatrixX3
>
MapMatrixX3
;
static
Vec3f
&
vertice
(
BVHModelBase
&
bvh
,
int
i
)
{
if
(
i
>=
bvh
.
num_vertices
)
throw
std
::
out_of_range
(
"index is out of range"
);
return
bvh
.
vertices
[
i
];
}
static
MapMatrixX3
vertices
(
BVHModelBase
&
bvh
)
{
return
MapMatrixX3
(
bvh
.
vertices
[
0
].
data
(),
bvh
.
num_vertices
,
3
);
}
static
Triangle
tri_indices
(
const
BVHModelBase
&
bvh
,
int
i
)
{
if
(
i
>=
bvh
.
num_tris
)
throw
std
::
out_of_range
(
"index is out of range"
);
...
...
@@ -461,8 +469,12 @@ void exposeCollisionGeometries ()
class_
<
BVHModelBase
,
bases
<
CollisionGeometry
>
,
BVHModelPtr_t
,
noncopyable
>
(
"BVHModelBase"
,
no_init
)
.
def
(
"vertice"
,
&
BVHModelBaseWrapper
::
vertice
,
bp
::
args
(
"self"
,
"index"
),
"Retrieve the vertex given by its index."
,
bp
::
return_internal_reference
<>
())
.
def
(
"vertices"
,
&
BVHModelBaseWrapper
::
vertices
,
bp
::
args
(
"self"
,
"index"
),
"Retrieve the vertex given by its index."
)
bp
::
args
(
"self"
),
"Retrieve the vertex given by its index."
,
bp
::
with_custodian_and_ward_postcall
<
0
,
1
>
())
.
def
(
"tri_indices"
,
&
BVHModelBaseWrapper
::
tri_indices
,
bp
::
args
(
"self"
,
"index"
),
"Retrieve the triangle given by its index."
)
.
def_readonly
(
"num_vertices"
,
&
BVHModelBase
::
num_vertices
)
...
...
src/BVH/BVH_model.cpp
View file @
a089b172
...
...
@@ -139,7 +139,7 @@ void BVHModelBase::buildConvexRepresentation(bool share_memory)
polygons
=
new
Triangle
[
num_tris
];
memcpy
(
polygons
,
tri_indices
,
sizeof
(
Triangle
)
*
(
size_t
)
num_tris
);
}
convex
.
reset
(
new
Convex
<
Triangle
>
(
!
share_memory
,
points
,
num_vertices
,
polygons
,
num_
vertice
s
));
convex
.
reset
(
new
Convex
<
Triangle
>
(
!
share_memory
,
points
,
num_vertices
,
polygons
,
num_
tri
s
));
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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