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, mirrored across the field midline.
    Returns the field-relative chassis speeds of this sample.
    Returns the pose at this sample.
    double
    Returns the timestamp of this sample.
    makeArray(int length)
    For internal use only.
    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

      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.
    • makeArray

      Self[] makeArray(int length)
      For internal use only.
      Parameters:
      length - the length of the array to create.
      Returns:
      the created array.