parameters: (result_directory)
return_statement: return load_kalibr_information_from_files(
          str(potential_camchains[0]), str(potential_imus[0])
      )
docstring: Detect and load kalibr results from a directory.
docstring_summary: Detect and load kalibr results from a directory.
docstring_tokens: Detect and load kalibr results from a directory .
function: def load_kalibr_information(result_directory):
      """Detect and load kalibr results from a directory."""
      result_path = pathlib.Path(result_directory)
      potential_camchains = list(result_path.glob("camchain-*imu*cam*.yaml"))
      potential_imus = list(result_path.glob("imu*.yaml"))
  
      if len(potential_camchains) == 0:
          raise RuntimeError("could not find camchain file")
  
      if len(potential_camchains) > 1:
          raise RuntimeError("too many camchain files present")
  
      if len(potential_imus) == 0:
          raise RuntimeError("could not find imu file")
  
      if len(potential_imus) > 1:
          raise RuntimeError("too many imu files present")
  
      return load_kalibr_information_from_files(
          str(potential_camchains[0]), str(potential_imus[0])
      )
function_tokens: def load_kalibr_information ( result_directory ) : result_path = pathlib . Path ( result_directory ) potential_camchains = list ( result_path . glob ( "camchain-*imu*cam*.yaml" ) ) potential_imus = list ( result_path . glob ( "imu*.yaml" ) ) if len ( potential_camchains ) == 0 : raise RuntimeError ( "could not find camchain file" ) if len ( potential_camchains ) > 1 : raise RuntimeError ( "too many camchain files present" ) if len ( potential_imus ) == 0 : raise RuntimeError ( "could not find imu file" ) if len ( potential_imus ) > 1 : raise RuntimeError ( "too many imu files present" ) return load_kalibr_information_from_files ( str ( potential_camchains [ 0 ] ) , str ( potential_imus [ 0 ] ) )