kitti_dataset_utils
Provides helper methods for loading and parsing KITTI data.
-
class
packnet_sfm.datasets.kitti_dataset_utils.OxtsData(packet, T_w_imu) Bases:
tuple-
property
T_w_imu Alias for field number 1
-
property
packet Alias for field number 0
-
property
-
class
packnet_sfm.datasets.kitti_dataset_utils.OxtsPacket(lat, lon, alt, roll, pitch, yaw, vn, ve, vf, vl, vu, ax, ay, az, af, al, au, wx, wy, wz, wf, wl, wu, pos_accuracy, vel_accuracy, navstat, numsats, posmode, velmode, orimode) Bases:
tuple-
property
af Alias for field number 14
-
property
al Alias for field number 15
-
property
alt Alias for field number 2
-
property
au Alias for field number 16
-
property
ax Alias for field number 11
-
property
ay Alias for field number 12
-
property
az Alias for field number 13
-
property
lat Alias for field number 0
-
property
lon Alias for field number 1
Alias for field number 25
-
property
numsats Alias for field number 26
-
property
orimode Alias for field number 29
-
property
pitch Alias for field number 4
-
property
pos_accuracy Alias for field number 23
-
property
posmode Alias for field number 27
-
property
roll Alias for field number 3
-
property
ve Alias for field number 7
-
property
vel_accuracy Alias for field number 24
-
property
velmode Alias for field number 28
-
property
vf Alias for field number 8
-
property
vl Alias for field number 9
-
property
vn Alias for field number 6
-
property
vu Alias for field number 10
-
property
wf Alias for field number 20
-
property
wl Alias for field number 21
-
property
wu Alias for field number 22
-
property
wx Alias for field number 17
-
property
wy Alias for field number 18
-
property
wz Alias for field number 19
-
property
yaw Alias for field number 5
-
property
-
packnet_sfm.datasets.kitti_dataset_utils.load_oxts_packets_and_poses(oxts_files)[source] Generator to read OXTS ground truth data. Poses are given in an East-North-Up coordinate system whose origin is the first GPS position.
- Parameters
oxts_files (list of str) – List of oxts files to read from
- Returns
oxts – List of oxts ground-truth data
- Return type
list of dict
-
packnet_sfm.datasets.kitti_dataset_utils.pose_from_oxts_packet(raw_data, scale)[source] Helper method to compute a SE(3) pose matrix from an OXTS packet
- Parameters
raw_data (dict) – Oxts data to read from
scale (float) – Oxts scale
- Returns
R (np.array [3,3]) – Rotation matrix
t (np.array [3]) – Translation vector
-
packnet_sfm.datasets.kitti_dataset_utils.read_calib_file(filepath)[source] Read in a calibration file and parse into a dictionary
- Parameters
filepath (str) – File path to read from
- Returns
calib – Dictionary with calibration values
- Return type
dict
-
packnet_sfm.datasets.kitti_dataset_utils.rotx(t)[source] Rotation about the x-axis
- Parameters
t (float) – Theta angle
- Returns
matrix – Rotation matrix
- Return type
np.array [3,3]
-
packnet_sfm.datasets.kitti_dataset_utils.roty(t)[source] Rotation about the y-axis
- Parameters
t (float) – Theta angle
- Returns
matrix – Rotation matrix
- Return type
np.array [3,3]
-
packnet_sfm.datasets.kitti_dataset_utils.rotz(t)[source] Rotation about the z-axis
- Parameters
t (float) – Theta angle
- Returns
matrix – Rotation matrix
- Return type
np.array [3,3]
-
packnet_sfm.datasets.kitti_dataset_utils.transform_from_rot_trans(R, t)[source] Transformation matrix from rotation matrix and translation vector.
- Parameters
R (np.array [3,3]) – Rotation matrix
t (np.array [3]) – translation vector
- Returns
matrix – Transformation matrix
- Return type
np.array [4,4]