Visual Servoing Platform
version 3.7.0
Loading...
Searching...
No Matches
test_core_repr.py
1
35
36
import
visp
37
from
visp.core
import
ArrayDouble2D, RotationMatrix, Matrix, HomogeneousMatrix, PoseVector
38
39
import
numpy
as
np
40
import
pytest
41
42
def
test_array_operations
():
43
array1 = ArrayDouble2D(2, 2, 1)
44
array2 = ArrayDouble2D(2, 2, 1)
45
assert
array1 == array2
46
47
def
test_matrix_operations
():
48
m1 = Matrix(4, 4, 2.0)
49
m2 = Matrix(4, 4, 1.0)
50
m3 = Matrix(4, 4, 3.0)
51
m4 = Matrix(4, 4, 6 * 4)
52
53
assert
m1 + m2 == m3
54
assert
m3 - m1 == m2
55
assert
m1 * m3 == m4
56
assert
m2 * 2 == m1
57
58
def
test_rotation_repr_can_be_defined_by_hand
():
59
R = RotationMatrix()
test_core_repr.test_matrix_operations
test_matrix_operations()
Definition
test_core_repr.py:47
test_core_repr.test_rotation_repr_can_be_defined_by_hand
test_rotation_repr_can_be_defined_by_hand()
Definition
test_core_repr.py:58
test_core_repr.test_array_operations
test_array_operations()
Definition
test_core_repr.py:42
modules
python
test
test_core_repr.py
Generated by
1.15.0