The util module

Numython R&D, (c) 2020 Moro is a Python library for kinematic and dynamic modeling of serial robots. This library has been designed, mainly, for academic and research purposes, using SymPy as base library.

moro.util.deg2rad(theta, evalf=True)[source]

Convert degrees to radians

Parameters
thetafloat, int, symbolic
Returns
theta_radsymbolic
moro.util.is_SE3(H)[source]

Check if H is a matrix of the SE(3) group.

moro.util.is_SO3(R)[source]

Check if R is a matrix of the SO(3) group.

Parameters
Rsympy.matrices.dense.MutableDenseMatrix
Returns
False or True
moro.util.is_position_vector(v)[source]

Check if v is a position vector (3-components)

moro.util.ishtm(H)[source]

Check if H a homogeneous transformation matrix.

moro.util.isorthonormal(R)[source]

Check if R is orthonormal

Parameters
Rsympy.matrices.dense.MutableDenseMatrix
Returns
False or True
moro.util.isrot(R)[source]

Is R a rotation matrix ?

Parameters
Rsympy.matrices.dense.MutableDenseMatrix
Returns
False or True
moro.util.issympyobject(obj)[source]

Determine if input (obj) is a sympy object.

Examples

>>> from sympy import symbols
>>> x = symbols("x")
>>> issympyobject(x)
True
moro.util.pprint(*args, **kwargs)[source]
moro.util.rad2deg(theta, evalf=True)[source]

Convert radians to degrees

Parameters
thetafloat, int, symbolic
Returns
theta_degsymbolic
moro.util.sympy2float(sympy_object)[source]

Convert a SymPy object to float object

moro.util.sympy_matrix_to_numpy_float(H)[source]

Convert SymPy Matrix (numerical) to NumPy array

Parameters
Hsympy.matrices.dense.MutableDenseMatrix
Returns
Hfarray
moro.util.vector_in_hcoords(v)[source]

Return vector v in homogeneous coordinates (adding one at the end).