basic_robotics.general.faser_screw module
Model a Screw.
- class basic_robotics.general.faser_screw.Screw(data: ndarray[float] = array([[0.], [0.], [0.], [0.], [0.], [0.]]), frame_applied: tm = None)[source]
Bases:
objectModel a Screw.
Emulates a Screw based on content in Modern Robotics Chapter 3.
- Returns:
Screw – Screw object inheriting np ndarray functionality
- __init__(data: ndarray[float] = array([[0.], [0.], [0.], [0.], [0.], [0.]]), frame_applied: tm = None)[source]
Create a new Screw.
Emulates a Screw based on content in Modern Robotics Chapter 3.
- Parameters:
data (np.ndarray[Float]) – data representing a screw, of shape ((6,1))
frame_applied (tm, optional) – If not specified, assumes origin.
- flatten() ndarray[float][source]
Get a flattened representation of the screw.
- Returns:
flat_screw (np.ndarray[float]) – flattened screw.
- changeFrame(new_frame: tm, old_frame: tm = None) Screw[source]
Change a screw from one frame to another.
MR3.85 Sb = [Ad(T(b->a))](Sa)
- getData() ndarray[float][source]
Get the data of this Screw for raw computation.
- Returns:
data (np.ndarray[float]) – raw data of the Screw
- getPitch() float[source]
Get the pitch of a Screw.
Equal to magnitude of angular component / magnitude of linear component
- Returns:
pitch (float) – Screw pitch.
- cross(other_screw: Screw) Screw[source]
Return cross product of this screw and another screw.
Returns (Screw): New crossed screw
- dot(other_screw: Screw) Screw[source]
Return dot product of this screw and another screw.
Returns (Screw): New crossed screw