Initial commit

This commit is contained in:
2026-07-13 09:25:40 +07:00
parent c08ff54676
commit bccfb156d7
1938 changed files with 641646 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2016 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 map builder options.
/// </summary>
public struct MapBuilderOptions
{
[JsonPropertyName("use_trajectory_builder_2d")]
public bool UseTrajectoryBuilder2D { get; set; }
[JsonPropertyName("use_trajectory_builder_3d")]
public bool UseTrajectoryBuilder3D { get; set; }
/// <summary>
/// Number of threads to use for background computations.
/// </summary>
[JsonPropertyName("num_background_threads")]
public int NumBackgroundThreads { get; set; }
[JsonPropertyName("pose_graph_options")]
public PoseGraphOptions PoseGraphOptions { get; set; }
/// <summary>
/// Sort sensor input independently for each trajectory.
/// </summary>
[JsonPropertyName("collate_by_trajectory")]
public bool CollateByTrajectory { get; set; }
public MapBuilderOptions(
bool useTrajectoryBuilder2D = true,
bool useTrajectoryBuilder3D = false,
int numBackgroundThreads = 4,
PoseGraphOptions? poseGraphOptions = null,
bool collateByTrajectory = false)
{
UseTrajectoryBuilder2D = useTrajectoryBuilder2D;
UseTrajectoryBuilder3D = useTrajectoryBuilder3D;
NumBackgroundThreads = numBackgroundThreads;
PoseGraphOptions = poseGraphOptions ?? new PoseGraphOptions();
CollateByTrajectory = collateByTrajectory;
}
}