From 186c178a90a876a5330525b29416f22183ef1c82 Mon Sep 17 00:00:00 2001 From: Michael Winkler Date: Tue, 5 Nov 2024 18:48:53 +0100 Subject: [PATCH] added first test --- weldx/tests/transformations/test_cs_manager.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/weldx/tests/transformations/test_cs_manager.py b/weldx/tests/transformations/test_cs_manager.py index 768e16ada..8e4d47d9b 100644 --- a/weldx/tests/transformations/test_cs_manager.py +++ b/weldx/tests/transformations/test_cs_manager.py @@ -2749,6 +2749,10 @@ def test_coordinate_system_manager_create_coordinate_system(): orientations = np.matmul(rot_mat_x, rot_mat_y) coords = Q_([[1, 0, 0], [-1, 0, 2], [3, 5, 7], [-4, -5, -6]], "mm") + transformation_matrix = np.resize(np.identity(4), (4, 4, 4)) + transformation_matrix[:, :3, :3] = orientations + transformation_matrix[:, :3, :] = coords.m + csm = tf.CoordinateSystemManager("root") lcs_default = tf.LocalCoordinateSystem() @@ -2790,6 +2794,18 @@ def test_coordinate_system_manager_create_coordinate_system(): time=time, ) + # from homogeneous transformation --------------------- + csm.create_cs_from_homogenous_transformation( + "lcs_homogeneous_default", "root", transformation_matrix, coords.u, time + ) + check_coordinate_system( + csm.get_cs("lcs_homogeneous_default"), + orientations, + coords, + True, + time=time, + ) + def test_coordinate_system_manager_transform_data(): """Test the coordinate system managers transform_data function."""