/// <summary> /// Connects to the Hokuyo sensor. /// </summary> public void Connect() { if (hokuyo != null) { Disconnect(); } hokuyo = new UrgCtrl.UrgCtrl(); try { hokuyo.Connect(comPort, baudRate); } catch (Exception e) { Logger.Log(e); } }