Files
PathPlanning/Sampling-based Planning/env.py
T

35 lines
756 B
Python
Raw Normal View History

2020-06-22 11:41:03 -07:00
class Env:
def __init__(self):
2020-06-22 22:53:28 -07:00
self.x_range = (0, 50)
self.y_range = (0, 30)
self.obs_boundary = self.obs_boundary()
self.obs = self.obs_circle()
2020-06-22 11:41:03 -07:00
2020-06-22 20:48:47 -07:00
@staticmethod
2020-06-22 22:53:28 -07:00
def obs_boundary():
obs_boundary = [
(0, 0, 1, 30),
(0, 30, 50, 1),
(1, 0, 50, 1),
(50, 1, 1, 30),
(20, 1, 1, 15),
(10, 15, 10, 1),
(30, 15, 1, 15),
(40, 1, 1, 15)
]
2020-06-22 20:48:47 -07:00
return obs_boundary
@staticmethod
def obs_circle():
obs_cir = [
2020-06-22 22:53:28 -07:00
(5, 10, 3),
(10, 22, 3.5),
(21, 23, 3),
(34, 9, 4),
(37, 23, 3),
(45, 20, 2)
2020-06-22 20:48:47 -07:00
]
2020-06-22 11:41:03 -07:00
2020-06-22 20:48:47 -07:00
return obs_cir