11from enum import IntEnum , auto
22
3- from .models import Pose
3+ from .models import Pose , Vertex
44
55
66class ConstructionAreaID (IntEnum ):
@@ -9,9 +9,13 @@ class ConstructionAreaID(IntEnum):
99 """
1010
1111 LocalBottomSmall = auto ()
12- LocalBottomLarge = auto ()
12+ LocalBottomLarge1 = auto ()
13+ LocalBottomLarge2 = auto ()
14+ LocalBottomLarge3 = auto ()
1315 OppositeBottomSmall = auto ()
14- OppositeCenterLarge = auto ()
16+ OppositeSideLarge1 = auto ()
17+ OppositeSideLarge2 = auto ()
18+ OppositeSideLarge3 = auto ()
1519
1620
1721class ConstructionArea (Pose ):
@@ -21,9 +25,9 @@ class ConstructionArea(Pose):
2125 """
2226
2327 id : ConstructionAreaID
24- length : float = 450
25- width : float
26- free_slots : float
28+ length : float
29+ width : float = 450
30+ tribune_level : int = 0
2731 enabled : bool = True
2832
2933
@@ -33,8 +37,7 @@ class ConstructionAreaSmall(ConstructionArea):
3337 Coordinates indicate the center of the tribune.
3438 """
3539
36- width : float = 150
37- free_slots : int = 1
40+ length : float = 150
3841
3942
4043class ConstructionAreaLarge (ConstructionArea ):
@@ -43,16 +46,19 @@ class ConstructionAreaLarge(ConstructionArea):
4346 Coordinates indicate the center of the tribune.
4447 """
4548
46- width : float = 450
47- free_slots : int = 3
49+ length : float = 450
4850
4951
5052# Default positions for blue camp
5153construction_area_positions : dict [ConstructionAreaID , Pose ] = {
52- ConstructionAreaID .LocalBottomSmall : Pose (x = - 925 , y = - 725 , O = 180 ),
53- ConstructionAreaID .LocalBottomLarge : Pose (x = - 755 , y = - 275 , O = 180 ),
54- ConstructionAreaID .OppositeBottomSmall : Pose (x = - 925 , y = 1275 , O = 180 ),
55- ConstructionAreaID .OppositeCenterLarge : Pose (x = - 125 , y = 1275 , O = 90 ),
54+ ConstructionAreaID .LocalBottomSmall : Pose (x = - 925 , y = - 725 , O = 0 ),
55+ ConstructionAreaID .LocalBottomLarge1 : Pose (x = - 925 , y = - 265 , O = 0 ),
56+ ConstructionAreaID .LocalBottomLarge2 : Pose (x = - 775 , y = - 265 , O = 0 ),
57+ ConstructionAreaID .LocalBottomLarge3 : Pose (x = - 625 , y = - 265 , O = 0 ),
58+ ConstructionAreaID .OppositeBottomSmall : Pose (x = - 925 , y = 1275 , O = 0 ),
59+ ConstructionAreaID .OppositeSideLarge1 : Pose (x = - 125 , y = 1425 , O = - 90 ),
60+ ConstructionAreaID .OppositeSideLarge2 : Pose (x = - 125 , y = 1275 , O = - 90 ),
61+ ConstructionAreaID .OppositeSideLarge3 : Pose (x = - 125 , y = 1155 , O = - 90 ),
5662}
5763
5864
@@ -63,6 +69,7 @@ class TribuneID(IntEnum):
6369
6470 LocalCenter = auto ()
6571 LocalTop = auto ()
72+ LocalTopTraining = auto ()
6673 LocalBottom = auto ()
6774 LocalTopSide = auto ()
6875 LocalBottomSide = auto ()
@@ -92,14 +99,42 @@ class Tribune(Pose):
9299
93100# Default positions for blue camp
94101tribune_positions : dict [TribuneID , Pose ] = {
95- TribuneID .LocalCenter : Pose (x = - 50 , y = - 400 , O = 0 ),
96- TribuneID .LocalTop : Pose (x = 725 , y = - 675 , O = 0 ),
97- TribuneID .LocalTopSide : Pose (x = 325 , y = - 1425 , O = - 90 ),
98- TribuneID .LocalBottomSide : Pose (x = - 600 , y = - 1425 , O = - 90 ),
99- TribuneID .LocalBottom : Pose (x = - 750 , y = - 725 , O = 180 ),
100- TribuneID .OppositeCenter : Pose (x = - 50 , y = 400 , O = 0 ),
101- # TribuneID.OppositeTop: Pose(x=725, y=675, O=0), # Included in a fixed obstacle
102- TribuneID .OppositeTopSide : Pose (x = 325 , y = 1425 , O = 90 ),
103- TribuneID .OppositeBottomSide : Pose (x = - 600 , y = 1425 , O = 90 ),
104- TribuneID .OppositeBottom : Pose (x = - 750 , y = 725 , O = 180 ),
102+ TribuneID .LocalCenter : Pose (x = - 50 , y = - 400 , O = 180 ),
103+ TribuneID .LocalTop : Pose (x = 725 , y = - 675 , O = 180 ),
104+ TribuneID .LocalTopTraining : Pose (x = - 50 , y = - 1100 , O = 180 ),
105+ TribuneID .LocalTopSide : Pose (x = 325 , y = - 1425 , O = 90 ),
106+ TribuneID .LocalBottomSide : Pose (x = - 600 , y = - 1425 , O = 90 ),
107+ TribuneID .LocalBottom : Pose (x = - 750 , y = - 725 , O = 0 ),
108+ TribuneID .OppositeCenter : Pose (x = - 50 , y = 400 , O = 180 ),
109+ # TribuneID.OppositeTop: Pose(x=725, y=675, O=180), # Included in a fixed obstacle
110+ TribuneID .OppositeTopSide : Pose (x = 325 , y = 1425 , O = - 90 ),
111+ TribuneID .OppositeBottomSide : Pose (x = - 600 , y = 1425 , O = - 90 ),
112+ TribuneID .OppositeBottom : Pose (x = - 750 , y = 725 , O = 0 ),
105113}
114+
115+
116+ class FixedObstacleID (IntEnum ):
117+ """
118+ Enum to identify fixed obstacles.
119+ """
120+
121+ Ramp = auto ()
122+ Scene = auto ()
123+ PitArea = auto ()
124+ PamiStartArea = auto ()
125+ Pami5Path = auto ()
126+ OpponentRamp = auto ()
127+ OpponentScene = auto ()
128+ OpponentPitArea = auto ()
129+ Backstage = auto ()
130+
131+
132+ class FixedObstacle (Vertex ):
133+ """
134+ Model for fixed obstacles.
135+ """
136+
137+ id : FixedObstacleID
138+ length : float
139+ width : float
140+ enabled : bool = True
0 commit comments