Functions | |
def | angle_within_mod180 |
def | angle_within_plus_minus_90 |
returns equivalent angle in 1st or 4th quadrant. | |
def | composeHomogeneousTransform |
def | getDispSubMat |
def | getRotSubMat |
def | homogeneousToxyz |
def | invertHomogeneousTransform |
def | matrix_to_axis_angle |
convert rotation matrix to axis and angle. | |
def | matrix_to_quaternion |
def | quaternion_to_matrix |
convert a quaternion to a 3x3 rotation matrix. | |
def | rot_angle_direction |
compute rotation matrix from axis and angle. | |
def | rotX |
def | rotY |
def | rotZ |
def | Rx |
def | Ry |
def | Rz |
def | xyToHomogenous |
def | xyToxyz |
def | xyzToHomogenous |
def hrl_lib.transforms.angle_within_mod180 | ( | angle | ) |
angle in radians. returns angle within -pi and +pi
Definition at line 96 of file transforms.py.
def hrl_lib.transforms.angle_within_plus_minus_90 | ( | angle | ) |
returns equivalent angle in 1st or 4th quadrant.
angle | - in RADIANS |
Definition at line 110 of file transforms.py.
def hrl_lib.transforms.composeHomogeneousTransform | ( | rot, | |
disp | |||
) |
Composes homogeneous transform from rotation and disp
Definition at line 86 of file transforms.py.
def hrl_lib.transforms.getDispSubMat | ( | t | ) |
returns displacement submatrix from homogeneous transformation t
Definition at line 81 of file transforms.py.
def hrl_lib.transforms.getRotSubMat | ( | t | ) |
returns rotation submatrix from homogeneous transformation t
Definition at line 76 of file transforms.py.
def hrl_lib.transforms.homogeneousToxyz | ( | p | ) |
Definition at line 37 of file transforms.py.
Inverts homogeneous transform
Definition at line 64 of file transforms.py.
def hrl_lib.transforms.matrix_to_axis_angle | ( | rmat | ) |
convert rotation matrix to axis and angle.
rmat | - 3x3 np matrix. |
Definition at line 223 of file transforms.py.
Definition at line 215 of file transforms.py.
convert a quaternion to a 3x3 rotation matrix.
q | - quaternion (tf/transformation.py) (x,y,z,w) |
Definition at line 210 of file transforms.py.
def hrl_lib.transforms.rot_angle_direction | ( | angle, | |
direction | |||
) |
compute rotation matrix from axis and angle.
Example: a1 = rot_angle_direction(math.radians(30), np.matrix([0.,1.,0.]).T) a2 = Ry(math.radians(30)) np.allclose(a1.T, a2) # result is True.
angle | - angle in RADIANS |
direction | - 3x1 np matrix |
Definition at line 201 of file transforms.py.
def hrl_lib.transforms.rotX | ( | theta | ) |
returns Rotation matrix such that R*v -> v', v' is rotated about x axis through theta. theta is in radians. rotX = Rx'
Definition at line 155 of file transforms.py.
def hrl_lib.transforms.rotY | ( | theta | ) |
returns Rotation matrix such that R*v -> v', v' is rotated about y axis through theta_d. theta is in radians. rotY = Ry'
Definition at line 166 of file transforms.py.
def hrl_lib.transforms.rotZ | ( | theta | ) |
returns Rotation matrix such that R*v -> v', v' is rotated about z axis through theta_d. theta is in radians. rotZ = Rz'
Definition at line 177 of file transforms.py.
def hrl_lib.transforms.Rx | ( | theta | ) |
returns Rotation matrix which transforms from XYZ -> frame rotated by theta about the x-axis. 2 <--- Rx <--- 1 theta is in radians. Rx = rotX'
Definition at line 121 of file transforms.py.
def hrl_lib.transforms.Ry | ( | theta | ) |
returns Rotation matrix which transforms from XYZ -> frame rotated by theta about the y-axis. theta is in radians. Ry = rotY'
Definition at line 133 of file transforms.py.
def hrl_lib.transforms.Rz | ( | theta | ) |
returns Rotation matrix which transforms from XYZ -> frame rotated by theta about the z-axis. theta is in radians. Rz = rotZ'
Definition at line 144 of file transforms.py.
def hrl_lib.transforms.xyToHomogenous | ( | v | ) |
convert 2XN matrix to 4XN homogeneous
Definition at line 56 of file transforms.py.
def hrl_lib.transforms.xyToxyz | ( | v | ) |
convert 2XN matrix, to 3XN matrix in homogeneous coords
Definition at line 50 of file transforms.py.
def hrl_lib.transforms.xyzToHomogenous | ( | v, | |
floating_vector = False |
|||
) |
convert 3XN matrix, to 4XN matrix in homogeneous coords
Definition at line 40 of file transforms.py.