(time_file, traj_format="replica")
| 205 | |
| 206 | |
| 207 | def load_timestamps(time_file, traj_format="replica"): |
| 208 | if traj_format in ["tum", "tartanair"]: |
| 209 | with open(time_file, "r+") as f: |
| 210 | lines = f.readlines() |
| 211 | timestamps_mat = [ |
| 212 | float(x.split(" ")[0]) for x in lines if not x.startswith("#") |
| 213 | ] |
| 214 | return timestamps_mat |
| 215 | |
| 216 | |
| 217 | def make_traj(args) -> PoseTrajectory3D: |