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
7f26db05
Unverified
Commit
7f26db05
authored
Apr 19, 2021
by
Justin Carpentier
Committed by
GitHub
Apr 19, 2021
Browse files
Merge pull request #219 from jcarpent/devel
Assimp - remove useless LINES and POINTS when loading
parents
79aba69b
e59e54e0
Pipeline
#14093
passed with stage
in 48 minutes and 7 seconds
Changes
6
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
.github/workflows/macos-linux-conda.yml
0 → 100644
View file @
7f26db05
name
:
Build hpp-fcl for Mac OS X/Linux via Conda
on
:
[
push
,
pull_request
]
jobs
:
hpp-fcl-conda
:
name
:
hpp-fcl on ${{ matrix.os }} with Conda
runs-on
:
${{ matrix.os }}
strategy
:
fail-fast
:
false
matrix
:
os
:
[
"
ubuntu-latest"
,
"
macos-latest"
]
steps
:
-
uses
:
actions/checkout@v2
-
name
:
Checkout submodules
run
:
|
git submodule update --init
-
uses
:
conda-incubator/setup-miniconda@v2
with
:
activate-environment
:
hpp-fcl
auto-update-conda
:
true
environment-file
:
.github/workflows/conda/conda-env.yml
python-version
:
3.8
-
name
:
Install cmake and update conda
shell
:
bash -l {0}
run
:
|
conda activate hpp-fcl
conda install cmake -c main
conda install llvm-openmp -c conda-forge
-
name
:
Build hpp-fcl
shell
:
bash -l {0}
run
:
|
conda activate hpp-fcl
echo $CONDA_PREFIX
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$(which python3)
make -j2
make build_tests
export CTEST_OUTPUT_ON_FAILURE=1
make test
make install
-
name
:
Uninstall hpp-fcl
shell
:
bash -l {0}
run
:
|
cd build
make uninstall
cmake
@
3a52692a
Compare
f4997a81
...
3a52692a
Subproject commit
f4997a81cebfa2dfb69733bc088c55688965dfe8
Subproject commit
3a52692a40839b10f38352c1b06ccfebc0b53f36
include/hpp/fcl/mesh_loader/loader.h
View file @
7f26db05
...
...
@@ -93,7 +93,7 @@ namespace fcl {
};
typedef
std
::
map
<
Key
,
BVHModelPtr_t
>
Cache_t
;
const
Cache_t
cache
()
const
{
return
cache_
;
}
const
Cache_t
&
cache
()
const
{
return
cache_
;
}
private:
Cache_t
cache_
;
};
...
...
src/mesh_loader/assimp.cpp
View file @
7f26db05
/*
* Software License Agreement (BSD License)
*
* Copyright (c) 2019
,
CNRS - LAAS
* Copyright (c) 2019
-2021
CNRS - LAAS
, INRIA
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
...
...
@@ -75,6 +75,10 @@ Loader::Loader () : importer (new Assimp::Importer())
aiComponent_MATERIALS
|
aiComponent_NORMALS
);
// remove LINES and POINTS
importer
->
SetPropertyInteger
(
AI_CONFIG_PP_SBP_REMOVE
,
aiPrimitiveType_LINE
|
aiPrimitiveType_POINT
);
}
...
...
@@ -90,10 +94,7 @@ void Loader::load (const std::string & resource_path)
aiProcess_Triangulate
|
aiProcess_RemoveComponent
|
aiProcess_ImproveCacheLocality
|
// TODO: I (Joseph Mirabel) have no idea whether degenerated triangles are
// properly handled. Enabling aiProcess_FindDegenerates would throw an
// exception when that happens. Is it too conservative ?
// aiProcess_FindDegenerates |
aiProcess_FindDegenerates
|
aiProcess_JoinIdenticalVertices
);
...
...
@@ -159,15 +160,7 @@ unsigned recurseBuildMesh (
for
(
uint32_t
j
=
0
;
j
<
input_mesh
->
mNumFaces
;
j
++
)
{
aiFace
&
face
=
input_mesh
->
mFaces
[
j
];
if
(
face
.
mNumIndices
!=
3
)
{
std
::
stringstream
ss
;
ss
<<
"Mesh "
<<
input_mesh
->
mName
.
C_Str
()
<<
" has a face with "
<<
face
.
mNumIndices
<<
" vertices. This is not supported
\n
"
;
ss
<<
"Node name is: "
<<
node
->
mName
.
C_Str
()
<<
"
\n
"
;
ss
<<
"Mesh index: "
<<
i
<<
"
\n
"
;
ss
<<
"Face index: "
<<
j
<<
"
\n
"
;
throw
std
::
invalid_argument
(
ss
.
str
());
}
assert
(
face
.
mNumIndices
==
3
&&
"The size of the face is not valid."
);
tv
.
triangles_
.
push_back
(
fcl
::
Triangle
(
vertices_offset
+
face
.
mIndices
[
0
],
vertices_offset
+
face
.
mIndices
[
1
],
vertices_offset
+
face
.
mIndices
[
2
]));
...
...
test/bvh_models.cpp
View file @
7f26db05
...
...
@@ -377,3 +377,14 @@ BOOST_AUTO_TEST_CASE (gerard_bauzil)
testLoadGerardBauzil
<
kIOS
>
();
testLoadGerardBauzil
<
OBBRSS
>
();
}
BOOST_AUTO_TEST_CASE
(
load_illformated_mesh
)
{
boost
::
filesystem
::
path
path
(
TEST_RESOURCES_DIR
);
const
std
::
string
filename
=
(
path
/
"illformated_mesh.dae"
).
string
();
MeshLoader
loader
;
BOOST_CHECK_NO_THROW
(
loader
.
load
(
filename
));
}
test/fcl_resources/illformated_mesh.dae
0 → 100644
View file @
7f26db05
This diff is collapsed.
Click to expand it.
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