Example #1
0
        /// <summary>
        /// Auger mounted device connect method - hokuyo lidar sensor and 3D-Imager
        /// Revised 2013-10-16 by wonjae cho
        /// </summary>
        private void AugerConnect()
        {
            this._hokuyo_graph = new SickLidar.Graph();
            this._hokuyo_graph.CreateHokuyoGraph(zg4, "Hokuyo Lidar", "X(mm)", "Y(mm)");

            if (this.AugerReadCheckBox.Checked == false)
            {
                // lidar sensor connect
                if (this.AugerLidarCheckBox.Checked == true)
                {
                    this._hokuyo = new SickLidar.Hokuyo(this.AugerLidarComboBox.SelectedIndex, 19200);

                    // if hokuyo sensor connected then save data to txt file
                    if ((this.AugerSaveCheckBox.Checked == true) && (this._hokuyo.is_connected_sensor == true))
                    {
                        this._hokuyo_file = new SickLidar.File(this.AugerSaveCheckBox.Checked, this.AugerReadCheckBox.Checked);
                    }
                }
                else
                {
                }

                // 3d-imager sensor connect
                if (this.AugerDImagerCheckBox.Checked == true)
                {
                    this.Panasonic3DImagerConnect();

                    // if 3d-imager sensor connected then save data to mpeg format
                    if ((this.AugerSaveCheckBox.Checked == true) && (this.dImager_Driver == 0))
                    {
                        this.dImager_io = new MachineVision.File();
                        this.dImager_io.InitializeDImagerIO(this.AugerSaveCheckBox.Checked, this.AugerReadCheckBox.Checked, Convert.ToInt32(this.TimerIntervalTxtBox.Text));
                    }
                }
                else
                {
                }
            }
            else
            {
                if (this.AugerLidarCheckBox.Checked == true)
                {
                    this._hokuyo      = new SickLidar.Hokuyo();
                    this._hokuyo_file = new SickLidar.File(this.AugerSaveCheckBox.Checked, this.AugerReadCheckBox.Checked);
                }

                if (this.AugerDImagerCheckBox.Checked == true)
                {
                    this.dImager_io = new MachineVision.File();
                    this.dImager_io.InitializeDImagerIO(this.AugerSaveCheckBox.Checked, this.AugerReadCheckBox.Checked, Convert.ToInt32(this.TimerIntervalTxtBox.Text));
                }
            }

            // Auger OpenGL form
            if (this.AugerOpenGlCheckBox.Checked == true)
            {
                this.augerOpenGlForm = new AugerOpenGlForm(this.BodyModelComboBox.SelectedIndex, this.AugerReadCheckBox.Checked);
                this.augerOpenGlForm.Show();
            }
        }
Example #2
0
        /// <summary>
        /// Machine Vision Connect
        /// </summary>
        private void MachineVisionConnect()
        {
            this.mvFile = new MachineVision.File(
                this.VisionSaveCheckBox.Checked,
                this.VisionReadCheckBox.Checked,
                Convert.ToInt32(this.TimerIntervalTxtBox.Text)
                );

            // object detection
            if (this.VisionObjectDetectionCheckBox.Checked == true)
            {
                this.objectDetection = new Algorithm.ObjectDetection();
            }
        }