-
Notifications
You must be signed in to change notification settings - Fork 0
/
Street_Scenario_Dubin.py
29 lines (22 loc) · 1.02 KB
/
Street_Scenario_Dubin.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
from bin.ObstacleCreator_class import ObstacleCreator
from bin.Scenario_class import Scenario
from bin.RRT import RRT
# Create obstacles
ObstacleCreator = ObstacleCreator()
ObstacleCreator.create_rectangle(10.5, 22.5, (0,0))
ObstacleCreator.create_rectangle(10.5, 25, (0,37))
ObstacleCreator.create_rectangle(20, 22.5, (25,0))
ObstacleCreator.create_rectangle(20, 25, (25,37))
obstacles = ObstacleCreator.return_obstacles()
start, start_yaw, goal, goal_yaw = (18, 5), 90, (52.5, 45), 90
TestScenario = Scenario("Street_Scenario", env_width=60, env_height=50, boundary_collision=False)
TestScenario.set_vehicle(1/4.39, width=2, length=4.5)
TestScenario.set_obstacles(obstacles)
TestScenario.set_start_goal(start, start_yaw, goal, goal_yaw)
Run = False
if Run:
RRT(20000, TestScenario, star=True, backwards=False, force_return_tree=True, step_size=20)
TestScenario.plot_scenario(plot_all_trees=True)
TestScenario.write_csv('Dubins')
#TestScenario.read_csv('Dubins_39.54_20k', set_path=True)
#TestScenario.plot_scenario()