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,52 @@
/*
* 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;
using CartographerSharp.Models.Transform;
namespace CartographerSharp.Models.Mapping;
/// <summary>
/// Protocol buffer representation of trajectory data.
/// </summary>
public struct TrajectoryData
{
[JsonPropertyName("trajectory_id")]
public int TrajectoryId { get; set; }
[JsonPropertyName("gravity_constant")]
public double GravityConstant { get; set; }
[JsonPropertyName("imu_calibration")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Quaterniond? ImuCalibration { get; set; }
[JsonPropertyName("fixed_frame_origin_in_map")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Rigid3dProto? FixedFrameOriginInMap { get; set; }
public TrajectoryData(
int trajectoryId,
double gravityConstant = 9.8,
Quaterniond? imuCalibration = null,
Rigid3dProto? fixedFrameOriginInMap = null)
{
TrajectoryId = trajectoryId;
GravityConstant = gravityConstant;
ImuCalibration = imuCalibration;
FixedFrameOriginInMap = fixedFrameOriginInMap;
}
}