Skip to content

Commit

Permalink
Add save_pose_and_time_txt
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel committed Feb 19, 2021
1 parent f2b8773 commit 63d4df2
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,31 @@ def save_pose_txt(args, name, pose):
fp.close()




def save_pose_and_times_txt(args, name, pose):
"""Save pose and time in two different txt files."""

time_file_path = os.path.join(args.dest, "times.txt")
pose_file_path = os.path.join(args.dest, "pose.txt")
fd = open(time_file_path, "a")
fp = open(pose_file_path, "a")
pose34 = pose[:3]
fd.write(name)
fd.write("\n")
fd.close()
line=""
for row in pose34:
line+=(" ".join(str(round(i, 10)) for i in row))
line+=(" ")
line=line[:-1]
line+=("\n")
fp.write(line)
# fp.write('\n')
fp.close()



def evaluate_pose(args):
"""Evaluate odometry on the KITTI dataset"""
orb_pose_dir = os.path.join(args.dest, "pose")
Expand Down

0 comments on commit 63d4df2

Please sign in to comment.