(path)
| 1 | |
| 2 | |
| 3 | def load_trajectory(path): |
| 4 | f = open(path,mode='r') |
| 5 | pose = {} |
| 6 | cnt=0 |
| 7 | while True: |
| 8 | cnt+=1 |
| 9 | line = f.readline().split(' ') |
| 10 | if cnt == 1: |
| 11 | continue |
| 12 | if line[0] != 'VERTEX_SE3:QUAT': |
| 13 | break |
| 14 | pose[int(line[1])] = [float(l) for l in line[2:]] |
| 15 | print('loading {}th pose'.format(cnt)) |
| 16 | return pose |