MCPcopy Create free account
hub / github.com/InternRobotics/G2VLM / save_trajectory_tum_format

Function save_trajectory_tum_format

eval_code/recons/relpose/evo_utils.py:432–441  ·  view source on GitHub ↗
(traj, filename, verbose=False)

Source from the content-addressed store, hash-verified

430
431
432def save_trajectory_tum_format(traj, filename, verbose=False):
433 traj = make_traj(traj)
434 tostr = lambda a: " ".join(map(str, a))
435 with Path(filename).open("w") as f:
436 for i in range(traj.num_poses):
437 f.write(
438 f"{traj.timestamps[i]} {tostr(traj.positions_xyz[i])} {tostr(traj.orientations_quat_wxyz[i][[0,1,2,3]])}\n"
439 )
440 if verbose:
441 print(f"Saved trajectory to {filename}")
442
443
444def extract_metrics(file_path):

Callers 1

save_tum_posesFunction · 0.85

Calls 3

make_trajFunction · 0.85
openMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected