Package choreo.trajectory
Interface TrajectorySample<Self extends TrajectorySample<Self>>
- Type Parameters:
Self- Derived sample type.
- All Superinterfaces:
Interpolatable<Self>,StructSerializable,WPISerializable
- All Known Implementing Classes:
DifferentialSample,SwerveSample
public interface TrajectorySample<Self extends TrajectorySample<Self>>
extends Interpolatable<Self>, StructSerializable
The generic interface for a sample in a trajectory.
-
Method Summary
Modifier and TypeMethodDescriptionflipped()Returns this sample, mirrored across the field midline.Returns the field-relative chassis speeds of this sample.getPose()Returns the pose at this sample.doubleReturns the timestamp of this sample.offsetBy(double timestampOffset) Returns this sample, offset by the given timestamp.Methods inherited from interface edu.wpi.first.math.interpolation.Interpolatable
interpolate
-
Method Details
-
getTimestamp
double getTimestamp()Returns the timestamp of this sample.- Returns:
- the timestamp of this sample.
-
getPose
Returns the pose at this sample.- Returns:
- the pose at this sample.
-
getChassisSpeeds
Returns the field-relative chassis speeds of this sample.- Returns:
- the field-relative chassis speeds of this sample.
-
flipped
Returns this sample, mirrored across the field midline.- Returns:
- this sample, mirrored across the field midline.
-
offsetBy
Returns this sample, offset by the given timestamp.- Parameters:
timestampOffset- the offset to apply to the timestamp.- Returns:
- this sample, offset by the given timestamp.
-