示例#1
0
        public static void Init()
        {
            _canServos = new CanServos(Connections.ConnectionCan);
            _buzzer    = new Buzzer(Connections.ConnectionCan);

            try
            {
                _lidarGround = new HokuyoRec(LidarID.Ground);

                if (Config.CurrentConfig.IsMiniRobot)
                {
                    _lidarAvoid = new Hokuyo(LidarID.Avoid, "COM3");
                }
                else
                {
                    _lidarAvoid = new Pepperl(IPAddress.Parse("10.1.0.50"));
                    ((Pepperl)_lidarAvoid).SetFrequency(PepperlFreq.Hz20);
                    ((Pepperl)_lidarAvoid).SetFilter(PepperlFilter.Average, 3);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("ERREUR INIT LIDAR : " + ex.Message);
            }
        }
示例#2
0
 public static void InitSimu()
 {
     _canServos   = new CanServos(Connections.ConnectionCan);
     _lidarGround = new LidarSimu();
     _lidarAvoid  = new LidarSimu();
 }