public Form1()
        {
            ModeCartTraining = ModeRSV2Training = false;
            ModeCartExecutingMetaNetwork = false;
            ModeCartMapping = ModeRSV2Browsing = false;
            ModeRsv2ExecutingMetaNetwork = false;

            InitializeComponent();
            server = new EZRoboNetDevice(1, EZRoboNetDevice.t_Node_Station);

            rnd = new Random((int)DateTime.Now.Ticks);
            SensorDataRequested = CameraFrameRequested = false;
            rsv2pass = cartpass = 0;

            robosapien = new RobosapienV2(server, 2, rnd);
            cart = new LMMobileRobot(server, 3, rnd);

            cartTrainingFSM = new CartTrainingFSM(cart);
            cartMNExecutingFSM = new CartMetaNetworkFSM(cart);
            rsv2MNExecutingFSM = new RSV2MetanetworkFSM(robosapien);

            // creating mapping and browsing FSMs
            mappingFSM = new MappingFSM(cart, 4, MappingFSM.orSOUTH, 1, 1);
            rsv2BrowsingFSM = new RSV2BrowsingFSM(mappingFSM, robosapien, 0, 1, RSV2BrowsingFSM.orSOUTH);

            rsv2TrainingFSM = new RSV2TrainingFSM(robosapien);

            timer1.Start();
            timer2.Start();

            comboBox1.SelectedIndex = 2;
            comboBox2.SelectedIndex = 2;
        }
 private void button131_Click(object sender, EventArgs e)
 {
     cartMNExecutingFSM = new CartMetaNetworkFSM(cart);
     ModeCartTraining = false;
     ModeCartMapping = false;
     ModeCartExecutingMetaNetwork = true;
 }