docstr: quaternion format (w, x, y, z)
docstr_tok: ["quaternion","format","(","w",",","x",",","y",",","z",")"]
code: def __init__(self, mat):
      """
      quaternion format (w, x, y, z)
      """
      assert isinstance(mat, np.ndarray)
      if mat.shape == (3, 3):
          id_mat = np.eye(4)
          id_mat[0:3, 0:3] = mat
          mat = id_mat
      assert mat.shape == (4, 4)
      mat[:3, 3] = 0
      self._rotation_matrix = mat
  
imports: import numpy
  from geometry import transformations
label_desc: Use image node_id 1 to create a new UnstableRotation object  with example: obj = UnstableRotation(mat)