@@ -22,7 +22,9 @@ def __init__(self, state, title, size):
2222 self ._vert_sizer4 = wx .StaticBoxSizer (wx .VERTICAL , self )
2323 self ._vert_sizer5 = wx .StaticBoxSizer (wx .VERTICAL , self )
2424 self ._vert_sizer6 = wx .StaticBoxSizer (wx .VERTICAL , self )
25- self ._vert_sizer7 = wx .StaticBoxSizer (wx .VERTICAL , self )
25+
26+ self ._vert_sizer_pad1 = wx .StaticBoxSizer (wx .VERTICAL , self )
27+ self ._vert_sizer_pad2 = wx .StaticBoxSizer (wx .VERTICAL , self )
2628
2729 # buttons
2830 button_size = (120 , 25 )
@@ -41,23 +43,15 @@ def __init__(self, state, title, size):
4143 self ._button_add_wp = wx .Button (
4244 location_box , id = wx .ID_ANY , label = "Add Waypoint" , size = button_size
4345 )
46+
4447 # planning
4548 planning_box = self ._vert_sizer2 .GetStaticBox ()
4649 self ._button_run_planner = wx .Button (
4750 planning_box , id = wx .ID_ANY , label = "Run Planner" , size = button_size
4851 )
49- self ._button_gen_waypoints = wx .Button (
50- planning_box , id = wx .ID_ANY , label = "Gen Waypoints" , size = button_size
51- )
5252 self ._button_clear_path = wx .Button (
5353 planning_box , id = wx .ID_ANY , label = "Clear Path" , size = button_size
5454 )
55- self ._button_clear_waypoints = wx .Button (
56- planning_box , id = wx .ID_ANY , label = "Clear Waypoints" , size = button_size
57- )
58- self ._button_clear_all = wx .Button (
59- planning_box , id = wx .ID_ANY , label = "Clear All" , size = button_size
60- )
6155
6256 # navigation actions
6357 navigation_box = self ._vert_sizer3 .GetStaticBox ()
@@ -77,38 +71,45 @@ def __init__(self, state, title, size):
7771 navigation_box , id = wx .ID_ANY , label = "Return" , size = button_size
7872 )
7973
80- # terrain visualisation
81- terrain_box = self ._vert_sizer4 .GetStaticBox ()
74+ # visualisation
75+ visualisation_box = self ._vert_sizer4 .GetStaticBox ()
8276 self ._button_show_contours = wx .Button (
83- terrain_box , id = wx .ID_ANY , label = "Show Contours" , size = button_size
77+ visualisation_box , id = wx .ID_ANY , label = "Show Contours" , size = button_size
8478 )
8579 self ._button_hide_contours = wx .Button (
86- terrain_box , id = wx .ID_ANY , label = "Hide Contours" , size = button_size
80+ visualisation_box , id = wx .ID_ANY , label = "Hide Contours" , size = button_size
8781 )
88-
89- # planner boundary (map extents)
9082 self ._button_show_boundary = wx .Button (
91- terrain_box , id = wx .ID_ANY , label = "Show Boundary" , size = button_size
83+ visualisation_box , id = wx .ID_ANY , label = "Show Boundary" , size = button_size
9284 )
9385 self ._button_hide_boundary = wx .Button (
94- terrain_box , id = wx .ID_ANY , label = "Hide Boundary" , size = button_size
86+ visualisation_box , id = wx .ID_ANY , label = "Hide Boundary" , size = button_size
9587 )
9688 self ._button_move_boundary = wx .Button (
97- terrain_box , id = wx .ID_ANY , label = "Move Boundary" , size = button_size
89+ visualisation_box , id = wx .ID_ANY , label = "Move Boundary" , size = button_size
9890 )
9991
100- # setting entry boxes
101- settings_box = self ._vert_sizer5 .GetStaticBox ()
92+ # waypoint generation
93+ wp_gen_box = self ._vert_sizer5 .GetStaticBox ()
94+ self ._button_gen_waypoints = wx .Button (
95+ wp_gen_box , id = wx .ID_ANY , label = "Gen Waypoints" , size = button_size
96+ )
97+ self ._button_clear_waypoints = wx .Button (
98+ wp_gen_box , id = wx .ID_ANY , label = "Clear Waypoints" , size = button_size
99+ )
100+
101+ # settings
102+ settings_box = self ._vert_sizer6 .GetStaticBox ()
102103 self ._button_settings = wx .Button (
103104 settings_box , id = wx .ID_ANY , label = "Settings" , size = button_size
104105 )
105106
106107 # main panel horiz padding
107- horz_pad_1_box = self ._vert_sizer6 .GetStaticBox ()
108- self ._panel_horz_pad_1 = wx .Panel (horz_pad_1_box , id = wx .ID_ANY )
108+ horz_pad1_box = self ._vert_sizer_pad1 .GetStaticBox ()
109+ self ._panel_horz_pad1 = wx .Panel (horz_pad1_box , id = wx .ID_ANY )
109110
110- horz_pad_2_box = self ._vert_sizer7 .GetStaticBox ()
111- self ._panel_horz_pad_2 = wx .Panel (horz_pad_2_box , id = wx .ID_ANY )
111+ horz_pad2_box = self ._vert_sizer_pad2 .GetStaticBox ()
112+ self ._panel_horz_pad2 = wx .Panel (horz_pad2_box , id = wx .ID_ANY )
112113
113114 # disabled buttons - for future use
114115 self ._button_add_rally .Disable ()
@@ -127,12 +128,7 @@ def __init__(self, state, title, size):
127128
128129 # planning layout
129130 self ._vert_sizer2 .Add (self ._button_run_planner , proportion = 0 , flag = wx .EXPAND )
130- self ._vert_sizer2 .Add (self ._button_gen_waypoints , proportion = 0 , flag = wx .EXPAND )
131131 self ._vert_sizer2 .Add (self ._button_clear_path , proportion = 0 , flag = wx .EXPAND )
132- self ._vert_sizer2 .Add (
133- self ._button_clear_waypoints , proportion = 0 , flag = wx .EXPAND
134- )
135- self ._vert_sizer2 .Add (self ._button_clear_all , proportion = 0 , flag = wx .EXPAND )
136132
137133 # navigation layout
138134 self ._vert_sizer3 .Add (self ._button_hold , proportion = 0 , flag = wx .EXPAND )
@@ -148,20 +144,27 @@ def __init__(self, state, title, size):
148144 self ._vert_sizer4 .Add (self ._button_hide_boundary , proportion = 0 , flag = wx .EXPAND )
149145 self ._vert_sizer4 .Add (self ._button_move_boundary , proportion = 0 , flag = wx .EXPAND )
150146
147+ # waypoint generation layout
148+ self ._vert_sizer5 .Add (self ._button_gen_waypoints , proportion = 0 , flag = wx .EXPAND )
149+ self ._vert_sizer5 .Add (
150+ self ._button_clear_waypoints , proportion = 0 , flag = wx .EXPAND
151+ )
152+
151153 # settings layout
152- self ._vert_sizer5 .Add (self ._button_settings , proportion = 0 , flag = wx .EXPAND )
154+ self ._vert_sizer6 .Add (self ._button_settings , proportion = 0 , flag = wx .EXPAND )
153155
154156 # main panel
155157 self ._horz_sizer1 = wx .BoxSizer (wx .HORIZONTAL )
156158 self ._horz_sizer1 .Add (self ._vert_sizer1 , proportion = 0 , flag = wx .EXPAND )
157159 self ._horz_sizer1 .Add (self ._vert_sizer2 , proportion = 0 , flag = wx .EXPAND )
158160 self ._horz_sizer1 .Add (self ._vert_sizer3 , proportion = 0 , flag = wx .EXPAND )
159- self ._horz_sizer1 .Add (self ._vert_sizer6 , proportion = 1 , flag = wx .EXPAND )
161+ self ._horz_sizer1 .Add (self ._vert_sizer_pad1 , proportion = 1 , flag = wx .EXPAND )
160162
161163 self ._horz_sizer2 = wx .BoxSizer (wx .HORIZONTAL )
162164 self ._horz_sizer2 .Add (self ._vert_sizer4 , proportion = 0 , flag = wx .EXPAND )
163165 self ._horz_sizer2 .Add (self ._vert_sizer5 , proportion = 0 , flag = wx .EXPAND )
164- self ._horz_sizer2 .Add (self ._vert_sizer7 , proportion = 1 , flag = wx .EXPAND )
166+ self ._horz_sizer2 .Add (self ._vert_sizer6 , proportion = 0 , flag = wx .EXPAND )
167+ self ._horz_sizer2 .Add (self ._vert_sizer_pad2 , proportion = 1 , flag = wx .EXPAND )
165168
166169 # stack rows of buttons
167170 self ._vert_sizer0 = wx .BoxSizer (wx .VERTICAL )
@@ -176,14 +179,14 @@ def __init__(self, state, title, size):
176179 self .Bind (wx .EVT_BUTTON , self .on_add_wp_pushed , self ._button_add_wp )
177180
178181 self .Bind (wx .EVT_BUTTON , self .on_run_planner_pushed , self ._button_run_planner )
182+ self .Bind (wx .EVT_BUTTON , self .on_clear_path_pushed , self ._button_clear_path )
183+
179184 self .Bind (
180185 wx .EVT_BUTTON , self .on_gen_waypoints_pushed , self ._button_gen_waypoints
181186 )
182- self .Bind (wx .EVT_BUTTON , self .on_clear_path_pushed , self ._button_clear_path )
183187 self .Bind (
184188 wx .EVT_BUTTON , self .on_clear_waypoints_pushed , self ._button_clear_waypoints
185189 )
186- self .Bind (wx .EVT_BUTTON , self .on_clear_all_pushed , self ._button_clear_all )
187190
188191 self .Bind (wx .EVT_BUTTON , self .on_hold_pushed , self ._button_hold )
189192 self .Bind (wx .EVT_BUTTON , self .on_navigate_pushed , self ._button_navigate )
@@ -320,10 +323,6 @@ def on_clear_waypoints_pushed(self, event):
320323 msg = terrainnav_msgs .ClearWaypoints ()
321324 self ._state .ui_pipe_send .send (msg )
322325
323- def on_clear_all_pushed (self , event ):
324- msg = terrainnav_msgs .ClearAll ()
325- self ._state .ui_pipe_send .send (msg )
326-
327326 def on_settings_pushed (self , event ):
328327 msg = terrainnav_msgs .Settings ()
329328 self ._state .ui_pipe_send .send (msg )
0 commit comments