test
python_unit
api.py
Go to the documentation of this file.
1
import
unittest
2
from
test_case
import
TestCase
3
import
coal
4
5
import
numpy
as
np
6
7
8
class
TestMainAPI
(
TestCase
):
9
def
test_collision
(self):
10
capsule =
coal.Capsule
(1.0, 2.0)
11
M1 =
coal.Transform3s
()
12
M2 =
coal.Transform3s
(np.eye(3), np.array([3, 0, 0]))
13
14
req =
coal.CollisionRequest
()
15
res =
coal.CollisionResult
()
16
17
self.assertTrue(
not
coal.collide
(capsule, M1, capsule, M2, req, res))
18
19
def
test_distance
(self):
20
capsule =
coal.Capsule
(1.0, 2.0)
21
M1 =
coal.Transform3s
()
22
M2 =
coal.Transform3s
(np.eye(3), np.array([3, 0, 0]))
23
24
req =
coal.DistanceRequest
()
25
res =
coal.DistanceResult
()
26
27
self.assertTrue(
coal.distance
(capsule, M1, capsule, M2, req, res) > 0)
28
29
30
if
__name__ ==
"__main__"
:
31
unittest.main()
test_case.TestCase
Definition:
test_case.py:5
coal::Capsule
Capsule It is where is the distance between the point x and the capsule segment AB,...
Definition:
coal/shape/geometric_shapes.h:383
api.TestMainAPI
Definition:
api.py:8
coal::Transform3s
Simple transform class used locally by InterpMotion.
Definition:
coal/math/transform.h:55
coal::DistanceRequest
request to the distance computation
Definition:
coal/collision_data.h:985
coal::CollisionResult
collision result
Definition:
coal/collision_data.h:390
coal::CollisionRequest
request to the collision algorithm
Definition:
coal/collision_data.h:311
coal::DistanceResult
distance result
Definition:
coal/collision_data.h:1051
coal::distance
void distance(DistanceTraversalNodeBase *node, BVHFrontList *front_list, unsigned int qsize)
Definition:
collision_node.cpp:79
coal::collide
void collide(CollisionTraversalNodeBase *node, const CollisionRequest &request, CollisionResult &result, BVHFrontList *front_list, bool recursive)
Definition:
collision_node.cpp:62
api.TestMainAPI.test_distance
def test_distance(self)
Definition:
api.py:19
api.TestMainAPI.test_collision
def test_collision(self)
Definition:
api.py:9
hpp-fcl
Author(s):
autogenerated on Sat Nov 23 2024 03:44:57