Skip to content

Commit

Permalink
added first test
Browse files Browse the repository at this point in the history
  • Loading branch information
mbwinkler committed Nov 5, 2024
1 parent b3f17d5 commit 186c178
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions weldx/tests/transformations/test_cs_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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."""
Expand Down

0 comments on commit 186c178

Please sign in to comment.