/// <summary> /// Constructor /// </summary> /// <param name="mapResolution"></param> /// <param name="mapSizeX"></param> /// <param name="mapSizeY"></param> /// <param name="startCoords"></param> /// <param name="multiResSize"></param> /// <param name="drawInterface"></param> /// <param name="debugInterface"></param> public HectorSLAMProcessor(float mapResolution, int mapSizeX, int mapSizeY, Vector2 startCoords, int multiResSize, IDrawInterface drawInterface = null, IHectorDebugInfo debugInterface = null) { this.drawInterface = drawInterface; this.debugInterface = debugInterface; MapRep = new MapRepMultiMap(mapResolution, mapSizeX, mapSizeY, multiResSize, startCoords, drawInterface, debugInterface); Reset(); MinDistanceDiffForMapUpdate = 0.4f * 1.0f; MinAngleDiffForMapUpdate = 0.13f * 1.0f; }
/// <summary> /// Constructor /// </summary> /// <param name="mapResolution">Meters per pixel</param> /// <param name="mapSize">Map size in pixels</param> /// <param name="startPose">Start pose (X and Y in meters, Z in degrees)</param> /// <param name="numDepth">Number of maps</param> /// <param name="numThreads">Number of processing threads</param> public HectorSLAMProcessor(float mapResolution, Point mapSize, Vector3 startPose, int numDepth, int numThreads, ILogger logger = null) { this.logger = logger; this.startPose = startPose; MapRep = new MapRepMultiMap(mapResolution, mapSize, numDepth, Vector2.Zero); scanMatcher = new ScanMatcher(numThreads, logger); // Set initial poses MatchPose = startPose; LastMapUpdatePose = new Vector3(float.MinValue, float.MinValue, float.MinValue); }