basic_robotics.general.faser_twist module
Model a Twist, a Screw representing a spatial velocity.
- class basic_robotics.general.faser_twist.Twist(twist_data, frame_applied=None)[source]
Bases:
ScrewModel a Twist.
A Twist is a Screw that represents an instantaneous spatial velocity (linear and angular), and can be converted to and from homogeneous transforms and se(3) matrix form.
- classmethod fromTM(twist_transform, frame_applied=None)[source]
Build a Twist from a homogeneous transform by taking its matrix logarithm.
- toTM()[source]
Convert this Twist to a homogeneous transform via the matrix exponential.
- Returns:
tm – Transform obtained by exponentiating this twist’s se(3) representation.
- twistMatrix()[source]
Build the 4x4 se(3) matrix representation of this twist.
- Returns:
np.ndarray[float] – 4x4 matrix with the skew-symmetric angular velocity in the upper-left 3x3 block and the linear velocity in the top of the last column.
- toScrew()[source]
Convert this Twist to its equivalent Screw axis representation.
Handles the pure-rotation case (zero linear component) by returning a Screw aligned with the angular velocity axis and infinite pitch, and otherwise derives the screw axis point from the normalized twist.
- Returns:
Screw – Screw axis (angular direction and axis point) equivalent to this twist.