matrix33

class samson.DataModel.Type.matrix33(*args, **kwargs)

Bases: pybind11_builtins.pybind11_object

This class represents 3x3 physical matrices.

SAMSON API: SBDTypePhysicalMatrix33

Overloaded function.

  1. __init__(self: samson.DataModel.Type.matrix33) -> None

Constructs a physical matrix with all components set to zero

  1. __init__(self: samson.DataModel.Type.matrix33, d: samson.DataModel.Type.vector3) -> None

Constructs the diagonal physical matrix with diagonal [ d.v[0] d.v[1] d.v[2] ]

  1. __init__(self: samson.DataModel.Type.matrix33, c0: samson.DataModel.Type.vector3, c1: samson.DataModel.Type.vector3, c2: samson.DataModel.Type.vector3) -> None

Constructs the physical matrix with columns c0, c1 and c2

  1. __init__(self: samson.DataModel.Type.matrix33, mat: List[List[samson.DataModel.Quantity.unitsSI]]) -> None

Constructs the physical matrix from the quantity 2D array mat

  1. __init__(self: samson.DataModel.Type.matrix33, v: samson.DataModel.Quantity.unitsSI) -> None

Constructs the physical matrix with all components set to v

  1. __init__(self: samson.DataModel.Type.matrix33, m00: samson.DataModel.Quantity.unitsSI, m01: samson.DataModel.Quantity.unitsSI, m02: samson.DataModel.Quantity.unitsSI, m10: samson.DataModel.Quantity.unitsSI, m11: samson.DataModel.Quantity.unitsSI, m12: samson.DataModel.Quantity.unitsSI, m20: samson.DataModel.Quantity.unitsSI, m21: samson.DataModel.Quantity.unitsSI, m22: samson.DataModel.Quantity.unitsSI) -> None

Constructs the physical matrix from components m00, m01, m02, m10, m11, m12, m20, m21 and m22

  1. __init__(self: samson.DataModel.Type.matrix33, d: float) -> None

Constructs the dimensionless physical matrix with all components set to d

  1. __init__(self: samson.DataModel.Type.matrix33, mat: List[List[float]]) -> None

Constructs the dimensionless physical matrix from double 2D array mat

  1. __init__(self: samson.DataModel.Type.matrix33, m00: float, m01: float, m02: float, m10: float, m11: float, m12: float, m20: float, m21: float, m22: float) -> None

Constructs the dimensionless physical matrix from components m00, m01, m02, m10, m11, m12, m20, m21 and m22

__add__(self: samson.DataModel.Type.matrix33, arg0: samson.DataModel.Type.matrix33) samson.DataModel.Type.matrix33
__eq__(self: samson.DataModel.Type.matrix33, arg0: samson.DataModel.Type.matrix33) bool
__iadd__(self: samson.DataModel.Type.matrix33, arg0: samson.DataModel.Type.matrix33) samson.DataModel.Type.matrix33
__imul__(*args, **kwargs)

Overloaded function.

  1. __imul__(self: samson.DataModel.Type.matrix33, arg0: float) -> samson.DataModel.Type.matrix33

  2. __imul__(self: samson.DataModel.Type.matrix33, arg0: samson.DataModel.Quantity.unitsSI) -> samson.DataModel.Type.matrix33

__isub__(self: samson.DataModel.Type.matrix33, arg0: samson.DataModel.Type.matrix33) samson.DataModel.Type.matrix33
__itruediv__(*args, **kwargs)

Overloaded function.

  1. __itruediv__(self: samson.DataModel.Type.matrix33, arg0: float) -> samson.DataModel.Type.matrix33

  2. __itruediv__(self: samson.DataModel.Type.matrix33, arg0: samson.DataModel.Quantity.unitsSI) -> samson.DataModel.Type.matrix33

__mul__(*args, **kwargs)

Overloaded function.

  1. __mul__(self: samson.DataModel.Type.matrix33, arg0: samson.DataModel.Type.matrix33) -> samson.DataModel.Type.matrix33

  2. __mul__(self: samson.DataModel.Type.matrix33, arg0: float) -> samson.DataModel.Type.matrix33

  3. __mul__(self: samson.DataModel.Type.matrix33, arg0: samson.DataModel.Type.vector3) -> samson.DataModel.Type.vector3

__ne__(self: samson.DataModel.Type.matrix33, arg0: samson.DataModel.Type.matrix33) bool
__neg__(self: samson.DataModel.Type.matrix33) samson.DataModel.Type.matrix33
__rmul__(self: samson.DataModel.Type.matrix33, arg0: float) samson.DataModel.Type.matrix33
__sub__(self: samson.DataModel.Type.matrix33, arg0: samson.DataModel.Type.matrix33) samson.DataModel.Type.matrix33
__truediv__(self: samson.DataModel.Type.matrix33, arg0: float) samson.DataModel.Type.matrix33
computeEulerDecompositionZYZ(self: samson.DataModel.Type.matrix33) List[samson.DataModel.Quantity.unitsSI]

Computes a ZYZ Euler decomposition of this physical matrix.

Return:

phi (Quantity): The first Z rotation angle. theta (Quantity): The Y rotation angle. psi (Quantity): The second Z rotation angle.

cosphi(self: samson.DataModel.Type.matrix33) samson.DataModel.Quantity.unitsSI

Returns the cosine of the rotation angle of this rotation matrix. This function assumes this physical matrix is a rotation matrix, and returns the cosine of the corresponding rotation angle

det(self: samson.DataModel.Type.matrix33) samson.DataModel.Quantity.unitsSI

Returns the determinant of this physical matrix

