basic_robotics.general.faser_wrench module

Model a wrench.

class basic_robotics.general.faser_wrench.Wrench(force: ndarray[float] = None, position_applied: tm = None, frame_applied: tm = None)[source]

Bases: Screw

Model a wrench.

Returns:

Wrench – the wrench to be modelled.

__init__(force: ndarray[float] = None, position_applied: tm = None, frame_applied: tm = None)[source]

Create a new Wrench.

Parameters:
  • force (np.ndarray[float]) – force vector (could be gravity * mass), units are N

  • position_applied (tm, optional) – If not specified, assumes acting on origin in frame applied

  • frame_applied (tm, optional) – If not specified, assumes origin.

getMoment() → ndarray[float][source]

Get the moment component of the wrench.

Returns:

np.ndarray[float] – moment of the wrench.

getForce() → ndarray[float][source]

Get the force component of the wrench.

Returns:

np.ndarray[float] – force component

changeFrame(new_frame: tm, old_frame: tm = None)[source]

Change a wrench from frame A to frame B.

Parameters:
  • new_frame (tm) – New base frame of reference.

  • old_frame (tm, optional) – Old base frame of reference.

MR 3.97 Fb = [Ad(T(a->b))]^T(Fa)

Returns:

Wrench – reference to self, for compatibility and code-golfing reasons.

copy()[source]

Get a copy of this Wrench.

Returns:

Wrench – Wrench copy