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 (); }
public MainClass(string port, int baudRate) { proxy = SerialProxy.GetInstance; proxy.Port = port; proxy.BaudRate = baudRate; robot = new Robot(); proxy.OdometryUpdated += new EventHandler <OdometryUpdateEventArgs> (SerialProxy_OdometryUpdate); proxy.Scanned += new EventHandler <ScanEventArgs> (SerialProxy_Scan); proxy.Start(); }
public MainClass(string port, int baudRate) { proxy = SerialProxy.GetInstance; proxy.Port = port; proxy.BaudRate = baudRate; robot = new Robot (); proxy.OdometryUpdated += new EventHandler<OdometryUpdateEventArgs> (SerialProxy_OdometryUpdate); proxy.Scanned += new EventHandler<ScanEventArgs> (SerialProxy_Scan); proxy.Start (); }
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 (); }
public static void Main(string[] args) { bool continueCommunication = true; string message; StringComparer stringComparer = StringComparer.OrdinalIgnoreCase; SerialProxy proxy = SerialProxy.GetInstance; Observer observer = new Observer(proxy); Console.WriteLine("Type QUIT to exit"); while (continueCommunication) { message = Console.ReadLine(); if (stringComparer.Equals("quit", message)) { continueCommunication = false; } } proxy.Release(); }
public Observer(SerialProxy serialProxy) { this.serialProxy = serialProxy; this.serialProxy.OdometryUpdated += new EventHandler <OdometryUpdateEventArgs> (SerialProxy_OdometryUpdate); this.serialProxy.Scanned += new EventHandler <ScanEventArgs> (SerialProxy_Scan); }