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
ConstructorsConstructorDescriptionPathConstraints(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 aPathConstraintsrecord class.PathConstraints(LinearVelocity maxVelocity, LinearAcceleration maxAcceleration, AngularVelocity maxAngularVelocity, AngularAcceleration maxAngularAcceleration) Kinematic path following constraintsPathConstraints(LinearVelocity maxVelocity, LinearAcceleration maxAcceleration, AngularVelocity maxAngularVelocity, AngularAcceleration maxAngularAcceleration, Voltage nominalVoltage) Kinematic path following constraintsPathConstraints(LinearVelocity maxVelocity, LinearAcceleration maxAcceleration, AngularVelocity maxAngularVelocity, AngularAcceleration maxAngularAcceleration, Voltage nominalVoltage, boolean unlimited) Kinematic path following constraints -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Get the max linear accelerationdoubleReturns the value of themaxAccelerationMPSSqrecord component.Get the max angular accelerationdoubleReturns the value of themaxAngularAccelerationRadPerSecSqrecord component.Get the max angular velocitydoubleReturns the value of themaxAngularVelocityRadPerSecrecord component.Get the max linear velocitydoubleReturns the value of themaxVelocityMPSrecord component.doubleReturns the value of thenominalVoltageVoltsrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theunlimitedrecord component.static PathConstraintsunlimitedConstraints(double nominalVoltage) Get unlimited PathConstraints
-
Constructor Details
-
PathConstraints
public PathConstraints(LinearVelocity maxVelocity, LinearAcceleration maxAcceleration, AngularVelocity maxAngularVelocity, AngularAcceleration maxAngularAcceleration, 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(LinearVelocity maxVelocity, LinearAcceleration maxAcceleration, AngularVelocity maxAngularVelocity, AngularAcceleration maxAngularAcceleration, 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(LinearVelocity maxVelocity, LinearAcceleration maxAcceleration, AngularVelocity maxAngularVelocity, 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 aPathConstraintsrecord class.- Parameters:
maxVelocityMPS- the value for themaxVelocityMPSrecord componentmaxAccelerationMPSSq- the value for themaxAccelerationMPSSqrecord componentmaxAngularVelocityRadPerSec- the value for themaxAngularVelocityRadPerSecrecord componentmaxAngularAccelerationRadPerSecSq- the value for themaxAngularAccelerationRadPerSecSqrecord componentnominalVoltageVolts- the value for thenominalVoltageVoltsrecord componentunlimited- the value for theunlimitedrecord component
-
-
Method Details
-
unlimitedConstraints
Get unlimited PathConstraints- Parameters:
nominalVoltage- The nominal battery voltage (Volts)- Returns:
- Unlimited constraints
-
maxVelocity
Get the max linear velocity- Returns:
- Max linear velocity
-
maxAcceleration
Get the max linear acceleration- Returns:
- Max linear acceleration
-
maxAngularVelocity
Get the max angular velocity- Returns:
- Max angular velocity
-
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 themaxVelocityMPSrecord component.- Returns:
- the value of the
maxVelocityMPSrecord component
-
maxAccelerationMPSSq
public double maxAccelerationMPSSq()Returns the value of themaxAccelerationMPSSqrecord component.- Returns:
- the value of the
maxAccelerationMPSSqrecord component
-
maxAngularVelocityRadPerSec
public double maxAngularVelocityRadPerSec()Returns the value of themaxAngularVelocityRadPerSecrecord component.- Returns:
- the value of the
maxAngularVelocityRadPerSecrecord component
-
maxAngularAccelerationRadPerSecSq
public double maxAngularAccelerationRadPerSecSq()Returns the value of themaxAngularAccelerationRadPerSecSqrecord component.- Returns:
- the value of the
maxAngularAccelerationRadPerSecSqrecord component
-
nominalVoltageVolts
public double nominalVoltageVolts()Returns the value of thenominalVoltageVoltsrecord component.- Returns:
- the value of the
nominalVoltageVoltsrecord component
-
unlimited
public boolean unlimited()Returns the value of theunlimitedrecord component.- Returns:
- the value of the
unlimitedrecord component
-