54 lines
2.1 KiB
C#
54 lines
2.1 KiB
C#
/*
|
|
* Copyright 2018 The Cartographer Authors
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace CartographerSharp.Models.Mapping;
|
|
|
|
/// <summary>
|
|
/// Protocol buffer representation of range data inserter options.
|
|
/// </summary>
|
|
public struct RangeDataInserterOptions
|
|
{
|
|
public enum RangeDataInserterType
|
|
{
|
|
InvalidInserter = 0,
|
|
ProbabilityGridInserter2D = 1,
|
|
TsdfInserter2D = 2
|
|
}
|
|
|
|
[JsonPropertyName("range_data_inserter_type")]
|
|
public RangeDataInserterType RangeDataInserterTypeValue { get; set; }
|
|
|
|
[JsonPropertyName("probability_grid_range_data_inserter_options_2d")]
|
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
public ProbabilityGridRangeDataInserterOptions2D? ProbabilityGridRangeDataInserterOptions2D { get; set; }
|
|
|
|
[JsonPropertyName("tsdf_range_data_inserter_options_2d")]
|
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
public TSDFRangeDataInserterOptions2D? TsdfRangeDataInserterOptions2D { get; set; }
|
|
|
|
public RangeDataInserterOptions(
|
|
RangeDataInserterType rangeDataInserterType,
|
|
ProbabilityGridRangeDataInserterOptions2D? probabilityGridRangeDataInserterOptions2D = null,
|
|
TSDFRangeDataInserterOptions2D? tsdfRangeDataInserterOptions2D = null)
|
|
{
|
|
RangeDataInserterTypeValue = rangeDataInserterType;
|
|
ProbabilityGridRangeDataInserterOptions2D = probabilityGridRangeDataInserterOptions2D;
|
|
TsdfRangeDataInserterOptions2D = tsdfRangeDataInserterOptions2D;
|
|
}
|
|
}
|