50 lines
1.5 KiB
C#
50 lines
1.5 KiB
C#
using RobotNet10.Shared.Geometry;
|
|
|
|
namespace RobotNet10.RobotApp.Motion;
|
|
|
|
/// <summary>
|
|
/// Interface cho Odometry Estimator - tính toán tọa độ odometry từ vị trí các bánh xe
|
|
/// </summary>
|
|
public interface IOdometryEstimator
|
|
{
|
|
/// <summary>
|
|
/// Lấy pose hiện tại của robot (odometry)
|
|
/// </summary>
|
|
Pose CurrentPose { get; }
|
|
|
|
/// <summary>
|
|
/// Tần suất cập nhật odometry (Hz), dùng cho UI/telemetry tương thích ngược.
|
|
/// </summary>
|
|
double UpdateFrequency => 0;
|
|
|
|
/// <summary>
|
|
/// Reset odometry về vị trí ban đầu
|
|
/// </summary>
|
|
void Reset();
|
|
|
|
/// <summary>
|
|
/// Reset odometry về một pose cụ thể
|
|
/// </summary>
|
|
/// <param name="pose">Pose để reset về</param>
|
|
void Reset(Pose pose);
|
|
|
|
/// <summary>
|
|
/// Alias tương thích ngược cho các call site cũ.
|
|
/// </summary>
|
|
void ResetOdometry() => Reset();
|
|
|
|
/// <summary>
|
|
/// Alias tương thích ngược cho các call site cũ.
|
|
/// </summary>
|
|
/// <param name="pose">Pose để reset về</param>
|
|
void ResetOdometry(Pose pose) => Reset(pose);
|
|
|
|
/// <summary>
|
|
/// Cập nhật odometry từ vị trí encoder của các bánh xe
|
|
/// </summary>
|
|
/// <param name="leftWheelPosition">Vị trí encoder bánh trái (encoder counts)</param>
|
|
/// <param name="rightWheelPosition">Vị trí encoder bánh phải (encoder counts)</param>
|
|
void Update(int leftWheelPosition, int rightWheelPosition);
|
|
}
|
|
|