-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProcessTrajectories.py
34 lines (24 loc) · 1.54 KB
/
ProcessTrajectories.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import argparse
from ProcessTrajectoriesUtils.TrajectoryProcessor import TrajectoryProcessor
def main(argv=None):
parser = argparse.ArgumentParser('process')
parser.add_argument('-s', '--source-dir', dest='source_dir', type=str,
required=True,
help='Directory holding the h5 or json files.')
parser.add_argument('-o', '--out-dir', dest='out_dir', type=str,
help='Where to store results. If omitted, results ' +
'will be stored into the source directory.')
parser.add_argument('-b', '--base-out-filename', dest='base_fileName', type=str,
help='The base name of all the output files.')
parser.add_argument('-n', '--number-of-steps-in-one-example', dest='number_of_steps', type=int,
help='The number of consecutive states that each example of made of.'+
'The number of written files is also determined by this number.')
parser.add_argument('-v', '--mixed-velocity', dest='mixed_vel', type=bool,
help='Should trajectories with different end-effector velocities be in the same output.')
parser.add_argument('-a', '--mixed-acceleration', dest='mixed_acc', type=bool,
help='Should trajectories with different end-effector accelerations be in the same output')
args = parser.parse_args(argv)
pre = TrajectoryProcessor(args)
pre._process_trajectories()
if __name__ == "__main__":
main()