parameters: ()
return_statement: return wRc_values, i_iZj_list
docstring: Returns global rotations and unit translation directions between 8 cameras
      that lie on a circle and face the center. The poses of 8 cameras are obtained from SFMdata
      and the unit translations directions between some camera pairs are computed from their
      global translations.
docstring_summary: Returns global rotations and unit translation directions between 8 cameras
      that lie on a circle and face the center. The poses of 8 cameras are obtained from SFMdata
      and the unit translations directions between some camera pairs are computed from their
      global translations.
docstring_tokens: Returns global rotations and unit translation directions between 8 cameras that lie on a circle and face the center . The poses of 8 cameras are obtained from SFMdata and the unit translations directions between some camera pairs are computed from their global translations .
function: def get_data() -> Tuple[gtsam.Values, List[gtsam.BinaryMeasurementUnit3]]:
      """"Returns global rotations and unit translation directions between 8 cameras
      that lie on a circle and face the center. The poses of 8 cameras are obtained from SFMdata
      and the unit translations directions between some camera pairs are computed from their
      global translations. """
      fx, fy, s, u0, v0 = 50.0, 50.0, 0.0, 50.0, 50.0
      wTc_list = SFMdata.createPoses(gtsam.Cal3_S2(fx, fy, s, u0, v0))
      # Rotations of the cameras in the world frame.
      wRc_values = gtsam.Values()
      # Normalized translation directions from camera i to camera j
      # in the coordinate frame of camera i.
      i_iZj_list = []
      for i in range(0, len(wTc_list) - 2):
          # Add the rotation.
          wRi = wTc_list[i].rotation()
          wRc_values.insert(i, wRi)
          # Create unit translation measurements with next two poses.
          for j in range(i + 1, i + 3):
              # Compute the translation from pose i to pose j, in the world reference frame.
              w_itj = wTc_list[j].translation() - wTc_list[i].translation()
              # Obtain the translation in the camera i's reference frame.
              i_itj = wRi.unrotate(w_itj)
              # Compute the normalized unit translation direction.
              i_iZj = gtsam.Unit3(i_itj)
              i_iZj_list.append(gtsam.BinaryMeasurementUnit3(
                  i, j, i_iZj, gtsam.noiseModel.Isotropic.Sigma(3, 0.01)))
      # Add the last two rotations.
      wRc_values.insert(len(wTc_list) - 1, wTc_list[-1].rotation())
      wRc_values.insert(len(wTc_list) - 2, wTc_list[-2].rotation())
      return wRc_values, i_iZj_list
function_tokens: def get_data ( ) -> Tuple [ gtsam . Values , List [ gtsam . BinaryMeasurementUnit3 ] ] : fx , fy , s , u0 , v0 = 50.0 , 50.0 , 0.0 , 50.0 , 50.0 wTc_list = SFMdata . createPoses ( gtsam . Cal3_S2 ( fx , fy , s , u0 , v0 ) ) # Rotations of the cameras in the world frame. wRc_values = gtsam . Values ( ) # Normalized translation directions from camera i to camera j # in the coordinate frame of camera i. i_iZj_list = [ ] for i in range ( 0 , len ( wTc_list ) - 2 ) : # Add the rotation. wRi = wTc_list [ i ] . rotation ( ) wRc_values . insert ( i , wRi ) # Create unit translation measurements with next two poses. for j in range ( i + 1 , i + 3 ) : # Compute the translation from pose i to pose j, in the world reference frame. w_itj = wTc_list [ j ] . translation ( ) - wTc_list [ i ] . translation ( ) # Obtain the translation in the camera i's reference frame. i_itj = wRi . unrotate ( w_itj ) # Compute the normalized unit translation direction. i_iZj = gtsam . Unit3 ( i_itj ) i_iZj_list . append ( gtsam . BinaryMeasurementUnit3 ( i , j , i_iZj , gtsam . noiseModel . Isotropic . Sigma ( 3 , 0.01 ) ) ) # Add the last two rotations. wRc_values . insert ( len ( wTc_list ) - 1 , wTc_list [ - 1 ] . rotation ( ) ) wRc_values . insert ( len ( wTc_list ) - 2 , wTc_list [ - 2 ] . rotation ( ) ) return wRc_values , i_iZj_list