Beispiel #1
0
        private void loadPathToolStripMenuItem_Click(object sender, EventArgs e)
        {
            openFileDialog1.DefaultExt = "Path";
            openFileDialog1.Filter = "Paths|*.Path";

            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                Path = Path.Read(openFileDialog1.FileName);
            }
        }
Beispiel #2
0
        public void initAutonomousNav()
        {
            if (m_Robot == null)
                m_Map = new Map(1024, 1024, 0.1f);
            else
                m_Map = m_Robot.Map;

            m_History = new List<PointF>();
            m_Scale = 0.05f;
            m_PathPen = new Pen(Color.Black, 2.0f);
            m_HistoryBrush = new SolidBrush(Color.Black);

            m_NoScanWaypointBrush = new SolidBrush(Color.Black);
            m_DirectionalScanWaypointBrush = new SolidBrush(Color.Green);
            m_FullScanWaypointBrush = new SolidBrush(Color.Blue);

            m_RobotBrush = new SolidBrush(Color.DarkGray);

            m_BlackPen = new Pen(Color.Black, 2.0f);
            m_Path = new Path();

            m_MinorGridPen = new Pen(Color.Silver, 1.0f);
            m_MinorGridPen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot;

            m_MajorGridPen = new Pen(Color.Black, 1.0f);
            m_MajorGridPen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;

            m_IndexToMove = -1;
            m_MovingPoint = false;

            UpdateMap();

            if (m_Robot != null)
                ScrollToPosition(m_Robot.Telemetry.Position);
        }