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 Type
    Method
    Description
    Returns this sample, flipped to the other alliance according to the symmetry of the field.
    Returns the field-relative chassis speeds of this sample.
    Returns the pose at this sample.
    double
    Returns the timestamp of this sample.
    Returns this sample, mirrored to the other alliance.
    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 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, flipped to the other alliance according to the symmetry of the field.
      Returns:
      this sample, flipped to the other alliance according to the symmetry of the field.
    • mirrorX

      Returns this sample, mirrored to the other alliance.
      Returns:
      this sample, mirrored to the other alliance.
    • mirrorY

      Returns this sample, mirrored left-to-right from the driver's perspective.
      Returns:
      this sample, mirrored left-to-right from the driver's perspective.
    • rotateAround

      Returns this sample, rotated 180 degrees around the field center.
      Returns:
      this sample, rotated 180 degrees around the field center.
    • offsetBy

      Self offsetBy(double timestampOffset)
      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.