Interface TrajectorySample<Self extends TrajectorySample<Self>>
- Type Parameters:
Self- Derived sample type.
- All Superinterfaces:
org.wpilib.math.interpolation.Interpolatable<Self>, org.wpilib.util.struct.StructSerializable, org.wpilib.util.WPISerializable
- All Known Implementing Classes:
DifferentialSample, SwerveSample
public interface TrajectorySample<Self extends TrajectorySample<Self>>
extends org.wpilib.math.interpolation.Interpolatable<Self>, org.wpilib.util.struct.StructSerializable
The generic interface for a sample in a trajectory.
-
Method Summary
Modifier and TypeMethodDescriptionflipped()Returns this sample, flipped to the other alliance according to the symmetry of the field.org.wpilib.math.kinematics.ChassisVelocitiesReturns the field-relative chassis speeds of this sample.org.wpilib.math.geometry.Pose2dgetPose()Returns the pose at this sample.doubleReturns the timestamp of this sample.mirrorX()Returns this sample, mirrored to the other alliance.mirrorY()Returns this sample, mirrored left-to-right from the driver's perspective.offsetBy(double timestampOffset) Returns this sample, offset by the given timestamp.Returns this sample, rotated 180 degrees around the field center.Methods inherited from interface org.wpilib.math.interpolation.Interpolatable
interpolate
-
Method Details
-
getTimestamp
-
getPose
org.wpilib.math.geometry.Pose2d getPose()Returns the pose at this sample.- Returns:
- the pose at this sample.
-
getChassisSpeeds
org.wpilib.math.kinematics.ChassisVelocities getChassisSpeeds()Returns the field-relative chassis speeds of this sample.- Returns:
- the field-relative chassis speeds of this sample.
-
flipped
-
mirrorX
-
mirrorY
-
rotateAround
Returns this sample, rotated 180 degrees around the field center.- Returns:
- this sample, rotated 180 degrees around the field center.
-
offsetBy
-