MCPcopy Create free account
hub / github.com/SAMMiCA/ChangeSim / load_trajectory

Function load_trajectory

script/utils/trajectory.py:3–16  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

1
2
3def 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

Callers 1

__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected