skbot.transform.Rotation¶
- class skbot.transform.Rotation(u, v, *, axis=- 1)[source]¶
Planar rotation in N-D.
The plane of rotation is described by two vectors (u, v). The initial angle of rotation is twice the angle between u and v (measured from u to v) and can be modified by setting the angle explicitly, e.g.
link.angle = np.pi
. The angle is measured in radians.- Parameters
- uArrayLike
The first vector defining the plane of rotation. The angle is mesured from here.
- vArrayLike
The second vector defining the plane of rotation. The angle is measured to here, i.e., from u to v.
Notes
Implements __inverse_transform__.
If you wish to initialize a rotation that rotates u onto v, and both are of same length, you can use
tf.Rotation(u+v, v)
.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.
invert
()Return a new Link that is the inverse of this link.
transform
(x)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.
- add_inversebool
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