Package edu.wpi.first.math.kinematics
Class DifferentialDriveWheelPositions
java.lang.Object
edu.wpi.first.math.kinematics.DifferentialDriveWheelPositions
- All Implemented Interfaces:
Interpolatable<DifferentialDriveWheelPositions>
,ProtobufSerializable
,StructSerializable
,WPISerializable
public class DifferentialDriveWheelPositions
extends Object
implements StructSerializable, ProtobufSerializable, Interpolatable<DifferentialDriveWheelPositions>
Represents the wheel positions for a differential drive drivetrain.
-
Field Summary
FieldsModifier and TypeFieldDescriptiondouble
Distance measured by the left side in meters.static final DifferentialDriveWheelPositionsProto
DifferentialDriveWheelPositions struct for serialization.double
Distance measured by the right side in meters.static final DifferentialDriveWheelPositionsStruct
DifferentialDriveWheelPositions struct for serialization. -
Constructor Summary
ConstructorsConstructorDescriptionDifferentialDriveWheelPositions
(double left, double right) 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
-
left
Distance measured by the left side in meters. -
right
Distance measured by the right side in meters. -
struct
DifferentialDriveWheelPositions struct for serialization. -
proto
DifferentialDriveWheelPositions struct for serialization.
-
-
Constructor Details
-
DifferentialDriveWheelPositions
Constructs a DifferentialDriveWheelPositions.- Parameters:
left
- Distance measured by the left side in meters.right
- Distance measured by the right side in meters.
-
DifferentialDriveWheelPositions
Constructs a DifferentialDriveWheelPositions.- Parameters:
left
- Distance measured by the left side in meters.right
- Distance measured by the right side in meters.
-
-
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.
-