public void mapUpdate(object state) { UpdaterInt d = new UpdaterInt(updateMapUpdatesLabel); this.Dispatcher.Invoke(d, ++updates); this.UpdateMap(tinySLAM.Map().map, (short)-1); }
public void Scan(object state) { UpdaterInt d = new UpdaterInt(updateIterationsLabel); this.Dispatcher.Invoke(d, tinySLAM.NumUpdates()); ts_scan_t scan = this.doScan(); ts_position_t position = new ts_position_t(); position.theta = (float)(actualPosition.angle * 180 / Math.PI); position.x = 1000 * actualPosition.x + SLAMAlgorithm.TS_MAP_SIZE / (SLAMAlgorithm.TS_MAP_SCALE * 2); position.y = 1000 * actualPosition.y + SLAMAlgorithm.TS_MAP_SIZE / (SLAMAlgorithm.TS_MAP_SCALE * 2); tinySLAM.NewScan(scan, position); }