basic_robotics.general.basic_helpers module

Subcomponent of faser_general, placed here to avoid circular imports.

basic_robotics.general.basic_helpers.TAAtoTM(taa_format: ndarray[float]) → ndarray[float][source]

Convert Translation Axis Angle to Transformation Matrix.

Parameters:

taa_format (np.ndarray[float]) – TAA representation of given transformation.

Returns:

transformation_matrix (np.ndarray[float]) – 4x4 transformation matrix representation

basic_robotics.general.basic_helpers.TMtoTAA(transformation_matrix: ndarray[float]) → ndarray[float][source]

Convert a 4x4 transformation matrix to TAA representation.

Parameters:

transformation_matrix (np.ndarray[float]) – transformation matrix to be converted

Returns:

TAA representation (np.ndarray[float])

basic_robotics.general.basic_helpers.localToGlobal(reference: tm, rel: tm) → tm[source]

Convert a transform in a local frame to the global frame.

Parameters:
  • reference (tm) – Transform of frame A to frame B

  • rel (tm) – Transform of object 1 in frame B

Returns:

tm – Transform of object 1 in frame A

basic_robotics.general.basic_helpers.globalToLocal(reference: tm, rel: tm) → tm[source]

Convert a transform in a global frame to a local frame.

Parameters:
  • reference (tm) – Transform of frame A to frame B

  • rel (tm) – Transform of object 1 in frame A

Returns:

tm – Transform of object 1 in frame B

basic_robotics.general.basic_helpers.deg2Rad(deg: float) → float[source]

Convert degrees to radians.

Parameters:

deg (float) – measure of angles in degrees

Returns:

float – measure of angles in radians

basic_robotics.general.basic_helpers.rad2Deg(rad: float) → float[source]

Convert radians to degrees.

Parameters:

rad (float) – measure of angles in radians

Returns:

float – measure of angles in degrees

basic_robotics.general.basic_helpers.angleMod(rad: float) → float[source]

Cut angles in radians such that they don’t exceed 2pi absolute.

Parameters:

rad (float) – angle or angles

Returns:

float – cut down angle or angles