Package com.pathplanner.lib.path
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
ConstructorDescriptionPathConstraints
(double maxVelocityMPS, double maxAccelerationMPSSq, double maxAngularVelocityRadPerSec, double maxAngularAccelerationRadPerSecSq) Kinematic path following constraintsPathConstraints
(double maxVelocityMPS, double maxAccelerationMPSSq, double maxAngularVelocityRadPerSec, double maxAngularAccelerationRadPerSecSq, double nominalVoltageVolts) Kinematic path following constraintsPathConstraints
(double maxVelocityMPS, double maxAccelerationMPSSq, double maxAngularVelocityRadPerSec, double maxAngularAccelerationRadPerSecSq, double nominalVoltageVolts, boolean unlimited) Creates an instance of aPathConstraints
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 constraintsPathConstraints
(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 constraintsPathConstraints
(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 TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.edu.wpi.first.units.measure.LinearAcceleration
Get the max linear accelerationdouble
Returns the value of themaxAccelerationMPSSq
record component.edu.wpi.first.units.measure.AngularAcceleration
Get the max angular accelerationdouble
Returns the value of themaxAngularAccelerationRadPerSecSq
record component.edu.wpi.first.units.measure.AngularVelocity
Get the max angular velocitydouble
Returns the value of themaxAngularVelocityRadPerSec
record component.edu.wpi.first.units.measure.LinearVelocity
Get the max linear velocitydouble
Returns the value of themaxVelocityMPS
record component.double
Returns the value of thenominalVoltageVolts
record component.final String
toString()
Returns a string representation of this record class.boolean
Returns the value of theunlimited
record component.static PathConstraints
unlimitedConstraints
(double nominalVoltage) Get unlimited PathConstraints
-
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 velocitymaxAcceleration
- Max linear accelerationmaxAngularVelocity
- Max angular velocitymaxAngularAcceleration
- Max angular accelerationnominalVoltage
- The nominal battery voltageunlimited
- 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 velocitymaxAcceleration
- Max linear accelerationmaxAngularVelocity
- Max angular velocitymaxAngularAcceleration
- Max angular accelerationnominalVoltage
- 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 velocitymaxAcceleration
- Max linear accelerationmaxAngularVelocity
- Max angular velocitymaxAngularAcceleration
- Max angular acceleration
-
PathConstraints
public PathConstraints(double maxVelocityMPS, double maxAccelerationMPSSq, double maxAngularVelocityRadPerSec, double maxAngularAccelerationRadPerSecSq, double nominalVoltageVolts, boolean unlimited) Creates an instance of aPathConstraints
record class.- Parameters:
maxVelocityMPS
- the value for themaxVelocityMPS
record componentmaxAccelerationMPSSq
- the value for themaxAccelerationMPSSq
record componentmaxAngularVelocityRadPerSec
- the value for themaxAngularVelocityRadPerSec
record componentmaxAngularAccelerationRadPerSecSq
- the value for themaxAngularAccelerationRadPerSecSq
record componentnominalVoltageVolts
- the value for thenominalVoltageVolts
record componentunlimited
- the value for theunlimited
record component
-
-
Method Details
-
unlimitedConstraints
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
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. -
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. -
equals
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 '=='. -
maxVelocityMPS
public double maxVelocityMPS()Returns the value of themaxVelocityMPS
record component.- Returns:
- the value of the
maxVelocityMPS
record component
-
maxAccelerationMPSSq
public double maxAccelerationMPSSq()Returns the value of themaxAccelerationMPSSq
record component.- Returns:
- the value of the
maxAccelerationMPSSq
record component
-
maxAngularVelocityRadPerSec
public double maxAngularVelocityRadPerSec()Returns the value of themaxAngularVelocityRadPerSec
record component.- Returns:
- the value of the
maxAngularVelocityRadPerSec
record component
-
maxAngularAccelerationRadPerSecSq
public double maxAngularAccelerationRadPerSecSq()Returns the value of themaxAngularAccelerationRadPerSecSq
record component.- Returns:
- the value of the
maxAngularAccelerationRadPerSecSq
record component
-
nominalVoltageVolts
public double nominalVoltageVolts()Returns the value of thenominalVoltageVolts
record component.- Returns:
- the value of the
nominalVoltageVolts
record component
-
unlimited
public boolean unlimited()Returns the value of theunlimited
record component.- Returns:
- the value of the
unlimited
record component
-