Ejemplo n.º 1
1
        public SLAM(double mapWidth, double mapHeight, double cellSize, string port)
        {
            robot = new Robot ();
            map = new SlamMap (robot, mapWidth, mapHeight, cellSize);
            mapView = new MapView (map);

            ekfSlam = new EkfSlam (1); // 1 degree per scan.

            proxy = SerialProxy.GetInstance;
            proxy.Port = port;

            proxy.OdometryUpdated += new EventHandler<OdometryUpdateEventArgs> (SerialProxy_OdometryUpdate);
            proxy.Scanned += new EventHandler<ScanEventArgs> (SerialProxy_Scan);

            window = new MapWindow (mapView);

            window.DeleteEvent += delegate
            {
                proxy.Release ();
            };

            //AddSampleLandmarks ();
        }
Ejemplo n.º 2
0
        public SLAM(double mapWidth, double mapHeight, double cellSize, string port)
        {
            robot   = new Robot();
            map     = new SlamMap(robot, mapWidth, mapHeight, cellSize);
            mapView = new MapView(map);

            ekfSlam = new EkfSlam(1);              // 1 degree per scan.

            proxy      = SerialProxy.GetInstance;
            proxy.Port = port;

            proxy.OdometryUpdated += new EventHandler <OdometryUpdateEventArgs> (SerialProxy_OdometryUpdate);
            proxy.Scanned         += new EventHandler <ScanEventArgs> (SerialProxy_Scan);

            window = new MapWindow(mapView);

            window.DeleteEvent += delegate
            {
                proxy.Release();
            };

            //AddSampleLandmarks ();
        }