env.py 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. class Env:
  2. def __init__(self):
  3. self.x_range = (0, 50)
  4. self.y_range = (0, 30)
  5. self.obs_boundary = self.obs_boundary()
  6. self.obs_circle = self.obs_circle()
  7. self.obs_rectangle = self.obs_rectangle()
  8. @staticmethod
  9. def obs_boundary():
  10. obs_boundary = [
  11. (0, 0, 1, 30),
  12. (0, 30, 50, 1),
  13. (1, 0, 50, 1),
  14. (50, 1, 1, 30)
  15. # (20, 1, 1, 15),
  16. # (10, 15, 10, 1),
  17. # (30, 15, 1, 15),
  18. # (40, 1, 1, 15)
  19. ]
  20. return obs_boundary
  21. @staticmethod
  22. def obs_rectangle():
  23. obs_rectangle = [
  24. (13, 10, 5, 3),
  25. (18, 4, 5, 4),
  26. (22, 13, 6, 3),
  27. (33, 15, 5, 3),
  28. (42, 6, 5, 3)
  29. ]
  30. return obs_rectangle
  31. @staticmethod
  32. def obs_circle():
  33. obs_cir = [
  34. (5, 10, 3),
  35. (10, 22, 3.5),
  36. (21, 23, 3),
  37. (34, 9, 4),
  38. (37, 23, 3),
  39. (45, 20, 2)
  40. ]
  41. return obs_cir