示例#1
0
        /// <summary>
        /// basic constructor
        /// </summary>
        public LidarOpenGlForm(int _bodyModelIndex)
        {
            InitializeComponent();

            // initialization graph
            this._graph = new FieldMap.Graph();
            this._graph.CreateGraph(zgc1);

            // initialization OpenGl variable
            this.bodyModelIndex = _bodyModelIndex;
            this._map           = new Body3DMap(_bodyModelIndex, false);

            this.loaded = false;
            this.transX = 0;
            this.transY = 0;
            this.transZ = 0;
            this.angle  = 0.0;

            //this.crop = new List<SickLidar.CartesianPoint>();
            cropPoints      = new Vector3[361 * 50000];
            groundPoints    = new Vector3[361 * 50000];
            edgePoints      = new Vector3[2 * 50000];
            idealPathPoints = new Vector3[2 * 50000];

            this.cropCnt      = 0;
            this.cropOffset   = 0;
            this.groundOffset = 0;
            //this.edgeOffset = 0;

            this.isManualControl = false;
        }
示例#2
0
        /// <summary>
        /// Connect Combine Body using RS-232C
        /// </summary>
        private void CombineBodyConnect()
        {
            if (this.BodyReadCheckBox.Checked == false)
            {
                this._bodySerialConnect = new CombineBody.SerialConnect(
                    this.BodyPortTxtBox.Text,
                    Convert.ToInt32(this.BodyBaudRateTxtBox.Text),
                    Convert.ToInt32(this.BodyDatabitsTxtBox.Text)
                    );

                if (this.BodySaveCheckBox.Checked == true)
                {
                    this._bodyFile = new CombineBody.File(
                        this.BodySaveCheckBox.Checked,
                        this.BodyReadCheckBox.Checked
                        );
                }
            }
            else
            {
                this._bodyFile = new CombineBody.File(
                    this.BodySaveCheckBox.Checked,
                    this.BodyReadCheckBox.Checked
                    );
            }

            if (this.BodyModelComboBox.SelectedIndex == 0)
            {
                this._vy50 = new CombineBody.Vy50();
            }

            if (this.BodyModelComboBox.SelectedIndex == 1)
            {
                this._vy446 = new CombineBody.Vy446();
            }

            if (this.BodyWgs84ToCartesianCheckBox.Checked == true)
            {
                this.offLineInit = false;
                this.offLineMapX = 0.0;
                this.offLineMapY = 0.0;

                this._cgps = new Cgps(5, 1);

                this._offLineGraph = new FieldMap.Graph();
                this._offLineGraph.CreateGraph(zg2);
            }
        }