# skbot.transform.Rotation2D¶

class skbot.transform.Rotation2D(angle, *, degrees=False, axis=- 1)[source]

Rotation in 2D.

A convenient way of initializing a rotation in 2D.

Parameters
angleArrayLike

The magnitude of the rotation.

degreesbool

If True, angle is assumed to be in degrees. Default is False.

axisint

The axis along which computation takes place. All other axes are considered batch dimensions.

Attributes

 `affine_matrix` The transformation matrix mapping the parent to the child frame. `angle` The magnitude of the rotation (in radians).

Method Summary

 `__call__`(parent[, child, add_inverse]) Add this link to the parent frame. Return a new Link that is the inverse of this link. Expresses the vector x (assumed to be given in the parent's frame) in the child's frame. Transform x (given in the child frame) into the parent frame.

Methods

__call__(parent, child=None, *, add_inverse=True)

Add this link to the parent frame.

Parameters
parentFrame

The Frame from which vectors originate.

childFrame

The Frame in which vectors are expressed after they were mapped by this link’s transform. If None, a new child will be created.

Also add the inverse link to the child if this Link is invertible. Defaults to `True`.

Returns
childFrame

The Frame in which vectors are expressed after they were mapped by this link’s transform.

Return type

`Frame`

invert()

Return a new Link that is the inverse of this link.

Return type

`Frame`

transform(x)

Expresses the vector x (assumed to be given in the parent’s frame) in the child’s frame.

Parameters
xArrayLike

The vector expressed in the parent’s frame

Returns
yArrayLike

The vector expressed in the child’s frame

Return type

`ndarray`

__inverse_transform__(x)

Transform x (given in the child frame) into the parent frame.

Parameters
xArrayLike

The vector expressed in the childs’s frame

Returns
yArrayLike

The vector expressed in the parents’s frame

Return type

`ndarray`