diagonalize(self: samson.DataModel.Type.matrix33) object

Computes the eigenvalues ev and the eigenvectors p of this physical matrix.

Args:

ev (vector3): Stores the eigenvalues when this function returns p (matrix33): Stores the eigenvectors when this function returns

static fromAlignment(vectorFrom: samson.DataModel.Type.vector3, vectorTo: samson.DataModel.Type.vector3) samson.DataModel.Type.matrix33

Returns the dimensionless physical matrix that transforms vector vectorFrom into vector vectorTo. Precisely, left-multiplying vector vectorFrom by the resulting matrix produces vector vectorTo.

static fromAxisAngle(axis: samson.DataModel.Type.vector3, angle: samson.DataModel.Quantity.unitsSI) samson.DataModel.Type.matrix33

Returns the dimensionless physical matrix corresponding to rotation axis and rotation angle (in radians)

static fromAxisAnglePi(axis: samson.DataModel.Type.vector3) samson.DataModel.Type.matrix33

Returns the dimensionless physical matrix corresponding to rotation axis axis and a rotation angle equal to Pi

static fromQuaternion(w: samson.DataModel.Quantity.unitsSI, x: samson.DataModel.Quantity.unitsSI, y: samson.DataModel.Quantity.unitsSI, z: samson.DataModel.Quantity.unitsSI) samson.DataModel.Type.matrix33

Returns the dimensionless physical matrix corresponding to quaternion [ w x y z ]

getColumn(self: samson.DataModel.Type.matrix33, i: int) samson.DataModel.Type.vector3

Returns the i-th column of this physical matrix

getE1(self: samson.DataModel.Type.matrix33) samson.DataModel.Type.vector3

Returns the first column of this physical matrix

getE2(self: samson.DataModel.Type.matrix33) samson.DataModel.Type.vector3

Returns the second column of this physical matrix

getE3(self: samson.DataModel.Type.matrix33) samson.DataModel.Type.vector3

Returns the third column of this physical matrix

getRow(self: samson.DataModel.Type.matrix33, i: int) samson.DataModel.Type.vector3

Returns the i-th row of this physical matrix

inverse(self: samson.DataModel.Type.matrix33) samson.DataModel.Type.matrix33

Returns the inverse of this physical matrix. This function assumes the physical matrix is invertible and returns its inverse

makeEulerRotationZYZ(self: samson.DataModel.Type.matrix33, phi: samson.DataModel.Quantity.unitsSI, theta: samson.DataModel.Quantity.unitsSI, psi: samson.DataModel.Quantity.unitsSI) None

This function sets this physical matrix from ZYZ Euler angles phi, theta and psi.

Args:

phi (Quantity): The first Z rotation angle. theta (Quantity): The Y rotation angle. psi (Quantity): The second Z rotation angle.

norm(self: samson.DataModel.Type.matrix33) samson.DataModel.Quantity.unitsSI

Returns the 2-norm of this physical matrix

orthonormalize(self: samson.DataModel.Type.matrix33) None

Orthonormalizes this dimensionless physical matrix

quasiStaticUpdate(self: samson.DataModel.Type.matrix33, wx: samson.DataModel.Quantity.unitsSI, wy: samson.DataModel.Quantity.unitsSI, wz: samson.DataModel.Quantity.unitsSI) object

Performs a quasi-static update of this dimensionless physical matrix using the rotation vector [ wx wy wz ].

Args:

wx (Quantity): The first component of the rotation vector. wy (Quantity): The second component of the rotation vector. wz (Quantity): The third component of the rotation vector.

Return:

rotAngle (Quantity): The rotation angle rotAxis (vector3): The rotation axis rotA (matrix33): The rotation axis. rotB (matrix33): The rotation axis. rotC (matrix33): The rotation axis.

revoluteJointZAxisMatrix(self: samson.DataModel.Type.matrix33, axis: samson.DataModel.Type.vector3) None

Sets this physical matrix to an orthonormal matrix whose third column is axis

setE1(self: samson.DataModel.Type.matrix33, v: samson.DataModel.Type.vector3) None

Sets the first column of this physical matrix

setE2(self: samson.DataModel.Type.matrix33, v: samson.DataModel.Type.vector3) None

Sets the second column of this physical matrix

setE3(self: samson.DataModel.Type.matrix33, v: samson.DataModel.Type.vector3) None

Sets the third column of this physical matrix

setIdentity(self: samson.DataModel.Type.matrix33) None

Sets this physical matrix to the identity matrix

setZero(self: samson.DataModel.Type.matrix33) None

Sets this physical matrix to zero

str(self: samson.DataModel.Type.matrix33, fullName: bool = False) str

Converts the matrix to a string (with a full unit name when fullName is true)

swapColumns(self: samson.DataModel.Type.matrix33, i: int, j: int) None

Swaps columns i and j

swapRows(self: samson.DataModel.Type.matrix33, i: int, j: int) None

Swaps rows i and j

toQuaternion(self: samson.DataModel.Type.matrix33) List[samson.DataModel.Quantity.unitsSI]

Computes the quaternion [ w x y z ] corresponding to this physical matrix

toRotationVector(self: samson.DataModel.Type.matrix33) samson.DataModel.Type.vector3

Computes the rotation vector corresponding to this dimensionless physical matrix

trace(self: samson.DataModel.Type.matrix33) samson.DataModel.Quantity.unitsSI

Returns the trace m[0][0] + m[1][1] + m[2][2] of this physical matrix

transpose(self: samson.DataModel.Type.matrix33) samson.DataModel.Type.matrix33

Returns the transpose of this physical matrix

property value