Example #1
0
        public static void Run(String experimentType)
        {
            //Process roboRealmProcess = Process.Start("C:\\Documents and Settings\\cs266\\Desktop\\FINAL FIXED RoboRealm\\RoboRealm.exe");
               // System.Threading.Thread.Sleep(2000);

            //Check the type of experiment and create that experiment object
            if (experimentType == "WalkStraight")
            {
                Console.WriteLine("Setting up Wii and Woi");
                WorldInputInterface wii = new VisionInputInterface();
                WorldOutputInterface woi = new RadioOutputInterface();

                WalkStraightExperiment exp = new WalkStraightExperiment(wii, woi);
                exp.SetupExperiment();
                exp.RunExperiment();
            }
            else if (experimentType == "RandomWalk")
            {
                Console.WriteLine("Setting up Wii and Woi");
                WorldInputInterface wii = new VisionInputInterface();
                WorldOutputInterface woi = new RadioOutputInterface();

                RandomWalkExperiment exp = new RandomWalkExperiment(wii, woi);
                exp.SetupExperiment();
                exp.RunExperiment();
            }
            else if (experimentType == "NodeCounting")
            {
                Console.WriteLine("Setting up Wii and Woi");
                WorldInputInterface wii = new VisionInputInterface();
                WorldOutputInterface woi = new RadioOutputInterface();

                NodeCountingExperiment exp = new NodeCountingExperiment(wii, woi);
                exp.SetupExperiment();
                exp.RunExperiment();
            }

            //roboRealmProcess.Close();
        }
Example #2
0
 public static void Run()
 {
     RadioOutputInterface radio = new RadioOutputInterface();
     radio.setupSerialPort();
 }