using RobotNet10.Shared.Geometry; namespace RobotNet10.RobotApp.SLAM.Cartographer; /// /// Sensor configuration /// public class SensorConfiguration { /// /// Lidar sensor configurations (multiple lidars supported) /// public List Lidars { get; set; } = []; /// /// IMU sensor configuration (only one IMU supported by CartographerSharp) /// public ImuSensorConfiguration Imu { get; set; } = new(); /// /// Sampling ratio for sensor data (0.0 to 1.0) /// - 1.0 = process all messages (default) /// - 0.5 = process 50% of messages /// - 0.0 = process no messages /// Based on xloc flow: sampling ratio to reduce message overload /// public double? SamplingRatio { get; set; } /// /// Sampling ratio for Lidar data (overrides global SamplingRatio if set) /// public double? LidarSamplingRatio { get; set; } /// /// Sampling ratio for IMU data (overrides global SamplingRatio if set) /// public double? ImuSamplingRatio { get; set; } /// /// Sampling ratio for Odometry data (overrides global SamplingRatio if set) /// public double? OdometrySamplingRatio { get; set; } /// /// Odometry update interval in milliseconds. /// Odometry is polled at this interval from the odometry estimator. /// Default: 5ms (200Hz). Lower values = higher frequency, more CPU usage. /// Recommended: 5-20ms (50-200Hz) /// public int OdometryUpdateIntervalMs { get; set; } = 5; /// /// IMU update interval in milliseconds. /// IMU data is processed at this minimum interval (rate limiting). /// Default: 5ms (200Hz). Set to 0 to process all IMU events without rate limiting. /// Recommended: 0-10ms (100Hz-unlimited) /// public int ImuUpdateIntervalMs { get; set; } = 5; } /// /// Lidar sensor configuration /// public class LidarSensorConfiguration { /// /// Device ID from IDeviceProvider /// public string DeviceId { get; set; } = string.Empty; /// /// Enable or disable this lidar /// public bool Enabled { get; set; } = true; /// /// Transform from lidar frame to base_link frame /// public Transform Transform { get; set; } /// /// Minimum angle for filtering point cloud (degrees). /// Points with angle less than this will be filtered out. /// If null, no minimum angle filtering is applied. /// public double? AngleMin { get; set; } /// /// Maximum angle for filtering point cloud (degrees). /// Points with angle greater than this will be filtered out. /// If null, no maximum angle filtering is applied. /// public double? AngleMax { get; set; } } /// /// IMU sensor configuration /// public class ImuSensorConfiguration { /// /// Device ID from IDeviceProvider /// public string DeviceId { get; set; } = string.Empty; /// /// Enable or disable this IMU /// public bool Enabled { get; set; } = false; /// /// Transform from IMU frame to base_link frame /// public Transform Transform { get; set; } }