Table of Contents

Struct DiffDrive

Namespace
Pamoja.Kit
Assembly
Pamoja.Kit.dll

Wheel speeds for a desired body motion, and the body motion measured wheel speeds make, for a robot that steers by spinning two wheels at different speeds.

public readonly record struct DiffDrive : IEquatable<DiffDrive>
Implements
Inherited Members

Constructors

DiffDrive(float)

Wheel speeds for a desired body motion, and the body motion measured wheel speeds make, for a robot that steers by spinning two wheels at different speeds.

public DiffDrive(float Track)

Parameters

Track float

The distance between the left and right wheels; its magnitude is used.

Properties

Track

The distance between the left and right wheels; its magnitude is used.

public float Track { get; init; }

Property Value

float

Methods

BodyMotion(float, float)

Returns the body motion measured wheel speeds make.

public (float Linear, float Angular) BodyMotion(float left, float right)

Parameters

left float

The left wheel speed.

right float

The right wheel speed.

Returns

(float Min, float Max)

The forward speed and turn rate; the turn rate is 0 for a drive with no track.

WheelSpeeds(float, float)

Returns the wheel speeds for a forward speed and a turn rate.

public (float Left, float Right) WheelSpeeds(float linear, float angular)

Parameters

linear float

The forward speed.

angular float

The turn rate, positive turning left.

Returns

(float Min, float Max)

The left and right wheel speeds.