66 GUILayout.BeginHorizontal();
72 if (GUILayout.Button(
"Remove from batch")) {
78 if (GUILayout.Button(
"Close window")) {
87 if (GUILayout.Button(
"Add to batch")) {
94 if (GUILayout.Button(
"Cancel")) {
101 GUILayout.Button(
"Simulation running!");
102 if (GUILayout.Button(
"Close")) {
108 GUILayout.EndHorizontal();
114 string robotName =
settings.robotName;
115 string environmentName =
settings.environmentName;
116 string navigationAssemblyName =
settings.navigationAssemblyName;
117 string numberOfTests =
settings.numberOfTests.ToString();
118 string testTime =
settings.maximumTestTime.ToString();
119 bool randomDest =
settings.randomizeDestination;
120 bool randomStart =
settings.randomizeOrigin;
121 bool repeatOnComplete =
settings.continueOnNavObjectiveComplete;
122 bool repeatOnStuck =
settings.continueOnRobotIsStuck;
127 GUILayout.Label(
settings.title +
"\n" +
136 GUILayout.BeginHorizontal();
137 GUILayout.Label(
"Title", GUILayout.Width(lw));
138 title = GUILayout.TextField(title);
139 GUILayout.EndHorizontal();
142 GUILayout.BeginHorizontal();
143 GUILayout.Label(
"Number of tests: ", GUILayout.Width(lw));
144 numberOfTests = GUILayout.TextField(numberOfTests);
145 GUILayout.EndHorizontal();
148 GUILayout.BeginHorizontal();
149 GUILayout.Label(
"Robot selection: ", GUILayout.Width(lw));
150 if (GUILayout.Button(robotName)) {
154 GUILayout.EndHorizontal();
157 GUILayout.BeginHorizontal();
158 GUILayout.Label(
"Environment selection: ", GUILayout.Width(lw));
159 if (GUILayout.Button(environmentName)) {
163 GUILayout.EndHorizontal();
166 GUILayout.BeginHorizontal();
167 GUILayout.Label(
"Algorithm selection: ", GUILayout.Width(lw));
168 if (GUILayout.Button(navigationAssemblyName)) {
172 GUILayout.EndHorizontal();
176 GUILayout.BeginHorizontal();
177 GUILayout.Label(
"Randomize Start: ", GUILayout.Width(lw));
178 randomStart = GUILayout.Toggle(randomStart,
"");
179 GUILayout.EndHorizontal();
182 GUILayout.BeginHorizontal();
183 GUILayout.Label(
"Randomize Destination: ", GUILayout.Width(lw));
184 randomDest = GUILayout.Toggle(randomDest,
"");
185 GUILayout.EndHorizontal();
190 GUILayout.BeginHorizontal();
191 GUILayout.Label(
"Time (s): " +
Simulation.
time.ToString(
"G2"), GUILayout.Width(lw));
192 testTime = GUILayout.TextField(testTime);
193 GUILayout.EndHorizontal();
197 GUILayout.BeginHorizontal();
198 GUILayout.Label(
"Maximum Simulation Time (s): ", GUILayout.Width(lw));
199 testTime = GUILayout.TextField(testTime);
200 GUILayout.EndHorizontal();
204 GUILayout.BeginHorizontal();
205 GUILayout.Label(
"Repeat on complete: " , GUILayout.Width(lw));
206 repeatOnComplete = GUILayout.Toggle(repeatOnComplete,
"");
207 GUILayout.EndHorizontal();
210 GUILayout.BeginHorizontal();
211 GUILayout.Label(
"Repeat on stuck: ", GUILayout.Width(lw));
212 repeatOnStuck = GUILayout.Toggle(repeatOnStuck,
"");
213 GUILayout.EndHorizontal();
218 if (title.Contains(c.ToString())) valid =
false;
224 settings.numberOfTests = Convert.ToInt32(numberOfTests);
227 Debug.Log(
"User should enter a number...");
233 settings.maximumTestTime = Convert.ToInt32(testTime);
236 Debug.Log(
"User should enter a number...");
242 settings.environmentName = environmentName;
243 settings.navigationAssemblyName = navigationAssemblyName;
244 settings.randomizeDestination = randomDest;
245 settings.randomizeOrigin = randomStart;
246 settings.continueOnNavObjectiveComplete = repeatOnComplete;
247 settings.continueOnRobotIsStuck = repeatOnStuck;
static List< Settings > batch
List of settings to iterate through in batch mode.
void NavListWindow(int windowID)
Navigation algorithm gallery window.
Simulation.Settings settings
Environment loader searches for and loads environment GameObjects from the Unity Resources folder...
static void SearchForPlugins()
Searchs for plugins in the INavigation directory (Strings.navigationPluginDirectory) Results are stor...
void RobotGalleryWindow(int windowID)
Robot gallery window.
Simulation.Settings _settings
Bot loader provides functions for finding and loading robots.
static char[] invalidFileNameChars
Gets the invalid file name chars.
This is a manager class used to overlook the running of a simulation.
void EnvironmentGalleryWindow(int windowID)
Environment gallery window.
static void SearchForRobots()
Searchs for robots.
static bool IsDigitsOnly(string str)
Determines if is digits only the specified str.
A utility class for strings used in this project.
static float time
Time (in seconds) since robot started searching for destination.
static void SearchForEnvironments()
Searchs for environments.
Stack< GUI.WindowFunction > _windows
Used to find and load INavigation implementations from .dll files.