Beispiel #1
0
        private IEnvironmentInitializer CreateRelocalizationActiveInitializer(bool surfaceReconstructionActive, EnvironmentProfileType environmentProfileType)
        {
            switch (environmentProfileType)
            {
            case EnvironmentProfileType.DefaultProfile:
                return(CreateDefaultProfileInitializer(surfaceReconstructionActive));

            default:
                throw new Exception(string.Format("EnvironmentProfileType {0} is not supported.", environmentProfileType));
            }
        }
Beispiel #2
0
        /// <summary>
        /// Creates an <see cref="IEnvironmentInitializer"/> for the given environment selection result.
        /// </summary>
        /// <param name="slamRelocalizationActive">Whether the slam relocalization is active or not.</param>
        /// <param name="surfaceReconstructionActive">Whether the surface reconstruction is active or not.</param>
        /// <param name="environmentProfileType">The environment profile type.</param>
        /// <returns>The environment initializer for the given environment initializer type.</returns>
        internal IEnvironmentInitializer Create(bool slamRelocalizationActive, bool surfaceReconstructionActive, EnvironmentProfileType environmentProfileType)
        {
            if (_slamLocalizer == null)
            {
                return(CreateDefaultInitializer());
            }

            if (slamRelocalizationActive)
            {
                return(CreateRelocalizationActiveInitializer(surfaceReconstructionActive, environmentProfileType));
            }
            return(CreateRelocalizationInactiveInitializer(surfaceReconstructionActive));
        }