parameters: (imu_data_file: str)
return_statement: return imu_measurements
docstring: Helper to load the IMU data.
docstring_summary: Helper to load the IMU data.
docstring_tokens: Helper to load the IMU data .
function: def loadImuData(imu_data_file: str) -> List[ImuMeasurement]:
      """Helper to load the IMU data."""
      # Read IMU data
      # Time dt accelX accelY accelZ omegaX omegaY omegaZ
      imu_data_file = gtsam.findExampleDataFile(imu_data_file)
      imu_measurements = []
  
      print("-- Reading IMU measurements from file")
      with open(imu_data_file, encoding='UTF-8') as imu_data:
          data = imu_data.readlines()
          for i in range(1, len(data)):  # ignore the first line
              time, dt, acc_x, acc_y, acc_z, gyro_x, gyro_y, gyro_z = map(
                  float, data[i].split(' '))
              imu_measurement = ImuMeasurement(
                  time, dt, np.asarray([acc_x, acc_y, acc_z]),
                  np.asarray([gyro_x, gyro_y, gyro_z]))
              imu_measurements.append(imu_measurement)
  
      return imu_measurements
function_tokens: def loadImuData ( imu_data_file : str ) -> List [ ImuMeasurement ] : # Read IMU data # Time dt accelX accelY accelZ omegaX omegaY omegaZ imu_data_file = gtsam . findExampleDataFile ( imu_data_file ) imu_measurements = [ ] print ( "-- Reading IMU measurements from file" ) with open ( imu_data_file , encoding = 'UTF-8' ) as imu_data : data = imu_data . readlines ( ) for i in range ( 1 , len ( data ) ) : # ignore the first line time , dt , acc_x , acc_y , acc_z , gyro_x , gyro_y , gyro_z = map ( float , data [ i ] . split ( ' ' ) ) imu_measurement = ImuMeasurement ( time , dt , np . asarray ( [ acc_x , acc_y , acc_z ] ) , np . asarray ( [ gyro_x , gyro_y , gyro_z ] ) ) imu_measurements . append ( imu_measurement ) return imu_measurements