(max_angle=math.pi)
return QuaternionFromAxisAngle(axis, angle)
Creates a random small rotation around a random axis.

  Generates a small rotation with the axis vector selected uniformly
  from the unit sphere and an angle selected from a uniform
  distribution over [0, max_angle].

  If the max_angle is not specified, the rotation should be selected
  uniformly over all possible rotation angles.

  Args:
    max_angle: The maximum angle of rotation (radians).

  Returns:
    A unit quaternion in a numpy array.
Creates a random small rotation around a random axis.
Creates a random small rotation around a random axis .
def QuaternionRandomRotation(max_angle=math.pi):
  """Creates a random small rotation around a random axis.

  Generates a small rotation with the axis vector selected uniformly
  from the unit sphere and an angle selected from a uniform
  distribution over [0, max_angle].

  If the max_angle is not specified, the rotation should be selected
  uniformly over all possible rotation angles.

  Args:
    max_angle: The maximum angle of rotation (radians).

  Returns:
    A unit quaternion in a numpy array.

  """

  angle = np.random.uniform(low=0, high=max_angle)
  axis = Vector3RandomUnit()
  return QuaternionFromAxisAngle(axis, angle)
def QuaternionRandomRotation ( max_angle = math . pi ) : angle = np . random . uniform ( low = 0 , high = max_angle ) axis = Vector3RandomUnit ( ) return QuaternionFromAxisAngle ( axis , angle )