Transformations

compas_mrr.xforms.worldxy_to_robot_base_xform(robot_base_frame: Frame) Transformation[source]

Get transformation from WCS origin to RCS origin.

Parameters:

robot_base_frame – Robot base frame in WCS. The frame origin is the location of the RCS origo in WCS, the X axis and Y axis are the X and Y axes of the RCS in WCS.

compas_mrr.xforms.xform_to_xyz_quaternion(xform: Any) List[float][source]

Convert transformation to list of coords and quaternion values.

Parameters:

xform – Transformation to be converted. Can be given as Rhino.Geometry.Transform, compas.geometry.Transformation, numpy.ndarray, or list of list of float.

Return type:

X, Y, Z, QW, QX, QY, QZ values as a list.

>>> from compas.geometry import Frame, Rotation, Translation
>>> Tr = Translation.from_vector([100, 100, 100])
>>> R = Rotation.from_frame(Frame.worldYZ())
>>> T = Tr * R
>>> xform_to_xyz_quaternion(T)
[100.0, 100.0, 100.0, 0.5, 0.5, 0.5, 0.5]