Package frc.robot.lib.BLine
Class Path.DefaultGlobalConstraints
java.lang.Object
frc.robot.lib.BLine.Path.DefaultGlobalConstraints
- Enclosing class:
- Path
Default global constraints that apply when path-specific constraints are not set.
These constraints are loaded from a config.json file or can be set programmatically. They provide fallback values for all constraint types when individual paths don't specify their own limits.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultGlobalConstraints(double maxVelocityMetersPerSec, double maxAccelerationMetersPerSec2, double maxVelocityDegPerSec, double maxAccelerationDegPerSec2, double endTranslationToleranceMeters, double endRotationToleranceDeg, double intermediateHandoffRadiusMeters) Creates a new set of default global constraints. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates a deep copy of these constraints.doubledoubledoubledoubledoubledoubledouble
-
Constructor Details
-
DefaultGlobalConstraints
public DefaultGlobalConstraints(double maxVelocityMetersPerSec, double maxAccelerationMetersPerSec2, double maxVelocityDegPerSec, double maxAccelerationDegPerSec2, double endTranslationToleranceMeters, double endRotationToleranceDeg, double intermediateHandoffRadiusMeters) Creates a new set of default global constraints.- Parameters:
maxVelocityMetersPerSec- Default maximum translational velocity (m/s)maxAccelerationMetersPerSec2- Default maximum translational acceleration (m/s²)maxVelocityDegPerSec- Default maximum rotational velocity (deg/s)maxAccelerationDegPerSec2- Default maximum rotational acceleration (deg/s²)endTranslationToleranceMeters- Tolerance for reaching final position (m)endRotationToleranceDeg- Tolerance for reaching final holonomic rotation (deg)intermediateHandoffRadiusMeters- Default radius for switching between targets (m)
-
-
Method Details
-
copy
Creates a deep copy of these constraints.- Returns:
- A new DefaultGlobalConstraints with the same values
-
getMaxVelocityMetersPerSec
public double getMaxVelocityMetersPerSec()- Returns:
- The default maximum translational velocity in meters per second
-
getMaxAccelerationMetersPerSec2
public double getMaxAccelerationMetersPerSec2()- Returns:
- The default maximum translational acceleration in meters per second squared
-
getMaxVelocityDegPerSec
public double getMaxVelocityDegPerSec()- Returns:
- The default maximum rotational velocity in degrees per second
-
getMaxAccelerationDegPerSec2
public double getMaxAccelerationDegPerSec2()- Returns:
- The default maximum rotational acceleration in degrees per second squared
-
getEndTranslationToleranceMeters
public double getEndTranslationToleranceMeters()- Returns:
- The tolerance for reaching the final translation in meters
-
getEndRotationToleranceDeg
public double getEndRotationToleranceDeg()- Returns:
- The tolerance for reaching the final rotation in degrees
-
getIntermediateHandoffRadiusMeters
public double getIntermediateHandoffRadiusMeters()- Returns:
- The default intermediate handoff radius in meters
-