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
Guilhem Saurel
hpp-fcl
Commits
68412e55
Commit
68412e55
authored
Jun 13, 2019
by
Florent Lamiraux
Committed by
Florent Lamiraux florent@laas.fr
Jun 13, 2019
Browse files
Add a test loading Gerard Bauzil environment and checking collision
- with a cylinder.
parent
2de14041
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
NEWS
View file @
68412e55
-*- outline -*-
* Fix a bug in assimp loading procedure.
New in 1.1.0
* Fix uninitialized closest points in capsulePlaneIntersect.
* Refactor sphereTriangleIntersect.
...
...
test/fcl_resources/staircases_koroibot_hr.dae
0 → 100644
View file @
68412e55
This diff is collapsed.
Click to expand it.
test/test_fcl_bvh_models.cpp
View file @
68412e55
...
...
@@ -43,6 +43,7 @@
#include
"fcl_resources/config.h"
#include
<hpp/fcl/collision.h>
#include
"hpp/fcl/BVH/BVH_model.h"
#include
"hpp/fcl/BVH/BVH_utility.h"
#include
"hpp/fcl/math/transform.h"
...
...
@@ -295,6 +296,31 @@ void testLoadPolyhedron ()
BOOST_CHECK_EQUAL
(
geom
,
geom2
);
}
template
<
class
BoundingVolume
>
void
testLoadGerardBauzil
()
{
boost
::
filesystem
::
path
path
(
TEST_RESOURCES_DIR
);
std
::
string
env
=
(
path
/
"staircases_koroibot_hr.dae"
).
string
();
typedef
BVHModel
<
BoundingVolume
>
Polyhedron_t
;
typedef
boost
::
shared_ptr
<
Polyhedron_t
>
PolyhedronPtr_t
;
PolyhedronPtr_t
P1
(
new
Polyhedron_t
),
P2
;
Vec3f
scale
;
scale
.
setConstant
(
1
);
loadPolyhedronFromResource
(
env
,
scale
,
P1
);
CollisionGeometryPtr_t
cylinder
(
new
Cylinder
(
.27
,
.27
));
Transform3f
pos
(
Vec3f
(
-
1.33
,
1.36
,
.14
));
CollisionObject
obj
(
cylinder
,
pos
);
CollisionObject
stairs
(
P1
);
CollisionRequest
request
;
CollisionResult
result
;
collide
(
&
stairs
,
&
obj
,
request
,
result
);
BOOST_CHECK
(
result
.
isCollision
());
}
BOOST_AUTO_TEST_CASE
(
load_polyhedron
)
{
testLoadPolyhedron
<
AABB
>
();
...
...
@@ -306,3 +332,11 @@ BOOST_AUTO_TEST_CASE(load_polyhedron)
testLoadPolyhedron
<
KDOP
<
18
>
>
();
testLoadPolyhedron
<
KDOP
<
24
>
>
();
}
BOOST_AUTO_TEST_CASE
(
gerard_bauzil
)
{
testLoadGerardBauzil
<
OBB
>
();
testLoadGerardBauzil
<
RSS
>
();
testLoadGerardBauzil
<
kIOS
>
();
testLoadGerardBauzil
<
OBBRSS
>
();
}
Write
Preview
Supports
Markdown
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