Home | Trees | Indices | Help |
|
---|
|
Contains all about rotation matrices, quaternions, and various conversions.
conventions: q=( a + bi + cj + dk), with a>0
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
__package__ =
|
|
Returns a 2x2 rotation matrix. :param theta: :type theta: ``number`` :rtype: ``SO2`` |
:param R: :type R: ``SO2`` :rtype: ``float`` |
:param R: :type R: ``SO2`` :rtype: ``float`` |
This is the inverse of :py:func:`quaternion_from_axis_angle`. :param q: :type q: ``unit_quaternion`` :rtype: ``axis_angle_canonical`` |
Returns the *(axis,angle)* representation of a given rotation. There are a couple of symmetries: * By convention, the angle returned is nonnegative. * If the angle is 0, any axis will do. In that case, :py:func:`default_axis` will be returned. :param R: :type R: ``rotation_matrix`` :rtype: ``axis_angle_canonical`` |
Checks that the given value is a rotation matrix of arbitrary size. :param x: :type x: ``array[NxN],N>0`` |
Check that the argument is an orthogonal matrix. :param x: :type x: ``array[NxN],N>0`` |
Check that the argument is a skew-symmetric matrix. :param x: :type x: ``array[NxN]`` |
Returns the geodesic distance between two rotation matrices. It is computed as the angle of the rotation :math:`R_1^{*} R_2^{-1}``. :param R1: :type R1: ``rotation_matrix`` :param R2: :type R2: ``rotation_matrix`` :rtype: ``float,>=0,<=pi`` |
Maps a vector to a 3x3 skew symmetric matrix. :param v: :type v: ``array[3]`` :rtype: ``array[3x3],skew_symmetric`` |
:param omega: :type omega: ``number`` :rtype: ``so2`` |
The inverse of :py:func:`hat_map`. :param H: :type H: ``array[3x3],skew_symmetric`` :rtype: ``array[3]`` |
:param W: :type W: ``so2`` :rtype: ``float`` |
Computes a quaternion corresponding to the rotation of *angle* radians around the given *axis*. This is the inverse of :py:func:`axis_angle_from_quaternion`. :param angle: :type angle: ``float`` :param axis: :type axis: ``direction`` :rtype: ``unit_quaternion`` |
Converts a rotation matrix to a quaternion. This is the robust method mentioned on wikipedia: <http://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation> TODO: add the more robust method with 4x4 matrix and eigenvector :param R: :type R: ``rotation_matrix`` :rtype: ``unit_quaternion`` |
Generate a random quaternion. Uses the algorithm used in Kuffner, ICRA'04. :rtype: ``unit_quaternion`` |
Generate a random rotation matrix. This is a wrapper around :py:func:`random_quaternion`. :param ndim: :type ndim: ``2|3`` :rtype: ``array[2x2]|rotation_matrix`` |
Returns a 2x2 rotation matrix. :param theta: :type theta: ``number`` :rtype: ``SO2`` |
Returns a 2x2 rotation matrix. :param theta: :type theta: ``number`` :rtype: ``SO2`` |
Creates a rotation matrix from the axes. ``x_axis`` is the new direction of the (1,0,0) vector after this rotation. ``vector_on_xy_plane`` is a vector that must end up in the (x,y) plane after the rotation. That is, it holds that: :: R = rotation_from_axes_spec(x, v) dot(R,x) == [1,0,0] dot(R,v) == [?,?,0] TODO: add exception if vectors are too close. :param vector_on_xy_plane: :type vector_on_xy_plane: ``direction`` :param x_axis: :type x_axis: ``direction`` :rtype: ``rotation_matrix`` |
Computes the rotation matrix from the *(axis,angle)* representation using Rodriguez's formula. :param angle: :type angle: ``float`` :param axis: :type axis: ``direction`` :rtype: ``rotation_matrix`` |
Get the rotation from the *(axis,angle)* representation. This is an alternative to :py:func:`rotation_from_axis_angle` which goes through the quaternion representation instead of using Rodrigues' formula. :param angle: :type angle: ``float`` :param axis: :type axis: ``direction`` :rtype: ``rotation_matrix`` |
Converts a quaternion to a rotation matrix. :param x: :type x: ``unit_quaternion`` :rtype: ``rotation_matrix`` |
Returns a 3x3 rotation matrix corresponding to rotation around the *z* axis. :param theta: :type theta: ``number`` :rtype: ``SO3`` |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Feb 22 20:39:22 2012 | http://epydoc.sourceforge.net |