code: def TrajStringToMatrix(traj_str):
      """convert traj_str into translation and rotation matrices
      Args:
          traj_str: A space-delimited file where each line represents a camera position at a particular timestamp.
          The file has seven columns:
          * Column 1: timestamp
          * Columns 2-4: rotation (axis-angle representation in radians)
          * Columns 5-7: translation (usually in meters)
  
      Returns:
          ts: translation matrix
          Rt: rotation matrix
      """
      # line=[float(x) for x in traj_str.split()]
      # ts = line[0];
      # R = cv2.Rodrigues(np.array(line[1:4]))[0];
      # t = np.array(line[4:7]);
      # Rt = np.concatenate((np.concatenate((R, t[:,np.newaxis]), axis=1), [[0.0,0.0,0.0,1.0]]), axis=0)
      tokens = traj_str.split()
      assert len(tokens) == 7
      ts = tokens[0]
      # Rotation in angle axis
      angle_axis = [
          float(tokens[1]),
          float(tokens[2]),
          float(tokens[3]),
      ]
      r_w_to_p = convert_angle_axis_to_matrix3(np.asarray(angle_axis))
      # Translation
      t_w_to_p = np.asarray(
          [float(tokens[4]), float(tokens[5]), float(tokens[6])]
      )
      extrinsics = np.eye(4, 4)
      extrinsics[:3, :3] = r_w_to_p
      extrinsics[:3, -1] = t_w_to_p
      Rt = np.linalg.inv(extrinsics)
      return (ts, Rt)
  
file_path: ARKitScenes/threedod/benchmark_scripts/utils/tenFpsDataLoader.py
imports: import copy
  import cv2
  import glob
  import json
  import numpy
  import os
  from .box_utils import compute_box_3d, boxes_to_corners_3d, get_size
  from .rotation import convert_angle_axis_to_matrix3
  from .taxonomy import class_names, ARKitDatasetConfig
label_desc: Use image node_id 1 for calling a global function with example usage: TrajStringToMatrix(traj_str) and returns: ts,  Rt