parameters: (roll, pitch, yaw, name=None)
docstring: Gets a rotation matrix given roll, pitch, yaw.
  
    roll-pitch-yaw is z-y'-x'' intrinsic rotation which means we need to apply
    x(roll) rotation first, then y(pitch) rotation, then z(yaw) rotation.
  
    https://en.wikipedia.org/wiki/Euler_angles
    http://planning.cs.uiuc.edu/node102.html
  
    Args:
      roll : x-rotation in radians.
      pitch: y-rotation in radians. The shape must be the same as roll.
      yaw: z-rotation in radians. The shape must be the same as roll.
      name: the op name.
  
    Returns:
      A rotation tensor with the same data type of the input. Its shape is
        [input_shape_of_yaw, 3 ,3].
docstring_summary: Gets a rotation matrix given roll, pitch, yaw.
docstring_tokens: Gets a rotation matrix given roll pitch yaw .
function: def get_rotation_matrix(roll, pitch, yaw, name=None):
    """Gets a rotation matrix given roll, pitch, yaw.
  
    roll-pitch-yaw is z-y'-x'' intrinsic rotation which means we need to apply
    x(roll) rotation first, then y(pitch) rotation, then z(yaw) rotation.
  
    https://en.wikipedia.org/wiki/Euler_angles
    http://planning.cs.uiuc.edu/node102.html
  
    Args:
      roll : x-rotation in radians.
      pitch: y-rotation in radians. The shape must be the same as roll.
      yaw: z-rotation in radians. The shape must be the same as roll.
      name: the op name.
  
    Returns:
      A rotation tensor with the same data type of the input. Its shape is
        [input_shape_of_yaw, 3 ,3].
    """
    with tf.compat.v1.name_scope(name, 'GetRotationMatrix', [yaw, pitch, roll]):
      cos_roll = tf.cos(roll)
      sin_roll = tf.sin(roll)
      cos_yaw = tf.cos(yaw)
      sin_yaw = tf.sin(yaw)
      cos_pitch = tf.cos(pitch)
      sin_pitch = tf.sin(pitch)
  
      ones = tf.ones_like(yaw)
      zeros = tf.zeros_like(yaw)
  
      r_roll = tf.stack([
          tf.stack([ones, zeros, zeros], axis=-1),
          tf.stack([zeros, cos_roll, -1.0 * sin_roll], axis=-1),
          tf.stack([zeros, sin_roll, cos_roll], axis=-1),
      ],
                        axis=-2)
      r_pitch = tf.stack([
          tf.stack([cos_pitch, zeros, sin_pitch], axis=-1),
          tf.stack([zeros, ones, zeros], axis=-1),
          tf.stack([-1.0 * sin_pitch, zeros, cos_pitch], axis=-1),
      ],
                         axis=-2)
      r_yaw = tf.stack([
          tf.stack([cos_yaw, -1.0 * sin_yaw, zeros], axis=-1),
          tf.stack([sin_yaw, cos_yaw, zeros], axis=-1),
          tf.stack([zeros, zeros, ones], axis=-1),
      ],
                       axis=-2)
  
      return tf.matmul(r_yaw, tf.matmul(r_pitch, r_roll))
function_tokens: def get_rotation_matrix ( roll , pitch , yaw , name = None ) : with tf . compat . v1 . name_scope ( name , 'GetRotationMatrix' , [ yaw , pitch , roll ] ) : cos_roll = tf . cos ( roll ) sin_roll = tf . sin ( roll ) cos_yaw = tf . cos ( yaw ) sin_yaw = tf . sin ( yaw ) cos_pitch = tf . cos ( pitch ) sin_pitch = tf . sin ( pitch ) ones = tf . ones_like ( yaw ) zeros = tf . zeros_like ( yaw ) r_roll = tf . stack ( [ tf . stack ( [ ones , zeros , zeros ] , axis = - 1 ) , tf . stack ( [ zeros , cos_roll , - 1.0 * sin_roll ] , axis = - 1 ) , tf . stack ( [ zeros , sin_roll , cos_roll ] , axis = - 1 ) , ] , axis = - 2 ) r_pitch = tf . stack ( [ tf . stack ( [ cos_pitch , zeros , sin_pitch ] , axis = - 1 ) , tf . stack ( [ zeros , ones , zeros ] , axis = - 1 ) , tf . stack ( [ - 1.0 * sin_pitch , zeros , cos_pitch ] , axis = - 1 ) , ] , axis = - 2 ) r_yaw = tf . stack ( [ tf . stack ( [ cos_yaw , - 1.0 * sin_yaw , zeros ] , axis = - 1 ) , tf . stack ( [ sin_yaw , cos_yaw , zeros ] , axis = - 1 ) , tf . stack ( [ zeros , zeros , ones ] , axis = - 1 ) , ] , axis = - 2 ) return tf . matmul ( r_yaw , tf . matmul ( r_pitch , r_roll ) )