Struct Mecanum
A four-wheel mecanum base, which drives, strafes, and turns at once.
public readonly record struct Mecanum : IEquatable<Mecanum>
- Implements
- Inherited Members
Constructors
Mecanum(float, float)
A four-wheel mecanum base, which drives, strafes, and turns at once.
public Mecanum(float Wheelbase, float Track)
Parameters
WheelbasefloatThe front-to-rear distance between the axles; its magnitude is used.
TrackfloatThe left-to-right distance between the wheels; its magnitude is used.
Properties
Track
The left-to-right distance between the wheels; its magnitude is used.
public float Track { get; init; }
Property Value
Wheelbase
The front-to-rear distance between the axles; its magnitude is used.
public float Wheelbase { get; init; }
Property Value
Methods
BodyMotion(WheelSpeeds)
Returns the body twist measured wheel speeds make.
public Twist BodyMotion(WheelSpeeds wheels)
Parameters
wheelsWheelSpeedsThe four measured wheel speeds.
Returns
- Twist
The body twist; its yaw rate is 0 for a base with no size.
WheelSpeeds(Twist)
Returns the four wheel speeds for a body twist.
public WheelSpeeds WheelSpeeds(Twist twist)
Parameters
twistTwistThe body motion, using its forward, sideways, and yaw parts.
Returns
- WheelSpeeds
The four wheel speeds.