Record Class PathConstraints

java.lang.Object
java.lang.Record
com.pathplanner.lib.path.PathConstraints
Record Components:
maxVelocityMPS - Max linear velocity (M/S)
maxAccelerationMPSSq - Max linear acceleration (M/S^2)
maxAngularVelocityRadPerSec - Max angular velocity (Rad/S)
maxAngularAccelerationRadPerSecSq - Max angular acceleration (Rad/S^2)
nominalVoltageVolts - The nominal battery voltage (Volts)
unlimited - Should the constraints be unlimited

public record PathConstraints(double maxVelocityMPS, double maxAccelerationMPSSq, double maxAngularVelocityRadPerSec, double maxAngularAccelerationRadPerSecSq, double nominalVoltageVolts, boolean unlimited) extends Record
Kinematic path following constraints
  • Constructor Summary

    Constructors
    Constructor
    Description
    PathConstraints(double maxVelocityMPS, double maxAccelerationMPSSq, double maxAngularVelocityRadPerSec, double maxAngularAccelerationRadPerSecSq)
    Kinematic path following constraints
    PathConstraints(double maxVelocityMPS, double maxAccelerationMPSSq, double maxAngularVelocityRadPerSec, double maxAngularAccelerationRadPerSecSq, double nominalVoltageVolts)
    Kinematic path following constraints
    PathConstraints(double maxVelocityMPS, double maxAccelerationMPSSq, double maxAngularVelocityRadPerSec, double maxAngularAccelerationRadPerSecSq, double nominalVoltageVolts, boolean unlimited)
    Creates an instance of a PathConstraints record class.
    PathConstraints(edu.wpi.first.units.measure.LinearVelocity maxVelocity, edu.wpi.first.units.measure.LinearAcceleration maxAcceleration, edu.wpi.first.units.measure.AngularVelocity maxAngularVelocity, edu.wpi.first.units.measure.AngularAcceleration maxAngularAcceleration)
    Kinematic path following constraints
    PathConstraints(edu.wpi.first.units.measure.LinearVelocity maxVelocity, edu.wpi.first.units.measure.LinearAcceleration maxAcceleration, edu.wpi.first.units.measure.AngularVelocity maxAngularVelocity, edu.wpi.first.units.measure.AngularAcceleration maxAngularAcceleration, edu.wpi.first.units.measure.Voltage nominalVoltage)
    Kinematic path following constraints
    PathConstraints(edu.wpi.first.units.measure.LinearVelocity maxVelocity, edu.wpi.first.units.measure.LinearAcceleration maxAcceleration, edu.wpi.first.units.measure.AngularVelocity maxAngularVelocity, edu.wpi.first.units.measure.AngularAcceleration maxAngularAcceleration, edu.wpi.first.units.measure.Voltage nominalVoltage, boolean unlimited)
    Kinematic path following constraints
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    edu.wpi.first.units.measure.LinearAcceleration
    Get the max linear acceleration
    double
    Returns the value of the maxAccelerationMPSSq record component.
    edu.wpi.first.units.measure.AngularAcceleration
    Get the max angular acceleration
    double
    Returns the value of the maxAngularAccelerationRadPerSecSq record component.
    edu.wpi.first.units.measure.AngularVelocity
    Get the max angular velocity
    double
    Returns the value of the maxAngularVelocityRadPerSec record component.
    edu.wpi.first.units.measure.LinearVelocity
    Get the max linear velocity
    double
    Returns the value of the maxVelocityMPS record component.
    double
    Returns the value of the nominalVoltageVolts record component.
    final String
    Returns a string representation of this record class.
    boolean
    Returns the value of the unlimited record component.
    unlimitedConstraints(double nominalVoltage)
    Get unlimited PathConstraints

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PathConstraints

      public PathConstraints(edu.wpi.first.units.measure.LinearVelocity maxVelocity, edu.wpi.first.units.measure.LinearAcceleration maxAcceleration, edu.wpi.first.units.measure.AngularVelocity maxAngularVelocity, edu.wpi.first.units.measure.AngularAcceleration maxAngularAcceleration, edu.wpi.first.units.measure.Voltage nominalVoltage, boolean unlimited)
      Kinematic path following constraints
      Parameters:
      maxVelocity - Max linear velocity
      maxAcceleration - Max linear acceleration
      maxAngularVelocity - Max angular velocity
      maxAngularAcceleration - Max angular acceleration
      nominalVoltage - The nominal battery voltage
      unlimited - Should the constraints be unlimited
    • PathConstraints

      public PathConstraints(double maxVelocityMPS, double maxAccelerationMPSSq, double maxAngularVelocityRadPerSec, double maxAngularAccelerationRadPerSecSq, double nominalVoltageVolts)
      Kinematic path following constraints
      Parameters:
      maxVelocityMPS - Max linear velocity (M/S)
      maxAccelerationMPSSq - Max linear acceleration (M/S^2)
      maxAngularVelocityRadPerSec - Max angular velocity (Rad/S)
      maxAngularAccelerationRadPerSecSq - Max angular acceleration (Rad/S^2)
      nominalVoltageVolts - The nominal battery voltage (Volts)
    • PathConstraints

      public PathConstraints(edu.wpi.first.units.measure.LinearVelocity maxVelocity, edu.wpi.first.units.measure.LinearAcceleration maxAcceleration, edu.wpi.first.units.measure.AngularVelocity maxAngularVelocity, edu.wpi.first.units.measure.AngularAcceleration maxAngularAcceleration, edu.wpi.first.units.measure.Voltage nominalVoltage)
      Kinematic path following constraints
      Parameters:
      maxVelocity - Max linear velocity
      maxAcceleration - Max linear acceleration
      maxAngularVelocity - Max angular velocity
      maxAngularAcceleration - Max angular acceleration
      nominalVoltage - The nominal battery voltage
    • PathConstraints

      public PathConstraints(double maxVelocityMPS, double maxAccelerationMPSSq, double maxAngularVelocityRadPerSec, double maxAngularAccelerationRadPerSecSq)
      Kinematic path following constraints
      Parameters:
      maxVelocityMPS - Max linear velocity (M/S)
      maxAccelerationMPSSq - Max linear acceleration (M/S^2)
      maxAngularVelocityRadPerSec - Max angular velocity (Rad/S)
      maxAngularAccelerationRadPerSecSq - Max angular acceleration (Rad/S^2)
    • PathConstraints

      public PathConstraints(edu.wpi.first.units.measure.LinearVelocity maxVelocity, edu.wpi.first.units.measure.LinearAcceleration maxAcceleration, edu.wpi.first.units.measure.AngularVelocity maxAngularVelocity, edu.wpi.first.units.measure.AngularAcceleration maxAngularAcceleration)
      Kinematic path following constraints
      Parameters:
      maxVelocity - Max linear velocity
      maxAcceleration - Max linear acceleration
      maxAngularVelocity - Max angular velocity
      maxAngularAcceleration - Max angular acceleration
    • PathConstraints

      public PathConstraints(double maxVelocityMPS, double maxAccelerationMPSSq, double maxAngularVelocityRadPerSec, double maxAngularAccelerationRadPerSecSq, double nominalVoltageVolts, boolean unlimited)
      Creates an instance of a PathConstraints record class.
      Parameters:
      maxVelocityMPS - the value for the maxVelocityMPS record component
      maxAccelerationMPSSq - the value for the maxAccelerationMPSSq record component
      maxAngularVelocityRadPerSec - the value for the maxAngularVelocityRadPerSec record component
      maxAngularAccelerationRadPerSecSq - the value for the maxAngularAccelerationRadPerSecSq record component
      nominalVoltageVolts - the value for the nominalVoltageVolts record component
      unlimited - the value for the unlimited record component
  • Method Details

    • unlimitedConstraints

      public static PathConstraints unlimitedConstraints(double nominalVoltage)
      Get unlimited PathConstraints
      Parameters:
      nominalVoltage - The nominal battery voltage (Volts)
      Returns:
      Unlimited constraints
    • maxVelocity

      public edu.wpi.first.units.measure.LinearVelocity maxVelocity()
      Get the max linear velocity
      Returns:
      Max linear velocity
    • maxAcceleration

      public edu.wpi.first.units.measure.LinearAcceleration maxAcceleration()
      Get the max linear acceleration
      Returns:
      Max linear acceleration
    • maxAngularVelocity

      public edu.wpi.first.units.measure.AngularVelocity maxAngularVelocity()
      Get the max angular velocity
      Returns:
      Max angular velocity
    • maxAngularAcceleration

      public edu.wpi.first.units.measure.AngularAcceleration maxAngularAcceleration()
      Get the max angular acceleration
      Returns:
      Max angular acceleration
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • maxVelocityMPS

      public double maxVelocityMPS()
      Returns the value of the maxVelocityMPS record component.
      Returns:
      the value of the maxVelocityMPS record component
    • maxAccelerationMPSSq

      public double maxAccelerationMPSSq()
      Returns the value of the maxAccelerationMPSSq record component.
      Returns:
      the value of the maxAccelerationMPSSq record component
    • maxAngularVelocityRadPerSec

      public double maxAngularVelocityRadPerSec()
      Returns the value of the maxAngularVelocityRadPerSec record component.
      Returns:
      the value of the maxAngularVelocityRadPerSec record component
    • maxAngularAccelerationRadPerSecSq

      public double maxAngularAccelerationRadPerSecSq()
      Returns the value of the maxAngularAccelerationRadPerSecSq record component.
      Returns:
      the value of the maxAngularAccelerationRadPerSecSq record component
    • nominalVoltageVolts

      public double nominalVoltageVolts()
      Returns the value of the nominalVoltageVolts record component.
      Returns:
      the value of the nominalVoltageVolts record component
    • unlimited

      public boolean unlimited()
      Returns the value of the unlimited record component.
      Returns:
      the value of the unlimited record component