예제 #1
0
        public Control(Robot R)
        {
            m_Robot = R;

            //Stop the updating of the fields
            updateFieldsTimer.Stop();

            InitializeComponent();
        }
예제 #2
0
        public RangeImageViewer(Robot Robot)
        {
            m_Robot = Robot;
            m_DrawStyle = DrawStyle.TrianglesColorByDistance;

            scanParams = new ScanParameters();
            // these should probably be read in from a file or something...
            scanParams.HRange = 0;
            scanParams.HRes = 0;
            scanParams.scanBottom = -45;
            scanParams.scanLines = 360;
            scanParams.scanRes = (float).25;
            InitializeComponent();
        }
예제 #3
0
파일: Main.cs 프로젝트: anareboucas/nanook
        public MainFrame(Robot R)
        {
            m_Robot = R;

              InitializeComponent();

              DeviceList L = Manager.GetDevices(DeviceType.Joystick, EnumDevicesFlags.AllDevices);
              L.MoveNext();
              if (L.Current == null)
              {
            JoystickControl.Enabled = false;
              }
              else
              {
            DeviceInstance DevInstance = (DeviceInstance)L.Current;

            m_JoystickDevice = new Device(DevInstance.InstanceGuid);
            m_JoystickDevice.SetCooperativeLevel(this, CooperativeLevelFlags.NonExclusive | CooperativeLevelFlags.Background);

            foreach (DeviceObjectInstance doi in m_JoystickDevice.Objects)
            {
              if ((doi.ObjectId & (int)DeviceObjectTypeFlags.Axis) != 0)
            m_JoystickDevice.Properties.SetRange(ParameterHow.ById, doi.ObjectId, new InputRange(-2550, 2550));
            }

            m_JoystickDevice.Properties.AxisModeAbsolute = true;
              }

              UpdateFields();

              FastRefreshTimer.Enabled = true;

              //m_ImageViewer = new ImageViewer();
              //m_ImageViewer.Show();

              //m_RangeImageViewer = new RangeImageViewer(m_Robot);
              //m_RangeImageViewer.Show();

              m_Control = new Control(m_Robot);
              m_Control.Show();

              //m_SphereRecognitionView = new SphereRecognitionView(m_Robot);
              //m_SphereRecognitionView.Show();

              //m_Navigation = new Navigation(m_Robot);
              //m_Navigation.Show();
        }
예제 #4
0
        public Control(Robot R)
        {
            m_Robot = R;

            InitializeComponent();

            //Stop the updating of the fields
            updateFieldsTimer.Stop();
            //statusTimer.Stop();

            //Prepare the delay for when we send the command,
            //but it takes a few seconds for the robot to start moving
            //So we dont want to check if its done until it actually starts moving
            movingTimer = new System.Windows.Forms.Timer();
            movingTimer.Interval = 500;
            movingTimer.Tick += new EventHandler(verifyMoving);

            //Fire up the drawing and all other 
            //things related to the Map/Path 
            //Autonomous Navigation
            initAutonomousNav();
        }
예제 #5
0
 public SphereRecognitionView(Robot R)
 {
     m_Robot = R;
     InitializeComponent();
 }
예제 #6
0
파일: Debug.cs 프로젝트: anareboucas/nanook
        public Debug(Robot Robot)
        {
            m_Robot = Robot;

              InitializeComponent();
        }
예제 #7
0
        /**
         * @brief Constructor.
         * @param R The robot to process
         */
        public Control(Robot R)
        {
            m_Robot = R;   //construtor

            InitializeComponent();

            /**
             * @brief Stop the updating of the fields
             */
            updateFieldsTimer.Stop();
            //statusTimer.Stop();

            /** @brief Prepare the delay for when we send the command,
            *but it takes a few seconds for the robot to start moving
            *That's why we dont want to check if its done until it actually starts moving
             */
            movingTimer = new System.Windows.Forms.Timer();
            movingTimer.Interval = 500;
            movingTimer.Tick += new EventHandler(verifyMoving);

            //Fire up the drawing and all other
            //things related to the Map/Path
            //Autonomous Navigation
            initAutonomousNav();

            /**
             * @brief Set up all LIDAR related stuff
             */
            initLidarScanning();
        }
예제 #8
0
        public Navigation(Robot R)
        {
            InitializeComponent();

            m_Robot = R;

            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);
            //---------------------
            //For RangeImage Viewer
            //---------------------
                    m_DrawStyle = DrawStyle.TrianglesColorByDistance;

                    scanParams = new ScanParameters();
                    // these should probably be read in from a file or something...
                    scanParams.HRange = 0;
                    scanParams.HRes = 0;
                    scanParams.scanBottom = -45;
                    scanParams.scanLines = 360;
                    scanParams.scanRes = (float).25;
                    //InitGraphics();

             InitializeComponent();
        }