Initial commit
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
using RobotNet10.Shared.Geometry;
|
||||
|
||||
namespace RobotNet10.RobotApp.Motion;
|
||||
|
||||
/// <summary>
|
||||
/// Cấu hình cho một bánh xe trong DifferentialDrive
|
||||
/// </summary>
|
||||
public class WheelConfiguration
|
||||
{
|
||||
/// <summary>
|
||||
/// Device ID của servo điều khiển bánh xe này
|
||||
/// </summary>
|
||||
public string DeviceId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Vị trí bánh xe so với tâm robot (Pose: x, y, orientation)
|
||||
/// Đơn vị: mét
|
||||
/// </summary>
|
||||
public Pose Position { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Đường kính bánh xe (mét)
|
||||
/// </summary>
|
||||
public double WheelDiameter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Số xung encoder trên 1 vòng quay của bánh xe
|
||||
/// </summary>
|
||||
public int PulsesPerRevolution { get; set; }
|
||||
/// <summary>
|
||||
/// Polarity của encoder/motor:
|
||||
/// - false (default): Velocity dương → bánh xe roll forward theo roll direction của nó
|
||||
/// - true: Velocity dương → bánh xe roll backward (encoder/motor đấu ngược)
|
||||
/// </summary>
|
||||
public bool IsReversed { get; set; } = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cấu hình cho DifferentialDrive
|
||||
/// </summary>
|
||||
public class DifferentialDriveConfiguration
|
||||
{
|
||||
/// <summary>
|
||||
/// Cấu hình bánh xe trái
|
||||
/// </summary>
|
||||
public WheelConfiguration LeftWheel { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Cấu hình bánh xe phải
|
||||
/// </summary>
|
||||
public WheelConfiguration RightWheel { get; set; } = new();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user