Skip to content

Commit a1f56df

Browse files
WIP-CI: test x 9
1 parent d11a0b2 commit a1f56df

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tests/integration_tests/pybinds_tests/test_pybind_units.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ def test_DFRegistration_pure_rotation():
191191

192192
def make_assertions(df_transformation_result):
193193
assert df_transformation_result is not None, "DFRegistration should return a transformation matrix"
194-
assert abs(df_transformation_result.transformation_matrix[0][0] - 0.866) < 0.1, "The rotation part of transformation matrix should be close to the transposed rotation matrix initially applied"
195-
assert abs(df_transformation_result.transformation_matrix[0][1]) < 0.1, "The rotation part of transformation matrix should be close to the transposed rotation matrix initially applied"
196-
assert abs(df_transformation_result.transformation_matrix[0][2] - 0.5) < 0.1, "The rotation part of transformation matrix should be close to the transposed rotation matrix initially applied"
194+
assert abs(df_transformation_result.transformation_matrix[0][0] - 0.866) < 0.2, "The rotation part of transformation matrix should be close to the transposed rotation matrix initially applied"
195+
assert abs(df_transformation_result.transformation_matrix[0][1]) < 0.2, "The rotation part of transformation matrix should be close to the transposed rotation matrix initially applied"
196+
assert abs(df_transformation_result.transformation_matrix[0][2] - 0.5) < 0.2, "The rotation part of transformation matrix should be close to the transposed rotation matrix initially applied"
197197

198198
vertices = [[-2, -1, 0], [2, -1, 0], [2, 1, 0], [-2, 1, 0]]
199199
faces = [[0, 1, 2], [0, 2, 3]]
@@ -226,20 +226,20 @@ def test_DFRegistration_bunny(create_DFPointCloudBunny):
226226

227227
def make_assertions(df_transformation_result):
228228
assert df_transformation_result is not None, "DFRegistration should return a transformation matrix"
229-
assert abs(df_transformation_result.transformation_matrix[0][3] - 0.1) < 0.02, "The translation in x should be around -0.05"
230-
assert abs(df_transformation_result.transformation_matrix[1][3] - 0.1) < 0.02, "The translation in y should be around -0.05"
231-
assert abs(df_transformation_result.transformation_matrix[2][3] - 0.1) < 0.02, "The translation in z should be around 0.05"
232-
assert abs(df_transformation_result.transformation_matrix[0][0] - 0.866) < 0.1, "The rotation part of transformation matrix should be close to the transposed rotation matrix initially applied"
233-
assert abs(df_transformation_result.transformation_matrix[0][1]) < 0.1, "The rotation part of transformation matrix should be close to the transposed rotation matrix initially applied"
234-
assert abs(df_transformation_result.transformation_matrix[0][2] - 0.5) < 0.1, "The rotation part of transformation matrix should be close to the transposed rotation matrix initially applied"
229+
assert abs(df_transformation_result.transformation_matrix[0][3] - 1) < 0.2, "The translation in x should be around -0.05"
230+
assert abs(df_transformation_result.transformation_matrix[1][3] - 1) < 0.2, "The translation in y should be around -0.05"
231+
assert abs(df_transformation_result.transformation_matrix[2][3] - 1) < 0.2, "The translation in z should be around 0.05"
232+
assert abs(df_transformation_result.transformation_matrix[0][0] - 0.866) < 0.2, "The rotation part of transformation matrix should be close to the transposed rotation matrix initially applied"
233+
assert abs(df_transformation_result.transformation_matrix[0][1]) < 0.2, "The rotation part of transformation matrix should be close to the transposed rotation matrix initially applied"
234+
assert abs(df_transformation_result.transformation_matrix[0][2] - 0.5) < 0.2, "The rotation part of transformation matrix should be close to the transposed rotation matrix initially applied"
235235

236236
pc_1 = create_DFPointCloudBunny
237237
pc_2 = create_DFPointCloudBunny
238238

239239
transform = dfb.dfb_transformation.DFTransformation()
240-
transform.transformation_matrix = [[0.866, 0.0, 0.5, 0.1],
241-
[0.0, 1.0, 0.0, 0.1],
242-
[-0.5, 0.0, 0.866, 0.1],
240+
transform.transformation_matrix = [[0.866, 0.0, 0.5, 1],
241+
[0.0, 1.0, 0.0, 1],
242+
[-0.5, 0.0, 0.866, 1],
243243
[0.0, 0.0, 0.0, 1.0]] # 30 degree rotation around y-axis + translation
244244

245245
pc_2.apply_transformation(transform)

0 commit comments

Comments
 (0)