Class DifferentialSample

java.lang.Object
choreo.trajectory.DifferentialSample
All Implemented Interfaces:
TrajectorySample<DifferentialSample>, Interpolatable<DifferentialSample>, StructSerializable, WPISerializable

A single differential drive robot sample in a Trajectory.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final double
    The acceleration of the left side in m/s².
    final double
    The acceleration of the right side in m/s².
    final double
    The force of the left side in Newtons.
    final double
    The force of the right side in Newtons.
    final double
    The heading of the sample in radians, with 0 being in the +X direction.
    The struct for the DifferentialSample class.
    final double
    The timestamp of this sample relative to the beginning of the trajectory.
    final double
    The velocity of the left side in m/s.
    final double
    The velocity of the right side in m/s.
    final double
    The X position of the sample relative to the blue alliance wall origin in meters.
    final double
    The Y position of the sample relative to the blue alliance wall origin in meters.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DifferentialSample(double timestamp, double x, double y, double heading, double vl, double vr, double al, double ar, double fl, double fr)
    Constructs a DifferentialSample with the specified parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    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.
    interpolate(DifferentialSample endValue, double timestamp)
     
    makeArray(int length)
    For internal use only.
    offsetBy(double timestampOffset)
    Returns this sample, offset by the given timestamp.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait