Package edu.wpi.first.math.kinematics
Class MecanumDriveWheelPositions
java.lang.Object
edu.wpi.first.math.kinematics.MecanumDriveWheelPositions
- All Implemented Interfaces:
Interpolatable<MecanumDriveWheelPositions>
,ProtobufSerializable
,StructSerializable
,WPISerializable
public class MecanumDriveWheelPositions
extends Object
implements Interpolatable<MecanumDriveWheelPositions>, ProtobufSerializable, StructSerializable
Represents the wheel positions for a mecanum drive drivetrain.
-
Field Summary
FieldsModifier and TypeFieldDescriptiondouble
Distance measured by the front left wheel in meters.double
Distance measured by the front right wheel in meters.static final MecanumDriveWheelPositionsProto
MecanumDriveWheelPositions protobuf for serialization.double
Distance measured by the rear left wheel in meters.double
Distance measured by the rear right wheel in meters.static final MecanumDriveWheelPositionsStruct
MecanumDriveWheelPositions struct for serialization. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a MecanumDriveWheelPositions with zeros for all member fields.MecanumDriveWheelPositions
(double frontLeft, double frontRight, double rearLeft, double rearRight) Constructs a MecanumDriveWheelPositions.MecanumDriveWheelPositions
(Distance frontLeft, Distance frontRight, Distance rearLeft, Distance rearRight) Constructs a MecanumDriveWheelPositions. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
interpolate
(MecanumDriveWheelPositions endValue, double t) Return the interpolated value.toString()
-
Field Details
-
frontLeft
Distance measured by the front left wheel in meters. -
frontRight
Distance measured by the front right wheel in meters. -
rearLeft
Distance measured by the rear left wheel in meters. -
rearRight
Distance measured by the rear right wheel in meters. -
proto
MecanumDriveWheelPositions protobuf for serialization. -
struct
MecanumDriveWheelPositions struct for serialization.
-
-
Constructor Details
-
MecanumDriveWheelPositions
public MecanumDriveWheelPositions()Constructs a MecanumDriveWheelPositions with zeros for all member fields. -
MecanumDriveWheelPositions
public MecanumDriveWheelPositions(double frontLeft, double frontRight, double rearLeft, double rearRight) Constructs a MecanumDriveWheelPositions.- Parameters:
frontLeft
- Distance measured by the front left wheel in meters.frontRight
- Distance measured by the front right wheel in meters.rearLeft
- Distance measured by the rear left wheel in meters.rearRight
- Distance measured by the rear right wheel in meters.
-
MecanumDriveWheelPositions
public MecanumDriveWheelPositions(Distance frontLeft, Distance frontRight, Distance rearLeft, Distance rearRight) Constructs a MecanumDriveWheelPositions.- Parameters:
frontLeft
- Distance measured by the front left wheel in meters.frontRight
- Distance measured by the front right wheel in meters.rearLeft
- Distance measured by the rear left wheel in meters.rearRight
- Distance measured by the rear right wheel in meters.
-
-
Method Details
-
equals
-
hashCode
-
toString
-
interpolate
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<MecanumDriveWheelPositions>
- 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.
-