-
Notifications
You must be signed in to change notification settings - Fork 1
/
get_opt_paths.py
executable file
·51 lines (38 loc) · 1.49 KB
/
get_opt_paths.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env python3
"""
Changelog:
New is v1_0:
- Add script
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Author:
Sleiman Safaoui
Email:
sleiman.safaoui@utdallas.edu
Github:
@The-SS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Find the optimal path generated by RRT* and the shortened version of it (high-level wrapper of `script/opt_path.py`
Tested platform:
- Python 3.6.9 on Ubuntu 18.04 LTS (64 bit)
"""
import sys
sys.path.insert(0, 'scripts')
from scripts.opt_path import opt_and_short_traj
import os
import numpy as np
from rans_rrtstar import DR_RRTStar_Node
import config
SAVEPATH = config.SAVEPATH # path where RRT* data is located and where this data will be stored
#####################################################NodeListData_v1_0_1607441929##########################
###############################################################################
def main():
filename = "NodeListData_v2_0_1624832981" # name of RRT* pickle file to process
v_max = 0.5
omega_max = np.pi
num_states = 3
num_controls = 2
opt_and_short_traj(filename, SAVEPATH, v_max, omega_max, num_states, num_controls,
save_opt_path=True, plot_opt_path=True, save_opt_path_plot=True,
save_short_opt_path=True, plot_short_opt_path=True, save_short_opt_path_plot=True)
if __name__ == "__main__":
main()