Update timestamps given a
(gt_file, traj_format, skip=0, stride=1)
| 193 | |
| 194 | |
| 195 | def update_timestamps(gt_file, traj_format, skip=0, stride=1): |
| 196 | """Update timestamps given a""" |
| 197 | if traj_format == "tum": |
| 198 | traj_t_map_file = gt_file.replace("groundtruth.txt", "rgb.txt") |
| 199 | timestamps = load_timestamps(traj_t_map_file, traj_format) |
| 200 | return timestamps[skip::stride] |
| 201 | elif traj_format == "tartanair": |
| 202 | traj_t_map_file = gt_file.replace("gt_pose.txt", "times.txt") |
| 203 | timestamps = load_timestamps(traj_t_map_file, traj_format) |
| 204 | return timestamps[skip::stride] |
| 205 | |
| 206 | |
| 207 | def load_timestamps(time_file, traj_format="replica"): |
nothing calls this directly
no test coverage detected