Package edu.wpi.first.math.kinematics
Class DifferentialDriveWheelPositions
java.lang.Object
edu.wpi.first.math.kinematics.DifferentialDriveWheelPositions
- All Implemented Interfaces:
Interpolatable<DifferentialDriveWheelPositions>
public class DifferentialDriveWheelPositions
extends Object
implements Interpolatable<DifferentialDriveWheelPositions>
Represents the wheel positions for a differential drive drivetrain.
-
Field Summary
Modifier and TypeFieldDescriptiondouble
Distance measured by the left side.static final DifferentialDriveWheelPositionsProto
DifferentialDriveWheelPositions struct for serialization.double
Distance measured by the right side.static final DifferentialDriveWheelPositionsStruct
DifferentialDriveWheelPositions struct for serialization. -
Constructor Summary
ConstructorDescriptionDifferentialDriveWheelPositions
(double leftMeters, double rightMeters) Constructs a DifferentialDriveWheelPositions.DifferentialDriveWheelPositions
(Distance left, Distance right) Constructs a DifferentialDriveWheelPositions. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
interpolate
(DifferentialDriveWheelPositions endValue, double t) Return the interpolated value.toString()
-
Field Details
-
leftMeters
Distance measured by the left side. -
rightMeters
Distance measured by the right side. -
struct
DifferentialDriveWheelPositions struct for serialization. -
proto
DifferentialDriveWheelPositions struct for serialization.
-
-
Constructor Details
-
DifferentialDriveWheelPositions
Constructs a DifferentialDriveWheelPositions.- Parameters:
leftMeters
- Distance measured by the left side.rightMeters
- Distance measured by the right side.
-
DifferentialDriveWheelPositions
Constructs a DifferentialDriveWheelPositions.- Parameters:
left
- Distance measured by the left side.right
- Distance measured by the right side.
-
-
Method Details
-
equals
-
hashCode
-
toString
-
interpolate
public DifferentialDriveWheelPositions interpolate(DifferentialDriveWheelPositions endValue, double t) Description copied from interface:Interpolatable
Return the interpolated value. This object is assumed to be the starting position, or lower bound.- Specified by:
interpolate
in interfaceInterpolatable<DifferentialDriveWheelPositions>
- Parameters:
endValue
- The upper bound, or end.t
- How far between the lower and upper bound we are. This should be bounded in [0, 1].- Returns:
- The interpolated value.
-