Files
PathPlanning/Sampling_based_Planning/rrt_2D/env.py
T

46 lines
946 B
Python
Raw Normal View History

2020-06-24 13:00:25 -07:00
"""
Environment for rrt_2D
@author: huiming zhou
"""
2020-06-23 19:37:10 -07:00
class Env:
def __init__(self):
self.x_range = (0, 50)
self.y_range = (0, 30)
self.obs_boundary = self.obs_boundary()
self.obs_circle = self.obs_circle()
self.obs_rectangle = self.obs_rectangle()
@staticmethod
def obs_boundary():
obs_boundary = [
2020-06-24 19:41:29 -07:00
[0, 0, 1, 30],
[0, 30, 50, 1],
[1, 0, 50, 1],
[50, 1, 1, 30]
2020-06-23 19:37:10 -07:00
]
return obs_boundary
@staticmethod
def obs_rectangle():
obs_rectangle = [
2020-06-25 12:14:28 -07:00
[14, 12, 8, 2],
[18, 22, 8, 3],
[26, 7, 2, 12],
[32, 14, 10, 2]
2020-06-23 19:37:10 -07:00
]
return obs_rectangle
@staticmethod
def obs_circle():
obs_cir = [
2020-06-25 12:14:28 -07:00
[7, 12, 3],
[46, 20, 2],
[15, 5, 2],
[37, 7, 3],
[37, 23, 3]
2020-06-23 19:37:10 -07:00
]
2020-06-24 13:00:25 -07:00
return obs_cir